Exemple #1
0
        public void Dispose()
        {
            if (Lookup != null)
            {
                Lookup.Exit();
            }

            var copyList = new List <OpCore>();

            Cores.SafeForEach(c => copyList.Add(c));
            copyList.ForEach(c => c.Exit());
        }
Exemple #2
0
        public void Logout(OpCore core)
        {
            core.Exit();

            if (InstanceChange != null)
            {
                InstanceChange(core.Sim, InstanceChangeType.Update);
            }
        }
Exemple #3
0
        void Menu_Exit(object sender, EventArgs e)
        {
            CleanupTray();

            if (Core.Sim == null)
            {
                Core.Exit();
            }
        }
Exemple #4
0
        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;
            }
        }
Exemple #5
0
        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();
            }
        }