Files
SamplePreSystem-CS/SamplePreSystem.UI/ViewModel/Monitor/FaultInfo.cs
2026-04-30 11:34:41 +08:00

58 lines
1.3 KiB
C#

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 // 严重错误
}
}