Changeset 854 for branches/eraser6/Eraser/SchedulerPanel.cs
- Timestamp:
- 1/5/2009 10:01:55 AM (3 years ago)
- File:
-
- 1 edited
-
branches/eraser6/Eraser/SchedulerPanel.cs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Eraser/SchedulerPanel.cs
r787 r854 32 32 using System.Globalization; 33 33 using System.Runtime.InteropServices; 34 using System.Diagnostics; 34 35 35 36 namespace Eraser … … 120 121 //Display a balloon notification if the parent frame has been minimised. 121 122 MainForm parent = (MainForm)FindForm(); 123 Debug.Assert(parent != null); 122 124 if (parent.WindowState == FormWindowState.Minimized || !parent.Visible) 123 125 { … … 285 287 private void schedulerMenu_Opening(object sender, CancelEventArgs e) 286 288 { 287 //If nothing's selected, don't show the menu 289 //If nothing's selected, show the Scheduler menu which just allows users to 290 //create new tasks (like from the toolbar) 288 291 if (scheduler.SelectedItems.Count == 0) 289 292 { 293 schedulerDefaultMenu.Show(schedulerMenu.Left, schedulerMenu.Top); 290 294 e.Cancel = true; 291 295 return; … … 307 311 !((Task)scheduler.SelectedItems[0].Tag).Executing; 308 312 deleteTaskToolStripMenuItem.Enabled = !aTaskExecuting; 313 } 314 315 /// <summary> 316 /// Occurs when the user selects the New Task context menu item. 317 /// </summary> 318 /// <param name="sender">The menu which generated this event.</param> 319 /// <param name="e">Event argument.</param> 320 private void newTaskToolStripMenuItem_Click(object sender, EventArgs e) 321 { 322 using (TaskPropertiesForm form = new TaskPropertiesForm()) 323 { 324 if (form.ShowDialog() == DialogResult.OK) 325 { 326 Task task = form.Task; 327 Program.eraserClient.AddTask(ref task); 328 } 329 } 309 330 } 310 331
Note: See TracChangeset
for help on using the changeset viewer.
