页面效果
控件的值用一个TagData的类表示
其中ID是变量的唯一识别码
编辑页面显示名称 | 变量 | 类型 |
---|---|---|
变量名 | _name | string |
类型 | _type | byte |
长度 | _size | ushort |
地址 | _addr | string |
默认值 | _obj | object |
最大值 | _max | float |
最小值 | _min | float |
启用 | _active | bool |
归档 | _archive | bool |
归档周期 | _cycle | int |
描述 | _desp | string |
public class TagData
{
short _id;
bool _active, _alarm, _scale, _archive;
byte _type;
short _subIndex, _groupIndex;
ushort _size;
float _max, _min;
int _cycle;
string _addr, _name, _desp;
object _obj;
public short ID
{
get { return _id; }
set { _id = value; }
}
public string Name { get { return _name; } set { _name = value; } }
public short GroupIndex { get { return _groupIndex; } set { _groupIndex = value; } }
public short SubIndex { get { return _subIndex; } set { _subIndex = value; } }
public byte DataType { set { _type = value; } get { return _type; } }
public bool Active { get { return _active; } set { _active = value; } }
public bool HasAlarm { get { return _alarm; } set { _alarm = value; } }
public int Cycle { get { return _cycle; } set { _cycle = value; } }
public bool IsArchive { get { return _archive; } set { _archive = value; } }
public bool HasSclae { get { return _scale; } set { _scale = value; } }
public ushort Size { get {return _size;} set { _size = value; } }
public string Address { get { return _addr; } set { _addr = value; } }
public string Description { get { return _desp; } set { _desp = value; } }
public object Obj { get { return _obj; } set { _obj = value; } }
public float Maximum { get { return _max;} set { _max = value; } }
public float Minimum { get { return _min;} set { _min = value; } }
public object DefaultValue { get { return _obj; } set { _obj = value; } }
}