/// <summary>
 /// Add a spinner to this controller's database
 /// </summary>
 /// <param name="spinner">The ButtonSpinner to add</param>
 /// <param name="minimum">The minimum value for the spinner</param>
 /// <param name="maximum">The maximum value for the spinner</param>
 /// <param name="initial">The initial value for the spinner</param>
 /// <returns>The spiner data (from which a value can be taken)</returns>
 public SpinnerData AddSpinner(ButtonSpinner spinner, int minimum, int maximum, int initial)
 {
     SpinnerData d = new SpinnerData(spinner, minimum, maximum, initial);
     _spinnerList.Add(d);
     return d;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Called when the window is loaded
 /// </summary>
 /// <param name="sender">Object that called this event</param>
 /// <param name="e">Event arguments</param>
 private void WindowLoaded(object sender, RoutedEventArgs e)
 {
     _bw = new BackgroundWorker();
     _bw.DoWork += BwDoWork;
     _bw.RunWorkerCompleted += BwRunWorkerCompleted;
     _loadcomplete = true;
     SbGammaChange(sender);
     _videoActive = false;
     _adcTestActive = false;
     _useDefectData = false;
     _spinnerController = new SpinnerController();
     _stepSpinner = _spinnerController.AddSpinner(step_updown);
     _vlnSpinner = _spinnerController.AddSpinner(vln_updown);
     _ampbiasSpinner = _spinnerController.AddSpinner(ampbias_updown);
     _compbiasSpinner = _spinnerController.AddSpinner(compbias_updown);
     _thresholdSpinner = _spinnerController.AddSpinner(threshold_updown);
     _magbiasSpinner = _spinnerController.AddSpinner(magbias_updown);
     _irefoutSpinner = _spinnerController.AddSpinner(irefout_updown);
     _eventbiasSpinner = _spinnerController.AddSpinner(eventbias_updown);
     _portOpen = true;
     _portOpen = false;
     LoadDEF();
 }
 /// <summary>
 /// Add a spinner to this controller's database with Min = 0, Max = 63, Default = 0
 /// </summary>
 /// <param name="spinner">The ButtonSpinner to add</param>
 /// <returns>The spinner data (from which a value can be taken)</returns>
 public SpinnerData AddSpinner(ButtonSpinner spinner)
 {
     SpinnerData d = new SpinnerData(spinner);
     _spinnerList.Add(d);
     return d;
 }