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