public ConEmuExecutionHost(Core core, ConEmuControl control, string conEmuExe) { this.core = core; this.control = control; this.conEmuExe = conEmuExe; backupHost = new DefaultExecutionHost(); config = LoadConfigFromResource(); StartPowerShellExecutionHost(); this.core.ConfigReloaded += CoreConfigReloadedHandler; }
public SetupForm(Core core) { this.core = core; core.ConfigReloaded += CoreConfigReloadedHandler; core.AllAppStateChanged += CoreAllAppStateChangedHandler; core.AppStateChanged += CoreAppStateChangedHandler; core.BusyChanged += CoreBusyChangedHandler; core.ActionStateChanged += CoreActionStateChangedHandler; InitializeComponent(); gridApps.DoubleBuffered(true); InitializeConsole(); gridApps.AutoGenerateColumns = false; }
public MainForm(Core core) { this.core = core; core.AllAppStateChanged += AppStateChangedHandler; core.AppStateChanged += AppStateChangedHandler; core.ConfigReloaded += ConfigReloadedHandler; core.BusyChanged += CoreBusyChangedHandler; InitializeComponent(); InitializeAppLauncherList(); InitializeDocsMenu(); InitializeTopPanel(); InitializeStatusStrip(); }
public static int Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var rootPath = GetBenchRoot(args); if (rootPath == null) { MessageBox.Show( "Initialization failed. Could not determine the root path of Bench." + Environment.NewLine + "Use the -root switch to provide the Bench root path.", "Bench", MessageBoxButtons.OK, MessageBoxIcon.Warning); return 1; } if (!Directory.Exists(rootPath)) { MessageBox.Show( "Initialization failed. Root path of bench not found." + Environment.NewLine + Environment.NewLine + rootPath, "Bench", MessageBoxButtons.OK, MessageBoxIcon.Warning); return 1; } BenchTasks.UninstallBlacklist.Add(AppKeys.ConEmu); Core = new Core(rootPath); Core.SetupOnStartup = IsImmediateSetupRequested(args); var mainForm = new MainForm(Core); Core.GuiContext = mainForm; var ui = Core.UI as WinFormsUserInterface; if (ui != null) ui.ParentWindow = mainForm; Application.ApplicationExit += ApplicationExitHandler; Application.Run(mainForm); Core.Dispose(); return 0; }