using Prism.Mvvm; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FATrace.WPLApp.Models { /// /// 系统运行状态模型 /// public class SysRunState : BindableBase { private int _RunState = 1; /// /// 运行状态 /// public int RunState { get { return _RunState; } set { if (_RunState != value) { _RunState = value; switch (value) { case 1: RunStateMsg = "正常"; break; case 2: RunStateMsg = "异常"; break; default: break; } RaisePropertyChanged(); } } } private string? _RunStateMsg = "正常"; /// /// 运行状态消息 /// public string? RunStateMsg { get { return _RunStateMsg; } set { _RunStateMsg = value; RaisePropertyChanged(); } } private int _ComState = 0; /// /// 通讯状态 /// public int ComState { get { return _ComState; } set { if (_ComState != value) { _ComState = value; switch (value) { case 1: ComMsg = "正常"; break; case 2: ComMsg = "异常"; break; default: break; } RaisePropertyChanged(); } } } private string? _ComMsg; /// /// 通讯状态消息 /// public string? ComMsg { get { return _ComMsg; } set { _ComMsg = value; RaisePropertyChanged(); } } } }