Ejemplo n.º 1
0
 void _client_RefreshVerifyCompleted(object sender, VerifyEventArgs e)
 {
     if (e.VerifyMode == VerifyMode.Login)
     {
         SetVerifyImage(e.VerifyImage);
     }
 }
Ejemplo n.º 2
0
 void _client_RefreshVerifyCompleted(object sender, VerifyEventArgs e)
 {
     if (this.InvokeRequired)
     {
         this.Invoke((MethodInvoker)(() =>
         {
             if (e.VerifyMode == VerifyMode.VerifyError)
             {
                 FrmVerify frmVerify = new FrmVerify(e.VerifyImage);
                 frmVerify.InputCompleted += new EventHandler <InputEventArgs>(frmVerify_InputCompleted);
                 frmVerify.ShowDialog();
                 _client.CheckLogin(_client.User.Username, _client.User.Password, code.Trim(','));
                 loginTryCount++;
             }
             else if (e.VerifyMode == VerifyMode.Login)
             {
                 FrmLogin frmLogin = new FrmLogin(e.VerifyImage);
                 frmLogin.LoginTrigger += new EventHandler <UserLoginEventArgs>(frmLogin_LoginTrigger);
                 frmLogin.ShowDialog();
                 _client.CheckLogin(_client.User.Username, _client.User.Password, code.Trim(','));
             }
             else if (e.VerifyMode == VerifyMode.Passenger)
             {
                 FrmVerify frmVerify = new FrmVerify(e.VerifyImage);
                 frmVerify.InputCompleted += new EventHandler <InputEventArgs>(frmVerify_InputCompleted);
                 frmVerify.ShowDialog();
             }
         }));
     }
     else
     {
         if (e.VerifyMode == VerifyMode.VerifyError)
         {
             FrmVerify frmVerify = new FrmVerify(e.VerifyImage);
             frmVerify.InputCompleted += new EventHandler <InputEventArgs>(frmVerify_InputCompleted);
             frmVerify.ShowDialog();
             _client.CheckLogin(_client.User.Username, _client.User.Password, code.Trim(','));
             loginTryCount++;
         }
         else if (e.VerifyMode == VerifyMode.Login)
         {
             FrmLogin frmLogin = new FrmLogin(e.VerifyImage);
             frmLogin.LoginTrigger += new EventHandler <UserLoginEventArgs>(frmLogin_LoginTrigger);
             frmLogin.ShowDialog();
             _client.CheckLogin(_client.User.Username, _client.User.Password, code.Trim(','));
         }
         else if (e.VerifyMode == VerifyMode.Passenger)
         {
             FrmVerify frmVerify = new FrmVerify(e.VerifyImage);
             frmVerify.InputCompleted += new EventHandler <InputEventArgs>(frmVerify_InputCompleted);
             frmVerify.ShowDialog();
         }
     }
 }