using Newtonsoft.Json; using Prism.Mvvm; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TeamAAS_VP.Enums; namespace TeamAAS_VP.Models { /// /// 用户点动 /// [JsonObject(MemberSerialization.OptOut)] public class UserInching : BindableBase { private Guid _ID; public Guid ID { get { return _ID; } set { SetProperty(ref _ID,value); } } private string _Name; public string Name { get { return _Name; } set { SetProperty(ref _Name, value); } } private ModbusDataStore _DataStore; public ModbusDataStore DataStore { get { return _DataStore; } set { SetProperty(ref _DataStore, value); } } private ushort _DataAddress; /// /// 地址 /// public ushort DataAddress { get { return _DataAddress; } set { SetProperty(ref _DataAddress, value); } } private ushort _OnValue; public ushort OnValue { get { return _OnValue; } set { SetProperty(ref _OnValue, value); } } private ushort _OffValue; public ushort OffValue { get { return _OffValue; } set { SetProperty(ref _OffValue, value); } } private bool _State; /// /// 状态 /// [JsonIgnore] public bool State { get { return _State; } set { SetProperty(ref _State, value); } } public UserInching Clone() { return JsonConvert.DeserializeObject(JsonConvert.SerializeObject(this)); ; } } }