///////////////////////////////////////////////////////////////// // // (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 GummingCommon; namespace GummingEntity { public partial class HardAxisEntity { private ushort _Energy; public ushort Energy { get { return _Energy; } set { _Energy = value; OnPropertyChanged("Energy"); } } private bool _IsHomeDone; public bool IsHomeDone { get { return _IsHomeDone; } set { _IsHomeDone = value; OnPropertyChanged("IsHomeDone"); } } private bool _IsWarning; public bool IsWarning { get { return _IsWarning; } set { _IsWarning = value; OnPropertyChanged("IsWarning"); } } public bool SpeedAlarm { get; set; } public int CurCount { get; set; } public DateTime StartTime { get; set; } } /// /// HardAxis /// [Serializable] public partial class HardAxisEntity : ViewModelBase, ICloneable { /// /// /// private string _RecId; public string RecId { get { return _RecId; } set { _RecId = value; OnPropertyChanged("RecId"); } } /// /// 工位编号 /// private string _StationCode; public string StationCode { get { return _StationCode; } set { _StationCode = value; OnPropertyChanged("StationCode"); } } /// /// 轴卡类型 /// private int _NodeType; public int NodeType { get { return _NodeType; } set { _NodeType = value; OnPropertyChanged("NodeType"); } } /// /// 所属轴卡编号 /// private int? _CardNo; public int? CardNo { get { return _CardNo; } set { _CardNo = value; OnPropertyChanged("CardNo"); } } /// /// 所属节点编号 /// private ushort _NodeId; public ushort NodeId { get { return _NodeId; } set { _NodeId = value; OnPropertyChanged("NodeId"); } } /// /// 所属节点从节点编号 /// private ushort _SlotId; public ushort SlotId { get { return _SlotId; } set { _SlotId = value; OnPropertyChanged("SlotId"); } } /// /// 加速度基数 /// private decimal _RPMScale; public decimal RPMScale { get { return _RPMScale; } set { _RPMScale = value; OnPropertyChanged("RPMScale"); } } /// /// 转速比 /// private int _SpeedScale1; public int SpeedScale1 { get { return _SpeedScale1; } set { _SpeedScale1 = value; OnPropertyChanged("SpeedScale1"); } } /// /// 转速比 /// private int _SpeedScale2; public int SpeedScale2 { get { return _SpeedScale2; } set { _SpeedScale2 = value; OnPropertyChanged("SpeedScale2"); } } /// /// 脉冲 /// private int? _Pulse; public int? Pulse { get { return _Pulse; } set { _Pulse = value; OnPropertyChanged("Pulse"); } } /// /// 轴编号 /// private string _AxisCode; public string AxisCode { get { return _AxisCode; } set { _AxisCode = value; OnPropertyChanged("AxisCode"); } } /// /// 轴名称 /// private string _AxisName; public string AxisName { get { return _AxisName; } set { _AxisName = value; OnPropertyChanged("AxisName"); } } /// /// 单位距离 /// private decimal _Distance; public decimal Distance { get { return _Distance; } set { _Distance = value; OnPropertyChanged("Distance"); } } /// /// /// 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() { HardAxisEntity obj = new HardAxisEntity(); 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; } } }