Ejemplo n.º 1
0
 private void RunScript(Utility.ScheduleItem sched)
 {
     if (sched != null)
     {
         PShell.pshell ps = new PShell.pshell(this);
         ps.ParentForm = this;
         ps.Run(sched);
     }
 }
Ejemplo n.º 2
0
 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;
     }
 }