internal static bool ShowWarningDialogAndSaveDismissOption( string formattedTitle, string formattedMessage, string regKeyName, ButtonMode buttonMode) { var cancelled = true; var service = Services.ServiceProvider.GetService(typeof(IUIService)) as IUIService; Debug.Assert(service != null, "service should not be null"); if (service != null) { using (var dialog = new DismissableWarningDialog(formattedTitle, formattedMessage, buttonMode)) { if (service.ShowDialog(dialog) == DialogResult.OK) { cancelled = false; var showAgain = dialog.chkWarning.Checked == false; EdmUtils.SaveUserSetting(regKeyName, showAgain.ToString()); } } } return cancelled; }
internal static bool ShowWarningDialogAndSaveDismissOption( string formattedTitle, string formattedMessage, string regKeyName, ButtonMode buttonMode) { var cancelled = true; var service = Services.ServiceProvider.GetService(typeof(IUIService)) as IUIService; Debug.Assert(service != null, "service should not be null"); if (service != null) { using (var dialog = new DismissableWarningDialog(formattedTitle, formattedMessage, buttonMode)) { if (service.ShowDialog(dialog) == DialogResult.OK) { cancelled = false; var showAgain = dialog.chkWarning.Checked == false; EdmUtils.SaveUserSetting(regKeyName, showAgain.ToString()); } } } return(cancelled); }