Beispiel #1
0
        protected override void OnClosing(CancelEventArgs e)
        {
            base.OnClosing(e);

            if (XtraMessageBox.Show(this, "Are you sure you want to close the server?", "Close Server", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                e.Cancel = true;
                return;
            }

            Session.BackUpDelay = 0;
            Session?.Save(true);

            if (SEnvir.EnvirThread == null)
            {
                return;
            }

            SEnvir.Started = false;

            while (SEnvir.EnvirThread != null)
            {
                Thread.Sleep(1);
            }
        }