AlarmView.xaml.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Windows.Controls;
  2. using Aitex.Core.UI.View.Common;
  3. namespace VirgoUI.Client.Models.Operate.Alarm
  4. {
  5. /// <summary>
  6. /// AlarmView.xaml 的交互逻辑
  7. /// </summary>
  8. public partial class AlarmView : UserControl
  9. {
  10. public AlarmView()
  11. {
  12. InitializeComponent();
  13. }
  14. private void listView1_SelectionChanged(object sender, SelectionChangedEventArgs e)
  15. {
  16. if (e.AddedItems.Count == 1)
  17. {
  18. var item = e.AddedItems[0] as AlarmItem;
  19. AnalysisText.Text = string.Format("Event Type:{0}\r\n\r\nEvent Name:{1}\r\n\r\nEvent Number:{2}\r\n\r\nTime:{3}\r\n\r\nDescription:{4}\r\n\r\nSolution:{5}",
  20. item.Type,
  21. item.EventEnum,
  22. item.EventId,
  23. item.OccuringTime,
  24. item.Description,
  25. item.Solution);
  26. }
  27. else
  28. {
  29. AnalysisText.Text = string.Empty;
  30. }
  31. }
  32. }
  33. }