internal static bool ShowSecurityWarningDialog(IServiceProvider serviceProvider) { serviceProvider.GetService(typeof(STextTemplating)); bool cancel = false; if (showWarningDialogValue) { SecurityWarningDialog.ShowSecurityWarningDialog(serviceProvider, out cancel, out showWarningDialogValue); instance.SaveSettingsToStorage(); } return(cancel); }
internal static void ShowSecurityWarningDialog(IServiceProvider provider, out bool cancel, out bool showAgain) { cancel = true; showAgain = true; IUIService service = provider.GetService(typeof(IUIService)) as IUIService; if (service != null) { SecurityWarningDialog form = new SecurityWarningDialog(provider); if (service.ShowDialog(form) == DialogResult.OK) { cancel = false; showAgain = !form.doNotShowCheckBox.Checked; } } }