Exemple #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);
            }
        }
Exemple #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);
        }
Exemple #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();
            }
        }
Exemple #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;
                }
            }
        }
Exemple #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);
            }
        }
Exemple #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);
        }
Exemple #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();
            }
        }
Exemple #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;
                }
        }