コード例 #1
0
 private void ScanFaceInfoWatcher_Changed(object sender, FileSystemEventArgs e)
 {
     addrow("select * from scan_face_info where Face_Record >" + ScanFaceInfoIndex, ((DataGridView)(((TabPage)(DatabaseTabControl.TabPages[3])).Controls[0])));
     //把大於Face_Record的row都加進去
     using (SQLClass CurrentCount = new SQLClass("select count(*) from scan_face_info", MySQLConnectionString))
     {
         CurrentCount.Reader.Read();
         ScanFaceInfoIndex = CurrentCount.Reader.GetInt32(0);
         if (Person_timer.Enabled)
         {
             Person_timer.Stop();
         }
         Person_timer.Start();
         label_PersonName.Text = ((DataGridView)(((TabPage)(DatabaseTabControl.TabPages[3])).Controls[0])).Rows[ScanFaceInfoIndex - 1].Cells[1].Value.ToString();
     }
 }
コード例 #2
0
 private void Person_timer_Tick(object sender, EventArgs e)
 {
     label_PersonName.Text = "Not Detected";
     Person_timer.Stop();
 }