private void toolStripMenuItem2_Click(object sender, EventArgs e) { try { ListViewItem item = customShellListView.SelectedItems[0]; CmdShell cmds = (CmdShell)item.Tag; if (cmds.TaskType == TaskType.Default) { CustomShellForm form = new CustomShellForm(seConfig, itemConfig.tomcat.Uuid); form.SetUpdater(cmds); form.ShowDialog(this); shellView.Text = ""; btn_run.Enabled = false; RenderCustomShellList(); } else if (cmds.TaskType == TaskType.Timed) { TimedTaskForm form = new TimedTaskForm(itemConfig.tomcat.Index); form.setCallback(new TimedTaskForm.AsyncCallback(editTaskFinish)); form.SetUpdater(cmds); form.ShowDialog(this); } else if (cmds.TaskType == TaskType.Condition) { ConditionTaskForm form = new ConditionTaskForm(seConfig, itemConfig.tomcat.Index); form.setCallback(new ConditionTaskForm.AsyncCallback(editTaskFinish)); form.SetUpdater(cmds); form.ShowDialog(this); } } catch { } }
private void CustomTimeTaskToolStripMenuItem_Click(object sender, EventArgs e) { TimedTaskForm form = new TimedTaskForm(itemConfig.tomcat.Index); form.setCallback(new TimedTaskForm.AsyncCallback(addTimedTaskFinish)); form.ShowDialog(this); }