Пример #1
0
        private void NewButton_Click(object sender, EventArgs e)
        {
            EditBlock form = new EditBlock(BlockViewMode.New, this, null);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                ChangesMade();
                Plans_Update(Plans.LocalPlan);
            }
        }
Пример #2
0
        private void RClickView(object sender, EventArgs e)
        {
            BlockMenuItem menu = sender as BlockMenuItem;

            if (menu == null)
            {
                return;
            }

            EditBlock form = new EditBlock(BlockViewMode.Show, View, menu.Block);

            form.ShowDialog(View);
        }
Пример #3
0
        private void RClickEdit(object sender, EventArgs e)
        {
            BlockMenuItem menu = sender as BlockMenuItem;

            if (menu == null)
            {
                return;
            }

            EditBlock form = new EditBlock(BlockViewMode.Edit, View, menu.Block);

            if (form.ShowDialog(View) == DialogResult.OK)
            {
                View.RefreshRows();
                View.ChangesMade();
            }
        }
Пример #4
0
        private void BlockRow_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            foreach (BlockArea area in BlockAreas)
            {
                if (area.Local && area.Rect.Contains(e.Location))
                {
                    BlockViewMode mode = (UserID == View.Core.UserID) ? BlockViewMode.Edit : BlockViewMode.Show;

                    EditBlock form = new EditBlock(mode, View, area.Block);
                    if (form.ShowDialog(View) == DialogResult.OK && mode == BlockViewMode.Edit)
                    {
                        View.ChangesMade();
                    }

                    break;
                }
            }
        }
Пример #5
0
        private void NewButton_Click(object sender, EventArgs e)
        {
            EditBlock form = new EditBlock(BlockViewMode.New, this, null);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                ChangesMade();
                Plans_Update(Plans.LocalPlan);
            }
        }
Пример #6
0
        private void RClickView(object sender, EventArgs e)
        {
            BlockMenuItem menu = sender as BlockMenuItem;

            if (menu == null)
                return;

            EditBlock form = new EditBlock(BlockViewMode.Show, View, menu.Block);
            form.ShowDialog(View);
        }
Пример #7
0
        private void RClickEdit(object sender, EventArgs e)
        {
            BlockMenuItem menu = sender as BlockMenuItem;

            if (menu == null)
                return;

            EditBlock form = new EditBlock(BlockViewMode.Edit, View, menu.Block);

            if (form.ShowDialog(View) == DialogResult.OK)
            {
                View.RefreshRows();
                View.ChangesMade();
            }
        }
Пример #8
0
        private void BlockRow_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            foreach (BlockArea area in BlockAreas)
                if (area.Local && area.Rect.Contains(e.Location))
                {
                    BlockViewMode mode = (UserID == View.Core.UserID) ? BlockViewMode.Edit : BlockViewMode.Show;

                    EditBlock form = new EditBlock(mode, View, area.Block);
                    if (form.ShowDialog(View) == DialogResult.OK && mode == BlockViewMode.Edit)
                        View.ChangesMade();

                    break;
                }
        }