RecipeAlarmedDialog.xaml.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Navigation;
  13. using System.Windows.Shapes;
  14. namespace Aitex.Core.UI.Dialog
  15. {
  16. /// <summary>
  17. /// Interaction logic for RecipeAlarmedDialog.xaml
  18. /// </summary>
  19. public partial class RecipeAlarmedDialog : Window
  20. {
  21. public RecipeAlarmedDialog()
  22. {
  23. InitializeComponent();
  24. BannerColor = Brushes.Red;
  25. }
  26. public string MessageTitle
  27. {
  28. get
  29. {
  30. return _msgTitle.Text;
  31. }
  32. set
  33. {
  34. _msgTitle.Text = value;
  35. }
  36. }
  37. public string MessageContent
  38. {
  39. get
  40. {
  41. return _msgContent.Text;
  42. }
  43. set
  44. {
  45. _msgContent.Text = value;
  46. }
  47. }
  48. public Brush BannerColor
  49. {
  50. get
  51. {
  52. return topGrid.Background;
  53. }
  54. set
  55. {
  56. topGrid.Background = value;
  57. }
  58. }
  59. public Action ResumeRecipe;
  60. public Action AbortRecipe;
  61. private void buttonContinue_Click(object sender, RoutedEventArgs e)
  62. {
  63. if (ResumeRecipe != null)
  64. ResumeRecipe();
  65. //Close();
  66. Hide();
  67. }
  68. private void buttonAbort_Click(object sender, RoutedEventArgs e)
  69. {
  70. if (AbortRecipe != null)
  71. AbortRecipe();
  72. Hide();
  73. }
  74. }
  75. }