MessageDialogViewModel.cs 579 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Windows.Controls;
  3. using MECF.Framework.UI.Client.ClientBase;
  4. namespace OpenSEMI.ClientBase
  5. {
  6. public class MessageDialogViewModel : MessageDialog
  7. {
  8. protected override void OnInitialize()
  9. {
  10. base.OnInitialize();
  11. this.DisplayName = "Dialog Box";
  12. }
  13. public void OnButtonClick(object sender)
  14. {
  15. Button m_btn = sender as Button;
  16. DialogResult = (DialogButton)Enum.Parse(typeof(DialogButton), m_btn.Content.ToString());
  17. TryClose();
  18. }
  19. }
  20. }