/// <summary> /// Default constructor. /// </summary> /// <param name="parentForm">The connection form that will display the PowerShell console.</param> /// <param name="terminal">Terminal control that will display the PowerShell console.</param> /// <param name="executeHelper">Method used to execute PowerShell commands within the current session.</param> /// <param name="progressBar">Progress bar UI element to update when writing progress records.</param> /// <param name="progressLabel">Label UI element to update when writing progress records.</param> public PowerShellHost( PowerShellConnectionForm parentForm, TerminalControl terminal, Func<string, Collection<PSObject>> executeHelper, ToolStripProgressBar progressBar, ToolStripStatusLabel progressLabel) { _parentForm = parentForm; _powerShellHostUi = new PowerShellHostUi(terminal, executeHelper, progressBar, progressLabel); }
/// <summary> /// Default constructor. /// </summary> /// <param name="terminal">Terminal control that will display the PowerShell console.</param> /// <param name="executeHelper">Method used to execute PowerShell commands within the current session.</param> /// <param name="progressBar">Progress bar UI element to update when writing progress records.</param> /// <param name="progressLabel">Label UI element to update when writing progress records.</param> public PowerShellHostUi( TerminalControl terminal, Func<string, Collection<PSObject>> executeHelper, ToolStripProgressBar progressBar, ToolStripStatusLabel progressLabel) { _terminal = terminal; _powerShellRawUi = new PowerShellRawUi(terminal); _executeHelper = executeHelper; _progressBar = progressBar; _progressLabel = progressLabel; }