///////////////////////////////////////////////////////////////// // // (C) Copyright 2013, Kenneth, Inc. // All rights reserved. Confidential. Except as pursuant // to a written agreement with Kenneth, this software may // not be used or distributed. This software may be covered // by one or more patents. // // 本软件为Kenneth开发,版权所有,违者必究,320325198102218110,23810511@qq.com // ///////////////////////////////////////////////////////////////// using System; using System.Collections.Generic; using System.Data; using System.Reflection; using System.Windows; using GummingCommon; namespace GummingEntity { public partial class HardDTMEntity { public ushort IsAutoSetStatus { get; set; } /// /// PV value /// private decimal _PVValue; public decimal PVValue { get { return _PVValue; } set { _PVValue = value; OnPropertyChanged("PVValue"); } } /// /// PS value /// private decimal _SVValue; public decimal SVValue { get { return _SVValue; } set { _SVValue = value; OnPropertyChanged("SVValue"); } } private decimal _PValue; public decimal PValue { get { return _PValue; } set { _PValue = value; OnPropertyChanged("PValue"); } } private decimal _IValue; public decimal IValue { get { return _IValue; } set { _IValue = value; OnPropertyChanged("IValue"); } } private decimal _DValue; public decimal DValue { get { return _DValue; } set { _DValue = value; OnPropertyChanged("DValue"); } } /// /// 临时设定值 /// private decimal _HPSV; public decimal HPSV { get { return _HPSV; } set { _HPSV = value; OnPropertyChanged("HPSV"); } } /// /// 临时设定值 /// private decimal _OffsetEdit; public decimal OffsetEdit { get { return _OffsetEdit; } set { _OffsetEdit = value; OnPropertyChanged("OffsetEdit"); } } private ushort _AutoStatus; public ushort AutoStatus { get { return _AutoStatus; } set { _AutoStatus = value; OnPropertyChanged("AutoStatus"); } } private Visibility _CoolHide; public Visibility CoolHide { get { return _CoolHide; } set { _CoolHide = value; OnPropertyChanged("CoolHide"); } } } /// /// HardDTM /// [Serializable] public partial class HardDTMEntity : ViewModelBase, ICloneable { /// /// /// private string _RecId; public string RecId { get { return _RecId; } set { _RecId = value; OnPropertyChanged("RecId"); } } /// /// 站号 /// private byte _Channel; public byte Channel { get { return _Channel; } set { _Channel = value; OnPropertyChanged("Channel"); } } /// /// PV地址 /// private ushort _PVAddress; public ushort PVAddress { get { return _PVAddress; } set { _PVAddress = value; OnPropertyChanged("PVAddress"); } } /// /// SV地址 /// private ushort _SVAddress; public ushort SVAddress { get { return _SVAddress; } set { _SVAddress = value; OnPropertyChanged("SVAddress"); } } /// /// 温度写入地址 /// private ushort _WriteAddress; public ushort WriteAddress { get { return _WriteAddress; } set { _WriteAddress = value; OnPropertyChanged("WriteAddress"); } } /// /// 自整定地址 /// private ushort _ATAddress; public ushort ATAddress { get { return _ATAddress; } set { _ATAddress = value; OnPropertyChanged("ATAddress"); } } /// /// 设定值 /// private decimal _SV; public decimal SV { get { return _SV; } set { _SV = value; OnPropertyChanged("SV"); } } /// /// 偏差值 /// private decimal _Offset; public decimal Offset { get { return _Offset; } set { _Offset = value; OnPropertyChanged("Offset"); } } /// /// 报警偏差 /// private decimal _AlmOffset; public decimal AlmOffset { get { return _AlmOffset; } set { _AlmOffset = value; OnPropertyChanged("AlmOffset"); } } /// /// 端口编号 /// private string _DTMCode; public string DTMCode { get { return _DTMCode; } set { _DTMCode = value; OnPropertyChanged("DTMCode"); } } /// /// 端口名称 /// private string _DTMName; public string DTMName { get { return _DTMName; } set { _DTMName = value; OnPropertyChanged("DTMName"); } } /// /// 比例带 /// private ushort _PAddress; public ushort PAddress { get { return _PAddress; } set { _PAddress = value; OnPropertyChanged("PAddress"); } } /// /// 积分时间 /// private ushort _IAddress; public ushort IAddress { get { return _IAddress; } set { _IAddress = value; OnPropertyChanged("IAddress"); } } /// /// 微分时间 /// private ushort _DAddress; public ushort DAddress { get { return _DAddress; } set { _DAddress = value; OnPropertyChanged("DAddress"); } } /// /// 调整偏差 /// private ushort _OffsetAddress; public ushort OffsetAddress { get { return _OffsetAddress; } set { _OffsetAddress = value; OnPropertyChanged("OffsetAddress"); } } /// /// /// private int? _OrderBy; public int? OrderBy { get { return _OrderBy; } set { _OrderBy = value; OnPropertyChanged("OrderBy"); } } /// /// /// private string _CreateBy; public string CreateBy { get { return _CreateBy; } set { _CreateBy = value; OnPropertyChanged("CreateBy"); } } /// /// /// private DateTime? _CreateTime; public DateTime? CreateTime { get { return _CreateTime; } set { _CreateTime = value; OnPropertyChanged("CreateTime"); } } /// /// /// private string _ModifyBy; public string ModifyBy { get { return _ModifyBy; } set { _ModifyBy = value; OnPropertyChanged("ModifyBy"); } } /// /// /// private DateTime? _ModifyTime; public DateTime? ModifyTime { get { return _ModifyTime; } set { _ModifyTime = value; OnPropertyChanged("ModifyTime"); } } /// /// /// private int? _IsActive; public int? IsActive { get { return _IsActive; } set { _IsActive = value; OnPropertyChanged("IsActive"); } } public object Clone() { HardDTMEntity obj = new HardDTMEntity(); Type t = this.GetType(); PropertyInfo[] properties = t.GetProperties(); foreach (PropertyInfo pi in properties) { if (pi.CanWrite) { object value = pi.GetValue(this, null); if (obj.GetType().GetProperty(pi.Name) != null) { pi.SetValue(obj, value, null); } } } return obj; } } }