|
|
/////////////////////////////////////////////////////////////////
|
|
|
//
|
|
|
// (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; }
|
|
|
/// <summary>
|
|
|
/// PV value
|
|
|
/// </summary>
|
|
|
private decimal _PVValue;
|
|
|
public decimal PVValue
|
|
|
{
|
|
|
get { return _PVValue; }
|
|
|
set
|
|
|
{
|
|
|
_PVValue = value;
|
|
|
OnPropertyChanged("PVValue");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// PS value
|
|
|
/// </summary>
|
|
|
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");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 临时设定值
|
|
|
/// </summary>
|
|
|
private decimal _HPSV;
|
|
|
public decimal HPSV
|
|
|
{
|
|
|
get { return _HPSV; }
|
|
|
set
|
|
|
{
|
|
|
_HPSV = value;
|
|
|
OnPropertyChanged("HPSV");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 临时设定值
|
|
|
/// </summary>
|
|
|
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");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// HardDTM
|
|
|
/// </summary>
|
|
|
[Serializable]
|
|
|
public partial class HardDTMEntity : ViewModelBase, ICloneable
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private string _RecId;
|
|
|
public string RecId
|
|
|
{
|
|
|
get { return _RecId; }
|
|
|
set
|
|
|
{
|
|
|
_RecId = value;
|
|
|
OnPropertyChanged("RecId");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 站号
|
|
|
/// </summary>
|
|
|
private byte _Channel;
|
|
|
public byte Channel
|
|
|
{
|
|
|
get { return _Channel; }
|
|
|
set
|
|
|
{
|
|
|
_Channel = value;
|
|
|
OnPropertyChanged("Channel");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// PV地址
|
|
|
/// </summary>
|
|
|
private ushort _PVAddress;
|
|
|
public ushort PVAddress
|
|
|
{
|
|
|
get { return _PVAddress; }
|
|
|
set
|
|
|
{
|
|
|
_PVAddress = value;
|
|
|
OnPropertyChanged("PVAddress");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// SV地址
|
|
|
/// </summary>
|
|
|
private ushort _SVAddress;
|
|
|
public ushort SVAddress
|
|
|
{
|
|
|
get { return _SVAddress; }
|
|
|
set
|
|
|
{
|
|
|
_SVAddress = value;
|
|
|
OnPropertyChanged("SVAddress");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 温度写入地址
|
|
|
/// </summary>
|
|
|
private ushort _WriteAddress;
|
|
|
public ushort WriteAddress
|
|
|
{
|
|
|
get { return _WriteAddress; }
|
|
|
set
|
|
|
{
|
|
|
_WriteAddress = value;
|
|
|
OnPropertyChanged("WriteAddress");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 自整定地址
|
|
|
/// </summary>
|
|
|
private ushort _ATAddress;
|
|
|
public ushort ATAddress
|
|
|
{
|
|
|
get { return _ATAddress; }
|
|
|
set
|
|
|
{
|
|
|
_ATAddress = value;
|
|
|
OnPropertyChanged("ATAddress");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 设定值
|
|
|
/// </summary>
|
|
|
private decimal _SV;
|
|
|
public decimal SV
|
|
|
{
|
|
|
get { return _SV; }
|
|
|
set
|
|
|
{
|
|
|
_SV = value;
|
|
|
OnPropertyChanged("SV");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 偏差值
|
|
|
/// </summary>
|
|
|
private decimal _Offset;
|
|
|
public decimal Offset
|
|
|
{
|
|
|
get { return _Offset; }
|
|
|
set
|
|
|
{
|
|
|
_Offset = value;
|
|
|
OnPropertyChanged("Offset");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 报警偏差
|
|
|
/// </summary>
|
|
|
private decimal _AlmOffset;
|
|
|
public decimal AlmOffset
|
|
|
{
|
|
|
get { return _AlmOffset; }
|
|
|
set
|
|
|
{
|
|
|
_AlmOffset = value;
|
|
|
OnPropertyChanged("AlmOffset");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 端口编号
|
|
|
/// </summary>
|
|
|
private string _DTMCode;
|
|
|
public string DTMCode
|
|
|
{
|
|
|
get { return _DTMCode; }
|
|
|
set
|
|
|
{
|
|
|
_DTMCode = value;
|
|
|
OnPropertyChanged("DTMCode");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 端口名称
|
|
|
/// </summary>
|
|
|
private string _DTMName;
|
|
|
public string DTMName
|
|
|
{
|
|
|
get { return _DTMName; }
|
|
|
set
|
|
|
{
|
|
|
_DTMName = value;
|
|
|
OnPropertyChanged("DTMName");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 比例带
|
|
|
/// </summary>
|
|
|
private ushort _PAddress;
|
|
|
public ushort PAddress
|
|
|
{
|
|
|
get { return _PAddress; }
|
|
|
set
|
|
|
{
|
|
|
_PAddress = value;
|
|
|
OnPropertyChanged("PAddress");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 积分时间
|
|
|
/// </summary>
|
|
|
private ushort _IAddress;
|
|
|
public ushort IAddress
|
|
|
{
|
|
|
get { return _IAddress; }
|
|
|
set
|
|
|
{
|
|
|
_IAddress = value;
|
|
|
OnPropertyChanged("IAddress");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 微分时间
|
|
|
/// </summary>
|
|
|
private ushort _DAddress;
|
|
|
public ushort DAddress
|
|
|
{
|
|
|
get { return _DAddress; }
|
|
|
set
|
|
|
{
|
|
|
_DAddress = value;
|
|
|
OnPropertyChanged("DAddress");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 调整偏差
|
|
|
/// </summary>
|
|
|
private ushort _OffsetAddress;
|
|
|
public ushort OffsetAddress
|
|
|
{
|
|
|
get { return _OffsetAddress; }
|
|
|
set
|
|
|
{
|
|
|
_OffsetAddress = value;
|
|
|
OnPropertyChanged("OffsetAddress");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private int? _OrderBy;
|
|
|
public int? OrderBy
|
|
|
{
|
|
|
get { return _OrderBy; }
|
|
|
set
|
|
|
{
|
|
|
_OrderBy = value;
|
|
|
OnPropertyChanged("OrderBy");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private string _CreateBy;
|
|
|
public string CreateBy
|
|
|
{
|
|
|
get { return _CreateBy; }
|
|
|
set
|
|
|
{
|
|
|
_CreateBy = value;
|
|
|
OnPropertyChanged("CreateBy");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private DateTime? _CreateTime;
|
|
|
public DateTime? CreateTime
|
|
|
{
|
|
|
get { return _CreateTime; }
|
|
|
set
|
|
|
{
|
|
|
_CreateTime = value;
|
|
|
OnPropertyChanged("CreateTime");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private string _ModifyBy;
|
|
|
public string ModifyBy
|
|
|
{
|
|
|
get { return _ModifyBy; }
|
|
|
set
|
|
|
{
|
|
|
_ModifyBy = value;
|
|
|
OnPropertyChanged("ModifyBy");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
private DateTime? _ModifyTime;
|
|
|
public DateTime? ModifyTime
|
|
|
{
|
|
|
get { return _ModifyTime; }
|
|
|
set
|
|
|
{
|
|
|
_ModifyTime = value;
|
|
|
OnPropertyChanged("ModifyTime");
|
|
|
}
|
|
|
}
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
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;
|
|
|
}
|
|
|
}
|
|
|
} |