Exemplo n.º 1
0
        public static IIntProperty CreateInt(IDDK ddk, IStruct structure, string name, string helpText = null)
        {
            ITypeInt     typeInt = CreateIntType(ddk);
            IIntProperty result  = structure.CreateProperty(name, helpText, typeInt);

            return(result);
        }
Exemplo n.º 2
0
        public static IIntProperty CreateEnum <T>(IDDK ddk, IStruct structure, string name, T value, string helpText = null)
        {
            ITypeInt     typeInt = CreateEnumType <T>(ddk);
            IIntProperty result  = structure.CreateProperty(name, string.Empty, typeInt);

            UpdateEnumProperty(result, value, helpText);
            return(result);
        }
Exemplo n.º 3
0
 public static IStringProperty CreateString(IDDK ddk, IStruct structure, string name, string helpText = null, int valueMaxLength = 300)
 {
     if (valueMaxLength <= 0)
     {
         throw new ArgumentOutOfRangeException("Parameter valueMaxLength must be > 0");
     }
     return(structure.CreateProperty(name, helpText, ddk.CreateString(valueMaxLength)));
 }
Exemplo n.º 4
0
        public static IDoubleProperty CreateDouble(IDDK ddk, IStruct structure, string name,
                                                   Nullable <UnitConversion.PhysUnitEnum> unit = null, string helpText = null,
                                                   double minValue = double.MinValue, double maxValue = double.MaxValue, int precision = 3)
        {
            ITypeDouble     typeDouble = CreateDoubleType(ddk, unit, minValue, maxValue, precision);
            IDoubleProperty result     = structure.CreateProperty(name, helpText, typeDouble);

            return(result);
        }