示例#1
0
        private void YingXinRr9_HidListen(string hid)
        {
            BeginInvoke(new MethodInvoker(() =>
            {
                label2.Text = @"系统正在处理,请稍后...";
            }));
            _rr9.StopHidListen();
            TimingEnd();
            var student = _loginService.IdentityVerification(hid);

            if (student.Id == null)
            {
                MessageBox.Show(@"用户验证失败!");
                BeginInvoke(new MethodInvoker(Close));
            }
            else
            {
                BeginInvoke(new MethodInvoker(() =>
                {
                    var son = new FrmLoanSubmit(student, _rr9)
                    {
                        Owner = this
                    };
                    son.Show();
                    Hide();
                }));
            }
        }
示例#2
0
 private void YingXinRr9_HidListen(string hid)
 {
     _rr9.StopHidListen();
     TimingEnd();
     try
     {
         _student = _studentService.IdentityVerification(hid);
         if (_student.Id != null)
         {
             BeginInvoke(new MethodInvoker(() =>
             {
                 this.lblName.Text  = $"姓名:{_student.StudentName}";
                 this.lblGrade.Text = $"年级:{_student.GradeName}";
                 this.lblClass.Text = $"班级:{_student.ClassName}";
             }));
             _rr9.Change15693();
             _rr9.StartUidListen(YingXinRr9_UidListen);
             TimingBegin();
         }
         else
         {
             ResetAction();
             MessageBox.Show(@"用户验证失败!");
             BeginInvoke(new MethodInvoker(() =>
             {
                 btnStart.Focus();
             }));
         }
     }
     catch (Exception ex)
     {
         ResetAction();
         BeginInvoke(new MethodInvoker(() =>
         {
             btnStart.Focus();
         }));
         Logger.Error(ex);
         throw ex;
     }
 }
示例#3
0
 private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     _rr9?.StopHidListen();
     _rr9?.StopUidListen();
     _rr9?.CloseComPort();
 }