/// <summary> /// Starts the task. /// </summary> /// <param name="task">The task.</param> /// <param name="settings">The settings.</param> public static void StartTask(Task task, Settings settings) { FormTask form = new FormTask(); form.task = task; form.settings = settings; form.Show(); }
private void listView1_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count == 0) { return; } FormTask.StartTask((Task)listView1.SelectedItems[0].Tag, settings); Hide(); }
private void MenuItem_Click(object sender, EventArgs e) { if (!(sender is ToolStripMenuItem)) { return; } ToolStripMenuItem item = (ToolStripMenuItem)sender; if (item.Tag == null) { return; } if (!(item.Tag is Task)) { return; } FormTask.StartTask((Task)item.Tag, applicationManager.Settings); }