Esempio n. 1
0
 private void LoginForm_Load(object sender, EventArgs e)
 {
     try
     {
         DataTable dt    = null;
         string    error = "";
         ConnectInfo.LoadUser(out dt, out error);
         if (this.aiFace == null)
         {
             this.aiFace       = new AIFace(this.vpFace);
             this.aiFace.Faces = this.LoadFaces(dt);
             ErrorCode rslt = this.aiFace.Initialize();
             if (rslt != ErrorCode.Ok)
             {
                 this.aiFace.Stop();
                 return;
             }
         }
         this.aiFace.Start();
     }
     catch (Exception ex)
     {
         LogHelper.Error(ex);
         if (this.aiFace != null)
         {
             this.aiFace.Stop();
             this.aiFace = null;
         }
     }
 }
Esempio n. 2
0
 private void StartAIFace()
 {
     try
     {
         if (this.aiFace == null)
         {
             DataTable dt = this.dgvUser.DataSource as DataTable;
             this.aiFace                  = new AIFace(this.vpFace);
             this.aiFace.Faces            = this.LoadFaces(dt);
             this.aiFace.CaputurePicture += AiFace_CaputurePicture;
             ErrorCode rslt = this.aiFace.Initialize();
             if (rslt != ErrorCode.Ok)
             {
                 this.aiFace.Stop();
                 return;
             }
         }
         this.aiFace.Start();
     }
     catch (Exception ex)
     {
         LogHelper.Error(ex);
         if (this.aiFace != null)
         {
             this.aiFace.Stop();
             this.aiFace = null;
         }
     }
 }
Esempio n. 3
0
 private void GoHomePage()
 {
     this.nFLeft.SelectedPageIndex  = 0;
     this.nFRight.SelectedPageIndex = 0;
     if (this.aiFace != null)
     {
         this.aiFace.Stop();
         this.aiFace = null;
     }
 }
Esempio n. 4
0
 private void RegistForm_Load(object sender, EventArgs e)
 {
     try
     {
         DataTable dt    = null;
         string    error = "";
         ConnectInfo.LoadUser(out dt, out error);
         if (dt != null)
         {
             this.dgvUser.DataSource = dt;
         }
     }
     catch (Exception ex)
     {
         LogHelper.Error(ex);
         if (this.aiFace != null)
         {
             this.aiFace.Stop();
             this.aiFace = null;
         }
     }
 }