public void Dispose() { if (Lookup != null) { Lookup.Exit(); } var copyList = new List <OpCore>(); Cores.SafeForEach(c => copyList.Add(c)); copyList.ForEach(c => c.Exit()); }
public void Logout(OpCore core) { core.Exit(); if (InstanceChange != null) { InstanceChange(core.Sim, InstanceChangeType.Update); } }
void Menu_Exit(object sender, EventArgs e) { CleanupTray(); if (Core.Sim == null) { Core.Exit(); } }
void LogoffButton_Click(object sender, EventArgs e) { try { if (Core == null) { return; } Core.UpdateConsole -= Core_UpdateConsole; Core.Exit(); Core = null; StatusLabel.Text = "Logged off"; } catch (Exception ex) { StatusLabel.Text = "Logoff error: " + ex.Message; } }
private void IMForm_FormClosing(object sender, FormClosingEventArgs e) { while (ExternalViews.Count > 0) { // safe close removes entry from external views if (!ExternalViews[0].SafeClose()) { e.Cancel = true; return; } } UI.ShowView -= ShowExternal; UI.GuiMain = null; if (Core.Sim == null) { Core.Exit(); } }