void diabloProcess_Exited(object sender, EventArgs e) { if (this.InvokeRequired) { try { this.Invoke(new ProcessExitedDelegate(diabloProcess_Exited), sender, e); } catch (Exception) { } } else { diabloPanel.ReleaseDiabloWindow(); if (diabloWindow != null) { diabloWindow.Close(); diabloWindow = null; } //ConsoleTab.WriteLine("Closed " + ((Process)sender).StartInfo.FileName); } }
private void ReleaseAll() { if (dhpActiveMain.DiabloWindow != null) { dhpActiveMain.ReleaseDiabloWindow(); } foreach (TabPage tab in this.tabControl1.TabPages) { if (tab is DiabloTab) { DiabloHostPanel diabloPanel = tab.Controls[0] as DiabloHostPanel; if (diabloPanel != null) { diabloPanel.ReleaseDiabloWindow(); } } } }