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(); ps.ParentForm = this; ps.Run(lvw.Text); ps = null; } }
private void Initialize() { CheckSettings(); psf = new PShell.pshell(); txtPShellOutput.Text = "psf > "; mincurpos = txtPShellOutput.Text.Length; txtPShellOutput.SelectionStart = mincurpos; scnr.ParentForm = this; cmbLibraryTypes.SelectedIndex = 1; psf.ParentForm = this; GetLibrary(); GetCommand(); }