AffdexMe.MainWindow.btnChooseWin_Click C# (CSharp) Method

btnChooseWin_Click() private method

Handles the Click event of the btnChooseWin control.
private btnChooseWin_Click ( object sender, RoutedEventArgs e ) : void
sender object The source of the event.
e System.Windows.RoutedEventArgs The instance containing the event data.
return void
        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();
            }
        }