AlarmView.xaml.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Windows.Controls;
  2. using Aitex.Core.UI.View.Common;
  3. namespace MECF.Framework.UI.Client.CenterViews.Alarms.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\nTime:{2}\r\n\r\nDescription:{3}",
  20. item.Type,
  21. item.EventEnum,
  22. //item.EventId, Event Number:{ 2}\r\n\r\n
  23. item.OccuringTime,
  24. item.Description
  25. //item.Solution \r\n\r\nSolution:{ 5}
  26. );
  27. }
  28. else
  29. {
  30. AnalysisText.Text = string.Empty;
  31. }
  32. }
  33. }
  34. }