添加项目文件。
This commit is contained in:
57
SamplePreSystem.UI/ViewModel/Monitor/FaultInfo.cs
Normal file
57
SamplePreSystem.UI/ViewModel/Monitor/FaultInfo.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
//using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace SamplePreSystem.UI.ViewModel.Monitor
|
||||
{
|
||||
/// <summary>
|
||||
/// 监控故障信息实体
|
||||
/// </summary>
|
||||
public class FaultInfo :INotifyPropertyChanged
|
||||
{
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
public string FaultName { get; set; } // 故障名称
|
||||
|
||||
public string FaultDesc { get; set; } // 故障描述
|
||||
public FaultType FaultType { get; set; } // 故障类型
|
||||
|
||||
private Brush runColor = Brushes.Orange;
|
||||
|
||||
|
||||
|
||||
public Brush RunColor
|
||||
{
|
||||
get { return runColor; }
|
||||
set
|
||||
{
|
||||
runColor = value;
|
||||
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 定义故障类型枚举
|
||||
public enum FaultType
|
||||
{
|
||||
Warning = 0, // 警告
|
||||
Error = 1, // 错误
|
||||
Critical = 2, // 严重错误
|
||||
Run = 3 // 严重错误
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user