/// <summary>
        /// Handles the Click event of the btnChooseWin control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
        private void btnChooseWin_Click(object sender, RoutedEventArgs e)
        {
            Boolean wasRunning = false;

            if ((Detector != null) && (Detector.isRunning()))
            {
                StopCameraProcessing();
                ResetDisplayArea();
                wasRunning = true;
            }

            MetricSelectionUI w = new MetricSelectionUI(EnabledClassifiers);

            w.ShowDialog();
            EnabledClassifiers = new StringCollection();
            foreach (String classifier in w.Classifiers)
            {
                EnabledClassifiers.Add(classifier);
            }
            canvas.MetricNames = EnabledClassifiers;
            if (wasRunning)
            {
                StartCameraProcessing();
            }
        }
        private void btnChooseWin_Click(object sender, RoutedEventArgs e)
        {
            Boolean wasRunning = false;

            if ((mCameraDetector != null) && (mCameraDetector.isRunning()))
            {
                StopCameraProcessing();
                ResetDisplayArea();
                wasRunning = true;
            }

            MetricSelectionUI w = new MetricSelectionUI(mEnabledClassifiers);

            w.ShowDialog();
            mEnabledClassifiers = w.Classifiers;
            if (wasRunning)
            {
                StartCameraProcessing();
            }
        }
示例#3
0
 /// <summary>
 /// Handles the Click event of the btnChooseWin control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
 private void btnChooseWin_Click(object sender, RoutedEventArgs e)
 {
     Boolean wasRunning = false;
     if ((Detector != null) && (Detector.isRunning()))
     {
         StopCameraProcessing();
         ResetDisplayArea();
         wasRunning = true;
     }
     
     MetricSelectionUI w = new MetricSelectionUI(EnabledClassifiers);
     w.ShowDialog();
     EnabledClassifiers = new StringCollection();
     foreach (String classifier in w.Classifiers)
     {
         EnabledClassifiers.Add(classifier);
     }
     canvas.MetricNames = EnabledClassifiers;
     if (wasRunning)
     {
         StartCameraProcessing();
     }
 }
 private void btnChooseWin_Click(object sender, RoutedEventArgs e)
 {
     Boolean wasRunning = false;
     if ((mCameraDetector != null) && (mCameraDetector.isRunning()))
     {
         StopCameraProcessing();
         ResetDisplayArea();
         wasRunning = true;
     }
     
     MetricSelectionUI w = new MetricSelectionUI(mEnabledClassifiers);
     w.ShowDialog();
     mEnabledClassifiers = w.Classifiers;
     if (wasRunning)
     {
         StartCameraProcessing();
     }
 }