예제 #1
0
        private bool AllowApplicationExit()
        {
            if (!_applicationSettingsService.Settings.ConfirmApplicationShutdown)
            {
                return(true);
            }

            var confirmExitUserControl = new ConfirmExitUserControl(_applicationSettingsService);
            var exitDialogForm         = FormFactory.CreateModalSimpleDialog(confirmExitUserControl);

            return(exitDialogForm.ShowDialog(this) == DialogResult.OK);
        }