src/Misc/EFTools/EntityDesign/UI/Views/Dialogs/DismissableWarningDialog.cs
// <summary>
//     Static method to instantiate a DismissableWarningDialog and persist the user setting to dismiss the dialog.
//     Returns a boolean indicating whether the dialog was cancelled or not.
// </summary>
// <param name="buttonMode">Either 'OKCancel' or 'YesNo'. If 'YesNo', 'Yes' will be associated with DialogResult.OK</param>
Static method to instantiate a DismissableWarningDialog and persist the user setting to dismiss the dialog.
Returns a boolean indicating whether the dialog was cancelled or not.
Static method to instantiate a DismissableWarningDialog and persist the user setting to dismiss the dialog . Returns a boolean indicating whether the dialog was cancelled or not .
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1614:ElementParameterDocumentationMustHaveText")]
        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;
        }
[ SuppressMessage ( " " , " " ) ] 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 , " " ) ; 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 ; }
Static method to instantiate a DismissableWarningDialog and persist the user setting to dismiss the dialog.
Static method to instantiate a DismissableWarningDialog and persist the user setting to dismiss the dialog .
formattedTitle
string
formattedMessage
string
regKeyName
string
buttonMode
ButtonMode
Either 'OKCancel' or 'YesNo'. If 'YesNo', 'Yes' will be associated with DialogResult.OK
Either ' OKCancel ' or ' YesNo ' . If ' YesNo ' ' Yes ' will be associated with DialogResult . OK