コード例 #1
0
ファイル: ThreadFactory.cs プロジェクト: nkasozi/Nkujukira
        //THIS RELEASES ALL RESOURCES CONSUMED BY A THREAD GIVEN ITS ID
        public static bool ReleaseThreadResources(String thread_id)
        {
            switch (thread_id)
            {
                case ThreadFactory.PERP_ALERT_THREAD:

                    perp_alert_thread       = null;
                    break;

                case ThreadFactory.STUDENT_ALERT_THREAD:
                    student_alert_thread    = null;
                    break;

                case ThreadFactory.CAMERA_THREAD:
                    cam_output              = null;
                    break;

                case ThreadFactory.CAMERA_THREAD_USING_VIDEO:
                    cam_output_using_video  = null;
                    break;

                case ThreadFactory.LIVE_DISPLAY_UPDATER:
                    live_display_updater    = null;
                    break;

                case ThreadFactory.REVIEW_DISPLAY_UPDATER:
                    review_display_updater  = null;
                    break;

                case ThreadFactory.REVIEW_FACE_DETECTOR:
                    review_face_detector    = null;
                    break;

                case ThreadFactory.LIVE_FACE_DETECTOR:
                    live_face_detector      = null;
                    break;

                case ThreadFactory.PERP_RECOGNIZER:
                    perp_recognizer         = null;
                    break;

                case ThreadFactory.PROGRESS_THREAD:
                    face_recog_progress     = null;
                    face_recog_progress_2   = null;
                    break;

                case ThreadFactory.FACE_DRAWER:
                    face_drawer             = null;
                    break;

                case ThreadFactory.FOOTAGE_SAVER:
                    footage_saver           = null;
                    break;

                case ThreadFactory.VIDEO_THREAD:
                    video_from_file_grabber = null;
                    break;

                case ThreadFactory.VIDEO_THREAD_USING_CAMERA:
                    video_from_camera       = null;
                    break;
            }
            return true;
        }
コード例 #2
0
ファイル: ThreadFactory.cs プロジェクト: nkasozi/Nkujukira
        //STARTS A THREAD TO CONTINUOUSLY UPDATE THE VIDEO DISPLAY
        private static DisplayUpdaterThread CreateReviewDisplayUpdaterThread()
        {
            var controls_name = MainWindow.MainWindowControls.review_image_box;
            review_display_updater = new ReviewDisplayUpdater((ImageBox)Singleton.MAIN_WINDOW.GetControl(controls_name));
            review_display_updater.StartWorking();

            return review_display_updater;
        }
コード例 #3
0
ファイル: ThreadFactory.cs プロジェクト: nkasozi/Nkujukira
 public static DisplayUpdaterThread CreateLiveDisplayUpdaterThread(ImageBox image_box)
 {
     live_display_updater = new LiveDisplayUpdater(image_box);
     live_display_updater.StartWorking();
     return live_display_updater;
 }