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(); }
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); }
protected override void applyButton_Click(object sender, EventArgs e) { if (checkTextBoxes()) { Config.saveGlobalPreciseOptions(data); base.applyButton_Click(sender, e); } }
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); }
void savePreciseEditorToFileButton_Click(object sender, EventArgs e) { if (checkTextBoxes()) { if (savePreciseEditorToFileDialog.ShowDialog() == DialogResult.OK) { Config.savePreciseOptions(data, savePreciseEditorToFileDialog.FileName, false); } } }
void loadFileButton_Click(object sender, EventArgs e) { if (openCommonDataFileDialog.ShowDialog() == DialogResult.OK) { try { loadCommonData(Config.loadCommonOptions(openCommonDataFileDialog.FileName)); } catch (Config.ConfigLoadException cle) { cle.visualise(); } } }
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); }
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(); } } }
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(); } } }
protected virtual void saveData() { Config.saveGlobalPreciseOptions(data); }
void ok_butt_Click(object sender, EventArgs e) { Config.saveGlobalConnectOptions(serialPortComboBox.Text, int.Parse(baudrateComboBox.Text)); Close(); }