Exemplo n.º 1
0
        void Plan_View(object sender, EventArgs e)
        {
            PlanMenuItem menu = sender as PlanMenuItem;

            if (menu == null)
            {
                return;
            }

            EditPlanItem form = new EditPlanItem(EditItemMode.View, Selected, menu.Item);

            form.ShowDialog(this);
        }
Exemplo n.º 2
0
        void Plan_Delete(object sender, EventArgs e)
        {
            PlanMenuItem menu = sender as PlanMenuItem;

            if (menu == null)
            {
                return;
            }

            DialogResult result = MessageBox.Show(this, "Are you sure you want to delete:\n" + menu.Item.Title + "?", "DeOps", MessageBoxButtons.YesNo);

            if (result == DialogResult.No)
            {
                return;
            }

            Plans.LocalPlan.RemoveItem(menu.Item);

            // signal update
            View.ChangesMade();
        }
Exemplo n.º 3
0
        void Plan_Edit(object sender, EventArgs e)
        {
            PlanMenuItem menu = sender as PlanMenuItem;

            if (menu == null)
            {
                return;
            }

            if (Selected == null)
            {
                return;
            }

            EditPlanItem form = new EditPlanItem(EditItemMode.Edit, Selected, menu.Item);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                View.ChangesMade();
            }
        }