private MessageBoxResult ShowInternalMessage(Window owner, string checkBoxMessage, string message, string caption, string automationId, MessageBoxButton button, MessageBoxImage image, string hyperlinkMessage, Uri hyperlinkUri, IDictionary <MessageChoice, string> textOverrides, MessageChoice defaultChoice, out bool dontAskAgain) { if (owner == null) { owner = this.useWin32MessageBox ? (Window)null : Dialog.ActiveModalWindow; } if (caption == null) { caption = this.defaultCaption; } bool flag1 = !string.IsNullOrEmpty(checkBoxMessage); int num1 = flag1 ? 1 : 0; bool flag2 = !string.IsNullOrEmpty(hyperlinkMessage); int num2 = flag2 ? 1 : 0; if (this.useWin32MessageBox || owner == null) { dontAskAgain = false; return(Win32MessageBox.Show(message, caption, button, image)); } MessageIcon fromMessageBoxImage = this.GetMessageIconFromMessageBoxImage(image); MessageChoice messageBoxButton = this.GetMessageChoicesFromMessageBoxButton(button); MessageWindow messageWindow = new MessageWindow((IMessageDisplayService)this, checkBoxMessage, owner, fromMessageBoxImage, caption, message, automationId, messageBoxButton, textOverrides, defaultChoice); messageWindow.EnableDontAskAgain = flag1; messageWindow.ShowHyperlink = flag2; messageWindow.HyperlinkMessage = hyperlinkMessage; messageWindow.HyperlinkUri = hyperlinkUri; using (TemporaryCursor.SetCursor(Cursors.Arrow)) messageWindow.ShowDialog(); dontAskAgain = messageWindow.DontAskAgain; return(this.GetMessageBoxResultFromMessageChoice(messageWindow.Result)); }
public static IDisposable SetWaitCursor() { return(TemporaryCursor.SetCursor(Cursors.Wait)); }