Exemple #1
0
        private void ThresSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            int val = (int)ThresSlider.Value;

            this.SliderValue.Header = string.Format("Threshold: {0}", val);
            CWrapper.SetOverlayer(4, val);
        }
Exemple #2
0
 public void SetInvertThreshold(bool inv)
 {
     try {
         CWrapper.SetOverlayer(3, inv == true ? 1 : 0);
     }
     catch (Exception ex)
     {
         Console.WriteLine("Service Error:\n{0}", ex.Message);
     }
 }
Exemple #3
0
 public void SetOverlay(bool threshold, bool fixedCross, bool detectedCross)
 {
     try
     {
         CWrapper.SetOverlayer(0, threshold == true ? 1 : 0);
         CWrapper.SetOverlayer(1, fixedCross == true ? 1 : 0);
         CWrapper.SetOverlayer(2, detectedCross == true ? 1 : 0);
     }
     catch (Exception ex)
     {
         Console.WriteLine("Service Error:\n{0}", ex.Message);
     }
 }
Exemple #4
0
        public void SetThreshold(int newThreshold)
        {
            try
            {
                if (newThreshold < 0)
                {
                    newThreshold = 0;
                }
                if (newThreshold > 255)
                {
                    newThreshold = 255;
                }

                CWrapper.SetOverlayer(4, newThreshold);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Service Error:\n{0}", ex.Message);
            }
        }
Exemple #5
0
 private void InvThreshold_Click(object sender, RoutedEventArgs e)
 {
     CWrapper.SetOverlayer(3, this.InvThreshold.IsChecked == true ? 1 : 0);
 }
Exemple #6
0
 private void CB_2_Click(object sender, RoutedEventArgs e)
 {
     CWrapper.SetOverlayer(2, CB_2.IsChecked == true ? 1 : 0);
 }