NotificationDialogNoDelay.xaml.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. /// NotificationDialogNoDelay.xaml 的交互逻辑
  18. /// </summary>
  19. public partial class NotificationDialogNoDelay : Window
  20. {
  21. public NotificationDialogNoDelay()
  22. {
  23. InitializeComponent();
  24. BannerColor = Brushes.DodgerBlue;
  25. }
  26. /// <summary>
  27. /// close current window
  28. /// </summary>
  29. /// <param name="sender"></param>
  30. /// <param name="e"></param>
  31. private void buttonOK_Click(object sender, RoutedEventArgs e)
  32. {
  33. Close();
  34. }
  35. /// <summary>
  36. /// Message title
  37. /// </summary>
  38. public string MessageTitle
  39. {
  40. get
  41. {
  42. return _msgTitle.Text;
  43. }
  44. set
  45. {
  46. _msgTitle.Text = value;
  47. }
  48. }
  49. /// <summary>
  50. /// Message content
  51. /// </summary>
  52. public string MessageContent
  53. {
  54. get
  55. {
  56. return _msgContent.Text;
  57. }
  58. set
  59. {
  60. _msgContent.Text = value;
  61. }
  62. }
  63. /// <summary>
  64. /// Banner color
  65. /// </summary>
  66. public Brush BannerColor
  67. {
  68. get
  69. {
  70. return topGrid.Background;
  71. }
  72. set
  73. {
  74. topGrid.Background = value;
  75. }
  76. }
  77. }
  78. }