Ejemplo n.º 1
0
 public ArchiveParam(string fullCode, DataType dtype, string units = null, CalcParamBase first = null, CalcParamBase last = null,
                     SuperProcess superProcess = SuperProcess.None, int?decPlaces = null, double?min = null, double?max = null)
 {
     FullCode     = fullCode;
     FirstParam   = first;
     LastParam    = last;
     DataType     = dtype;
     Units        = units;
     SuperProcess = superProcess;
     DecPlaces    = decPlaces;
     Min          = min;
     Max          = max;
 }
Ejemplo n.º 2
0
        public ArchiveParam(IRecordRead rec)
        {
            FullCode = rec.GetString("Code");
            var  codep        = rec.GetString("CodeParam");
            bool hasSubParams = FullCode.ToLower() != codep.ToLower();

            if (hasSubParams)
            {
                CodeSubParam = FullCode.Substring(codep.Length + 1);
            }
            DataType     = rec.GetString("DataType").ToDataType();
            Units        = rec.GetString("Units");
            SuperProcess = rec.GetString("SuperProcessType").ToSuperProcess();
            DecPlaces    = rec.GetIntNull("DecPlaces");
            Min          = rec.GetDoubleNull("Min");
            Max          = rec.GetDoubleNull("Max");
            FirstParam   = new CalcParamBase(rec.GetString("CodeParam"), rec.GetString("Name"), rec.GetString("Comment"), rec.GetString("Task"),
                                             rec.GetString("CalcParamType").ToCalcParamType(), rec.GetString("Tag"));
            if (hasSubParams)
            {
                LastParam = new CalcParamBase(CodeSubParam, rec.GetString("SubName"), rec.GetString("SubComment"));
            }
        }