public bool Confirm(string question) { ConfirmationWindow confirmationWindow = new ConfirmationWindow(question, string.Format("{0},{1}", Resources.Yes, Resources.No), "White"); confirmationWindow.ShowDialog(); return(confirmationWindow.Tag.ToString() == Resources.Yes); }
public string AskQuestion(string question, string buttons, string backgroundColor) { ConfirmationWindow confirmationWindow = new ConfirmationWindow(question, buttons, backgroundColor) { Owner = Application.Current.MainWindow }; ConfirmationWindow confirmationWindow1 = confirmationWindow; if (LocalSettings.WindowScale > 0) { ScaleTransform layoutTransform = confirmationWindow1.LayoutTransform as ScaleTransform; if (layoutTransform != null) { layoutTransform.ScaleX = LocalSettings.WindowScale; layoutTransform.ScaleY = LocalSettings.WindowScale; } } confirmationWindow1.ShowDialog(); return(confirmationWindow1.Tag.ToString()); }