void ok_butt_Click(object sender, EventArgs e)
 {
     Config.saveGlobalDelaysOptions((ushort)standardDelayNumericUpDown.Value, forwardAsBeforeCheckBox.Checked, (ushort)beforeTimeNumericUpDown.Value,
                                    (ushort)forwardTimeNumericUpDown.Value, (ushort)backwardTimeNumericUpDown.Value);
     DialogResult = DialogResult.OK;
     Close();
 }
Example #2
0
 protected override bool saveData()
 {
     if (Graph.Displaying.Diff == graph.DisplayingMode)
     {
         saveSpecterFileDialog.FileName += Config.DIFF_FILE_SUFFIX;
     }
     if (PreciseSpectrumDisplayed)
     {
         saveSpecterFileDialog.Filter     = Config.PRECISE_SPECTRUM_FILE_DIALOG_FILTER;
         saveSpecterFileDialog.DefaultExt = Config.PRECISE_SPECTRUM_EXT;
         if (saveSpecterFileDialog.ShowDialog() == DialogResult.OK)
         {
             Config.savePreciseSpectrumFile(saveSpecterFileDialog.FileName, graph);
             Modified = false;
             return(true);
         }
     }
     else
     {
         saveSpecterFileDialog.Filter     = Config.SPECTRUM_FILE_DIALOG_FILTER;
         saveSpecterFileDialog.DefaultExt = Config.SPECTRUM_EXT;
         if (saveSpecterFileDialog.ShowDialog() == DialogResult.OK)
         {
             Config.saveSpectrumFile(saveSpecterFileDialog.FileName, graph);
             Modified = false;
             return(true);
         }
     }
     return(false);
 }
Example #3
0
 protected override void applyButton_Click(object sender, EventArgs e)
 {
     if (checkTextBoxes())
     {
         Config.saveGlobalPreciseOptions(data);
         base.applyButton_Click(sender, e);
     }
 }
Example #4
0
 public override bool setScalingCoeff(byte col, ushort pnt, double mass)
 {
     if (base.setScalingCoeff(col, pnt, mass))
     {
         Config.setScalingCoeff(col, pnt, mass);
         return(true);
     }
     return(false);
 }
Example #5
0
 void savePreciseEditorToFileButton_Click(object sender, EventArgs e)
 {
     if (checkTextBoxes())
     {
         if (savePreciseEditorToFileDialog.ShowDialog() == DialogResult.OK)
         {
             Config.savePreciseOptions(data, savePreciseEditorToFileDialog.FileName, false);
         }
     }
 }
Example #6
0
 void loadFileButton_Click(object sender, EventArgs e)
 {
     if (openCommonDataFileDialog.ShowDialog() == DialogResult.OK)
     {
         try {
             loadCommonData(Config.loadCommonOptions(openCommonDataFileDialog.FileName));
         } catch (Config.ConfigLoadException cle) {
             cle.visualise();
         }
     }
 }
Example #7
0
 void checkAndSave(EventHandler action, object sender, EventArgs e)
 {
     if (startScanNumericUpDown.Value > endScanNumericUpDown.Value)
     {
         startScanNumericUpDown.BackColor = Color.Red;
         endScanNumericUpDown.BackColor   = Color.Red;
         return;
     }
     Config.saveGlobalScanOptions((ushort)startScanNumericUpDown.Value, (ushort)endScanNumericUpDown.Value);
     action(sender, e);
 }
 protected override void saveData()
 {
     base.saveData();
     Config.saveGlobalCheckOptions((int)iterationsNumericUpDown.Value, (int)timeLimitNumericUpDown.Value, (ushort)allowedShiftNumericUpDown.Value,
                                   checkPeakPreciseEditorRowMinus.AllFilled?
                                   new PreciseEditorData(false, byte.MaxValue, Convert.ToUInt16(checkPeakPreciseEditorRowMinus.StepText),
                                                         Convert.ToByte(checkPeakPreciseEditorRowMinus.ColText), 0,
                                                         Convert.ToUInt16(checkPeakPreciseEditorRowMinus.WidthText), 0, "checker peak"):
                                   null, (int)checkPeakNumberNumericUpDown.Value,
                                   (byte)backroundMeasureCycleCountNumericUpDown.Value);
 }
Example #9
0
 void loadPreciseEditorFromFileButton_Click(object sender, EventArgs e)
 {
     if (loadPreciseEditorFromFileDialog.ShowDialog() == DialogResult.OK)
     {
         try {
             var data = Config.loadPreciseOptions(loadPreciseEditorFromFileDialog.FileName);
             clearPreciseEditorData();
             loadPreciseEditorData(data);
         } catch (Config.ConfigLoadException cle) {
             cle.visualise();
         }
     }
 }
Example #10
0
 void GraphForm_OnDiffOnPoint(ushort step, byte?collectorNumber, PreciseEditorData pedReference)
 {
     if (PreciseSpectrumDisplayed)
     {
         openSpecterFileDialog.Filter = Config.PRECISE_SPECTRUM_FILE_DIALOG_FILTER;
     }
     else
     {
         openSpecterFileDialog.Filter = Config.SPECTRUM_FILE_DIALOG_FILTER;
     }
     if (openSpecterFileDialog.ShowDialog() == DialogResult.OK)
     {
         try {
             Config.distractSpectra(openSpecterFileDialog.FileName, step, collectorNumber, pedReference, graph);
         } catch (Config.ConfigLoadException cle) {
             cle.visualise();
         }
     }
 }
Example #11
0
 protected virtual void saveData()
 {
     Config.saveGlobalPreciseOptions(data);
 }
 void ok_butt_Click(object sender, EventArgs e)
 {
     Config.saveGlobalConnectOptions(serialPortComboBox.Text, int.Parse(baudrateComboBox.Text));
     Close();
 }