ConfirmationDialog.cs 494 B

123456789101112131415161718
  1. using PixiEditor.Models.Enums;
  2. using PixiEditor.Views;
  3. namespace PixiEditor.Models.Dialogs
  4. {
  5. public static class ConfirmationDialog
  6. {
  7. public static ConfirmationType Show(string message)
  8. {
  9. var popup = new ConfirmationPopup
  10. {
  11. Body = message
  12. };
  13. if ((bool) popup.ShowDialog()) return popup.Result ? ConfirmationType.Yes : ConfirmationType.No;
  14. return ConfirmationType.Canceled;
  15. }
  16. }
  17. }