Example #1
0
 public CalibrateModel()
     : base(HStart, T)
 {
     PowerTimer = 3;
     worker.WorkerReportsProgress = true;
     worker.DoWork += worker_DoWork;
     worker.RunWorkerCompleted += worker_RunWorkerCompleted;
     worker.ProgressChanged += worker_ProgressChanged;
     for (int i = 0; i < 4; i++)
     {
         chanels[i] = new ChannelCalibration(i, NumberOfPoints);
     }
 }
 private void calibrateModel_DoneLoadingImage(ChannelCalibration chanel)
 {
     if (chanel != null)
     {
         stack.Children.Insert(0, chanel.Radio);
         chanel.Radio.Checked += Radio_Checked;
         SelectedChannel = chanel;
     }
     else
     {
         foreach (var item in stack.Children)
         {
             if (item is RadioButton)
             {
                 ((RadioButton)item).IsChecked = true;
                 return;
             }
         }
     }
 }
 private void Radio_Checked(object sender, RoutedEventArgs e)
 {
     SelectedChannel = calibrateModel.chanels[int.Parse(((RadioButton)sender).Uid)];
 }