MessageBoxWindow.xaml.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using ivf_tl_Entity.Entity;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Shapes;
  15. namespace ivf_tl_Manage.Win
  16. {
  17. /// <summary>
  18. /// MessageBoxWindow.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class MessageBoxWindow : Window
  21. {
  22. public MessageBoxWindow(string title,string message,Window parent)
  23. {
  24. InitializeComponent();
  25. this.Owner = parent;
  26. //this._title_TextBlock.Text = title;
  27. this._message_TextBlock.Text = message;
  28. this.Closed += (a, b) => parent.Activate();
  29. }
  30. private void Cancel_Click(object sender, RoutedEventArgs e)
  31. {
  32. this.DialogResult = false;
  33. return;
  34. }
  35. private void Ok_Click(object sender, RoutedEventArgs e)
  36. {
  37. this.DialogResult = true;
  38. return;
  39. }
  40. }
  41. }