using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
namespace Aitex.Core.UI.ControlDataContext
{
[DataContract]
[Serializable]
public class GaugeItem: INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
public void InvokePropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
///
/// 设备的唯一名称,UI与RT交互的ID
///
[DataMember]
public string DeviceName { get; set; }
///
/// 显示在界面上的名称
///
[DataMember]
public string DisplayName { get; set; }
///
/// IO 表中定义的物理编号,物理追溯使用 比如: M122
///
[DataMember]
public string DeviceId { get; set; }
[DataMember]
public string Unit { get; set; }
[DataMember]
public string Description { get; set; }
///
/// 量程
///
[DataMember]
public double Scale { get; set; }
///
/// 设定值
///
[DataMember]
public double SetPoint { get; set; }
public double _feedback;
public double FeedBack
{
get
{
return _feedback;
}
set
{
_feedback = value;
InvokePropertyChanged("FeedBack");
}
}
///
/// 默认值
///
[DataMember]
public double DefaultValue { get; set; }
///
/// 是否有报警
///
[DataMember]
public bool IsWarning { get; set; }
///
/// alarm或是erro时显示的信息
///
[DataMember]
public string ErroMessage { get; set; }
///
/// MFC,PC
///
[DataMember]
public string Type { get; set; }
private double _factor = 1.0;
[DataMember]
public double Factor
{
get { return _factor; }
set { _factor = value; }
}
public GaugeItem()
{
DisplayName = "未定义设备";
}
}
}