示例#1
0
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            switch (e.CloseReason)
            {
            case CloseReason.None:
            case CloseReason.UserClosing:
                if (!EditorActions.ContinueOnFileDrop(this, "Exit"))
                {
                    e.Cancel = true;
                }
                break;
            }

            if (!e.Cancel)
            {
                // Always save window properties on exit and resave config!
                SaveWindowLayout(_editor.Configuration);
                Configuration.SaveWindowProperties(this, _editor.Configuration);
                _editor.ConfigurationChange(false, false, false, true);
            }

            base.OnFormClosing(e);
        }