private void AddNewProgram(object sender, EventArgs e) { PlanDesigner designer = new PlanDesigner(new FiringPlan(), GetExistingPlanNames()); if (designer.ShowDialog() == DialogResult.OK) { P.Add(designer.plan); UpdateAvailablePrograms(); SaveSettings(); } }
private void EditSelectedPlan(object sender, EventArgs e) { var index = PlanSelector.SelectedIndex; if (index == -1) { return; } var designer = new PlanDesigner(P[index], GetExistingPlanNames()); if (designer.ShowDialog() == DialogResult.OK) { P[index] = designer.plan; UpdateAvailablePrograms(); SaveSettings(); } }