Пример #1
0
        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();
            }
        }
Пример #2
0
        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();
            }
        }