Esempio n. 1
0
        private void PlanList_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            PlanListItem item = PlanList.GetItemAt(e.Location) as PlanListItem;

            if (item == null)
            {
                return;
            }

            if (Selected == null)
            {
                return;
            }

            bool local = (Selected.Person == Core.UserID);

            EditItemMode mode = local ? EditItemMode.Edit : EditItemMode.View;
            EditPlanItem form = new EditPlanItem(mode, Selected, item.Item);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                if (local)
                {
                    View.ChangesMade();
                }
            }
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
        private void AddItemLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            PlanItem item = new PlanItem();

            item.Ident    = Head.Ident;
            item.Project  = Head.Project;
            item.BranchUp = Selected.BranchDown;
            //item.Start = Core.TimeNow.ToUniversalTime();
            //item.End = Selected.End;

            EditPlanItem form = new EditPlanItem(EditItemMode.New, Selected, item);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                Plans.LocalPlan.AddItem(form.Editing);
                View.ChangesMade();
            }
        }
Esempio n. 4
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();
            }
        }
Esempio n. 5
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);
        }
Esempio n. 6
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();
        }
Esempio n. 7
0
        private void PlanList_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            PlanListItem item = PlanList.GetItemAt(e.Location) as PlanListItem;

            if (item == null)
                return;

            if (Selected == null)
                return;

            bool local = (Selected.Person == Core.UserID);

            EditItemMode mode = local ? EditItemMode.Edit : EditItemMode.View;
            EditPlanItem form = new EditPlanItem(mode, Selected, item.Item);

            if (form.ShowDialog(this) == DialogResult.OK)
                if(local)
                    View.ChangesMade();
        }
Esempio n. 8
0
        private void AddItemLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            PlanItem item = new PlanItem();
            item.Ident = Head.Ident;
            item.Project = Head.Project;
            item.BranchUp = Selected.BranchDown;
            //item.Start = Core.TimeNow.ToUniversalTime();
            //item.End = Selected.End;

            EditPlanItem form = new EditPlanItem(EditItemMode.New, Selected, item);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                Plans.LocalPlan.AddItem(form.Editing);
                View.ChangesMade();
            }
        }