示例#1
0
        public void Close()
        {
            lock (mutex)
            {
                if (controllerState.Equals(CMSState.Quitting))
                {
                    return;
                }

                if (CMSLogger.CanCreateLogEvent(false, false, false, "CMSLogEndEvent"))
                {
                    CMSLogEndEvent endEvent = new CMSLogEndEvent();
                    endEvent.SetDateTime(DateTime.Now);
                    if (endEvent != null)
                    {
                        CMSLogger.SendLogEvent(endEvent);
                    }
                }

                videoSource.StopSource();
                controllerState = CMSState.Quitting;
                CMSTrackingSuite selectedSuite = model.SelectedSuite;
                if (selectedSuite != null)
                {
                    selectedSuite.Clean();
                }
                videoDisplay.Quit();
                controlToggler.Stop();
                CMSLogger.StopLogging();
            }
        }
示例#2
0
        public void SetSelectedTrackingSuite(string newTrackingSuiteName)
        {
            lock (mutex)
            {
                if (newTrackingSuiteName == null)
                {
                    return;
                }
                if (newTrackingSuiteName.Equals(model.SelectedSuiteName))
                {
                    return;
                }

                CMSTrackingSuite oldTrackingSuite = this.model.SelectedSuite;
                if (oldTrackingSuite != null)
                {
                    //oldTrackingSuite.ToggleControl(false);
                    oldTrackingSuite.Clean();
                }

                model.SelectedSuiteName = newTrackingSuiteName;
                ToggleSetup(true);
                CMSTrackingSuite newTrackingSuite = this.model.SelectedSuite;
                newTrackingSuite.CMSTrackingSuiteAdapter = new CMSStandardTrackingSuiteAdapter(model, this, this.videoDisplay);
                newTrackingSuite.Init(model.FrameDims);
                newTrackingSuite.SendSuiteLogEvent();
                ReceiveMessagesFromTracker(null, null);
            }
        }