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();
        }
Ejemplo n.º 2
0
        public async static Task IniLogin()

        {
            KillProcess("3CXPhone");
            KillProcess("cobdesk");

            //Licença por data de uso *************************************************************************************************
            //StreamReader sr = File.OpenText("Licenca.txt");
            //string Licenca = DateTime.Now.ToShortDateString();
            //string input = null;
            //while ((input = sr.ReadLine()) != null)
            //    if (Licenca == input)
            //{
            //    int mess = 0;
            //    while (mess++ < mess)
            //    {
            //        DialogResult msg = MessageBox.Show("LICENÇA EXPIRADA !!!","Facilita",MessageBoxButtons.OK,MessageBoxIcon.Warning);
            //    }
            //}

            DialogResult result2 = MessageBox.Show(
                "Favor aguardar a finalização do processo automático!!!",
                "Facilita",
                MessageBoxButtons.OK,
                MessageBoxIcon.Warning
                );

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


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

                //Login SISCOBWhite
                //Form1 f1 = Application.OpenForms["Form1"] as Form1;
                if (!LoginSISCOBWhite(formFacilita.txtUserSISCOB.Text, formFacilita.txtPassSISCOB.Text))
                {
                    //this.Enabled = true;
                    return;
                }
            }
            catch (Exception ex)
            {
                //this.Enabled = true;
                Console.WriteLine(ex.StackTrace);
                return;
            }
            //Thread.Sleep(2000);

            return;
        }