Ejemplo n.º 1
0
 /// <summary>
 /// 组构造函数
 /// </summary>
 /// <param name="name">组名称</param>
 /// <param name="parent">父组对象, 为null表示根组</param>
 public VariableGroup(string name, VariableGroup parent)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw new ArgumentNullException(Resource1.VariableGroup_VariableGroup_groupNameIsNull);
     }
     _name      = name;
     Parent     = parent;
     CreateTime = DateTime.Now;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="group">变量所属组别的名称,如果是根组,需要传递 "" 值</param>
 /// <param name="varName">变量名</param>
 public AnalogVariable(VariableGroup group, string varName = "")
     : base(group, varName, VarValuetype.VarDouble)
 {
     DeadBand        = 0;
     InitValue       = 0;
     Value           = InitValue;
     MaxValue        = 80;
     MinValue        = 20;
     EngineeringUnit = "";
     ParentGroup     = group;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 变量构造函数
 /// </summary>
 /// <param name="group">父祖</param>
 /// <param name="varName">变量名称</param>
 /// <param name="varValueType">变量类型</param>
 protected VariableBase(VariableGroup group, string varName = "",
                        VarValuetype varValueType           = VarValuetype.VarDouble)
 {
     Name             = varName;
     ValueType        = varValueType;
     VariableType     = VarType.VarNormal;
     OperateProperty  = VarOperateProperty.ReadWrite;
     IsAddressable    = false;
     IsInitValueSaved = false;
     IsRecordEvent    = false;
     IsValueSaved     = true;
     ParentGroup      = group;
     CreateTime       = DateTime.Now;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="group">变量所属组别的名称,如果是根组,需要传递 "" 值</param>
 /// <param name="varName">变量名</param>
 public TextVariable(VariableGroup group, string varName = "")
     : base(group, varName, VarValuetype.VarString)
 {
     InitValue = "";
     Value     = InitValue;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="group">变量所属组别的名称,如果是根组,需要传递 "" 值</param>
 /// <param name="varName">变量名</param>
 public DigitalVariable(VariableGroup group, string varName = "")
     : base(group, varName, VarValuetype.VarBool)
 {
     InitValue = false;
     Value     = InitValue;
 }
Ejemplo n.º 6
0
 static VariableGroup()
 {
     RootGroup = new VariableGroup(Resource1.VariableGroup__rootGroup_variableDictionary, null);
 }