private void ConfigForm_FormClosing(object sender, FormClosingEventArgs e) { if (_shallSave && MessageService.AskQuestion("Save changes?")) { ExternalToolsCfg.Save(); _shallSave = false; DialogResult = DialogResult.OK; } }
private void btnOk_Click(object sender, EventArgs e) { if (_shallSave) { ExternalToolsCfg.Save(); _shallSave = false; DialogResult = DialogResult.OK; } else { DialogResult = DialogResult.Ignore; } }
private void LoadExternalToolDefs() { lb.Items.Clear(); ClearControls(); ExternalToolsCfg.Load(); List <ExternalToolDef> current = ExternalToolsCfg.Current; foreach (ExternalToolDef def in current) { lb.Items.Add(def); } if (lb.Items.Count > 0) { lb.SelectedIndex = 0; } RenderExternalToolDef(CurrentDef); }
public override void Run() { ExternalToolsCfg.Load(); RunToolForm.ShowForm(ExternalToolsCfg.Current); }
public bool SaveContent() { ExternalToolsCfg.Save(); return(true); }