コード例 #1
0
ファイル: MainForm.cs プロジェクト: W0nderCat/eve-o-preview
        private void MainFormClosing_Handler(object sender, FormClosingEventArgs e)
        {
            ViewCloseRequest request = new ViewCloseRequest();

            this.FormCloseRequested?.Invoke(request);

            e.Cancel = !request.Allow;
        }
コード例 #2
0
        private void Close(ViewCloseRequest request)
        {
            if (this._exitApplication || !this.View.MinimizeToTray)
            {
                this._thumbnailManager.Deactivate();
                this._configurationStorage.Save();
                request.Allow = true;
                return;
            }

            request.Allow = false;
            this.View.Minimize();
        }