AlarmDetailWindow.xaml.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using ivf_tl_Entity.Entity.Alarm;
  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. /// AlarmDetailWindow.xaml 的交互逻辑
  19. /// </summary>
  20. public partial class AlarmDetailWindow : Window
  21. {
  22. public AlarmDetailWindow(AlarmHistoryEntity alarmHistoryEntity, Window w)
  23. {
  24. InitializeComponent();
  25. AlarmHistorySource = alarmHistoryEntity;
  26. this.Owner = w;
  27. this.Unloaded += (s, e) => w.Activate();
  28. }
  29. public AlarmHistoryEntity AlarmHistorySource
  30. {
  31. get { return (AlarmHistoryEntity)GetValue(AlarmHistorySourceProperty); }
  32. set { SetValue(AlarmHistorySourceProperty, value); }
  33. }
  34. // Using a DependencyProperty as the backing store for AlarmHistorySource. This enables animation, styling, binding, etc...
  35. public static readonly DependencyProperty AlarmHistorySourceProperty =
  36. DependencyProperty.Register("AlarmHistorySource", typeof(AlarmHistoryEntity), typeof(AlarmDetailWindow), new PropertyMetadata(null));
  37. private void StartDish_Click(object sender, RoutedEventArgs e)
  38. {
  39. this.DialogResult = true;
  40. this.Close();
  41. return;
  42. }
  43. private void Close_Click(object sender, RoutedEventArgs e)
  44. {
  45. this.DialogResult = false;
  46. this.Close();
  47. return;
  48. }
  49. }
  50. }