public static void ShowDialog(string message, string title, EventHandler callback, bool cancelButton = false) { ConfirmationWindow window = new ConfirmationWindow() { Message = message, Title = title }; if (cancelButton) window.CancelButton.Visibility = Visibility.Visible; if (callback != null) window.Closed += callback; window.Show(); }
public static void ShowDialog(string message, EventHandler callback) { ConfirmationWindow window = new ConfirmationWindow() { Message = message }; if (callback != null) { window.Closed += callback; } window.Show(); }
public static void ShowDialog(string message, string title, EventHandler callback, bool cancelButton = false) { ConfirmationWindow window = new ConfirmationWindow() { Message = message, Title = title }; if (cancelButton) { window.CancelButton.Visibility = Visibility.Visible; } if (callback != null) { window.Closed += callback; } window.Show(); }
private void ResetItemCache(object sender, RoutedEventArgs e) { ConfirmationWindow.ShowDialog("Are you sure you'd like to clear and redownload the item cache?\r\n\r\nWARNING: This will also unload the current character, so be sure to save first!", new EventHandler(ResetItemCaches_Confirmation)); }