示例#1
0
        private void thoátToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (m_service != null)
            {
                m_service.stop();
                m_service.Dispose();
                m_service = null;
            }
            else
            {
                if (m_faceTracking != null)
                {
                    m_faceTracking.Dispose();
                }
                if (m_face_recog != null)
                {
                    m_face_recog.Dispose();
                }

                if (m_FD_Face != null)
                {
                    m_FD_Face.Dispose();
                }
            }
            Close();
        }
示例#2
0
 public void stop()
 {
     m_listView_Thumb.Items.Clear();
     imageList.Images.Clear();
     m_isReadCamera = false;
     if (m_thread_display != null)
     {
         if (m_thread_display.IsAlive)
         {
             m_thread_display.Abort();
         }
     }
     if (m_thread != null)
     {
         if (m_thread.IsAlive)
         {
             m_thread.Abort();
         }
     }
     if (m_thread_recog != null)
     {
         if (m_thread_recog.IsAlive)
         {
             m_thread_recog.Abort();
         }
     }
     if (m_faceTracking != null)
     {
         m_faceTracking.Dispose();
     }
     if (m_face_recog != null)
     {
         m_face_recog.Dispose();
     }
     m_cameraCapture.Dispose();
     if (m_container.Count > 0)
     {
         for (int i = 0; i < m_container.Count; i++)
         {
             if (m_container[i] != null)
             {
                 m_container[i].Dispose();
             }
         }
         m_container.Clear();
     }
     if (m_bitmap_to_tracking != null)
     {
         m_bitmap_to_tracking.Dispose();
     }
     if (m_bitmap_to_show != null)
     {
         m_bitmap_to_show.Dispose();
     }
     for (int i = 0; i < m_bitmap_list.Count; i++)
     {
         m_bitmap_list[i].Dispose();
     }
 }