public void initSiscob()
        {
            KillProcess("3CXPhone");
            KillProcess("cobdesk");

            //dialogAguarde();

            //log do sistema
            Logger.Init1("LogFlex");

            //Login SISCOB  *************************************************************************************************
            try
            {
                //Aplicação Receber Chamada para operador
                Siscob.Login3CX();

                //Login SISCOBWhite

                if (!Siscob.LoginSISCOBWhite(f1.txtUserSISCOB.Text, f1.txtPassSISCOB.Text))
                {
                    this.Enabled = true;
                    return;
                }
            }
            catch
            {
                this.Enabled = true;
                return;
            }
            //Thread.Sleep(2000);



            //dialogFinalizado();
        }
Esempio n. 2
0
        private async void button1_ClickAsync(object sender, EventArgs e)

        {
            if (String.IsNullOrEmpty(txtCNPJRCB.Text) || String.IsNullOrEmpty(txtUserRCB.Text) ||
                String.IsNullOrEmpty(txtPassRCB.Text) || String.IsNullOrEmpty(txtUserCICS.Text) ||
                String.IsNullOrEmpty(txtPassCICS.Text) || String.IsNullOrEmpty(txtUserSISCOB.Text) ||
                String.IsNullOrEmpty(txtPassSISCOB.Text))
            {
                DialogResult result2 = MessageBox.Show(
                    "Usuario ou senha está incompleto!!",
                    "Facilita",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Warning
                    );


                return;
            }
            barraApp();

            //WebServiceSiscob.CallWebService("95671555", "01", "Teste Robo");

            this.Hide();

            //Tela registro para finalizar acordo ou cancelar
            //Form1 f = Application.OpenForms["Form1"] as Form1;
            //Form1 f = new Form1();

            //-----------------------------------------------------------------------------------------------------------
            //TelaRegistro cons = new TelaRegistro(f.txtUserCICS.Text, f.txtPassCICS.Text, "TCPIP71.santanderbr.corp", 2023);
            //-----------------------------------------------------------------------------------------------------------
            //cons.Show();
            //Thread.Sleep(1000);
            //cons.Activate();

            await Siscob.IniLogin();

            DispatcherTimer timer = new DispatcherTimer();

            timer.Interval = TimeSpan.FromSeconds(3);
            timer.Tick    += timer_Tick;
            timer.Start();
        }
Esempio n. 3
0
        void timer_Tick(object sender, EventArgs e)
        {
            var app2     = TestStack.White.Application.Attach("cobdesk");
            int timeout1 = 0;

            var windows1 = app2.GetWindows();

            foreach (var wind1 in windows1)
            {
                if (wind1.Name.Contains("Chamada DISCADOR"))
                {
                    var discador = wind1;
                    //Identifica Ativo/Receptivo
                    //var txtCpf = discador.Get<TestStack.White.UIItems.TextBox>(SearchCriteria.ByAutomationId("txtUserDefined14"));
                    var txtsAtendimento = wind1.GetMultiple <TestStack.White.UIItems.TextBox>(SearchCriteria.ByControlType(ControlType.Edit));

                    var fechar = discador.Get(SearchCriteria.ByText("Fechar"));
                    fechar.SetForeground();
                    fechar.Focus();
                    Thread.Sleep(100);
                    fechar.Click();
                    Thread.Sleep(1500);

                    if (txtsAtendimento.Count() > 16)
                    {
                        //iniciar tela registro receptivo
                        Siscob.TelaReg(true);
                    }
                    else
                    {
                        //iniciar tela registro ativo
                        Siscob.TelaReg(false);
                    }

                    timeout1 = 10000;
                    break;
                }
            }
            Console.WriteLine(timeout1++);
            Thread.Sleep(1000);
        }