57 lines
1.5 KiB
C#
57 lines
1.5 KiB
C#
using System.Text;
|
||
using System.Windows.Controls;
|
||
using Aitex.Core.UI.View.Common;
|
||
|
||
namespace MECF.Framework.UI.Client.CenterViews.Alarms.Alarm
|
||
{
|
||
/// <summary>
|
||
/// AlarmView.xaml 的交互逻辑
|
||
/// </summary>
|
||
public partial class AlarmView : UserControl
|
||
{
|
||
public AlarmView()
|
||
{
|
||
InitializeComponent();
|
||
}
|
||
|
||
private void listView1_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||
{
|
||
if (e.AddedItems.Count == 1)
|
||
{
|
||
var item = e.AddedItems[0] as AlarmItem;
|
||
var sb = new StringBuilder();
|
||
sb.Append("Event Type:");
|
||
sb.Append(item.Type);
|
||
sb.AppendLine();
|
||
sb.AppendLine();
|
||
|
||
sb.Append("Event Source:");
|
||
sb.Append(item.Source);
|
||
sb.AppendLine();
|
||
sb.AppendLine();
|
||
|
||
sb.Append("Event Name:");
|
||
sb.Append(item.EventEnum);
|
||
sb.AppendLine();
|
||
sb.AppendLine();
|
||
|
||
sb.Append("Time:");
|
||
sb.Append(item.OccuringTime);
|
||
sb.AppendLine();
|
||
sb.AppendLine();
|
||
|
||
sb.Append("nDescription:");
|
||
sb.Append(item.Description);
|
||
sb.AppendLine();
|
||
sb.AppendLine();
|
||
|
||
AnalysisText.Text = sb.ToString();
|
||
}
|
||
else
|
||
{
|
||
AnalysisText.Text = string.Empty;
|
||
}
|
||
}
|
||
}
|
||
}
|