private void RunScript(Utility.ScheduleItem sched) { if (sched != null) { PShell.pshell ps = new PShell.pshell(this); ps.ParentForm = this; ps.Run(sched); } }
private void RunScript() { if (lvwScripts.SelectedItems.Count > 0) { ListViewItem lvw = lvwScripts.SelectedItems[0]; //This needs to be a separate runspace. PShell.pshell ps = new PShell.pshell(this); ps.ParentForm = this; if (lvw.Group.Header != null && lvw.Group.Header != "General") { ps.Run(Path.Combine(lvw.Group.Header, lvw.Text)); } else { ps.Run(lvw.Text); } ps = null; } }