using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BPASmartClient.Device { public class VariableMonitor { public int Id { get { return _mId; } set { _mId = value; } } private int _mId; public string VarName { get { return _mVarName; } set { _mVarName = value; } } private string _mVarName; public string PLCAddress { get { return _mPLCAddress; } set { _mPLCAddress = value; } } private string _mPLCAddress; public string Notes { get { return _mNotes; } set { _mNotes = value; } } private string _mNotes; public string ModbusTcpAddress { get { return _mModbusTcpAddress; } set { _mModbusTcpAddress = value; } } private string _mModbusTcpAddress; public string CurrentValue { get { return _mCurrentValue; } set { _mCurrentValue = value; if (_mCurrentValue == "False" || _mCurrentValue == "True") { if (_mCurrentValue == "True") StatusColor = new { r = 51, g = 232, b = 34, a = 1 }; else StatusColor = new { r = 255, g = 0, b = 0, a = 1 }; }else StatusColor = new { r = 51, g = 232, b = 34, a = 1 }; } } private string _mCurrentValue; public object StatusColor { get; set; } } }