protected void OnShowConsoleClicked(object sender, EventArgs e) { if (consoleWindow == null) { consoleWindow = new CoverageConsoleWindow(); consoleWindow.Destroyed += HandleConsoleWindowDestroyed; } consoleWindow.ShowAll(); }
void HandleConsoleWindowDestroyed(object sender, EventArgs e) { consoleWindow.Destroyed -= HandleConsoleWindowDestroyed; consoleWindow = null; }