Example #1
0
        internal static PressControllersList GetControllers(string str)
        {
            var controllers = new PressControllersList();
            int i           = 1;

            while (true)
            {
                string cntrlInfo = ((new Regex(string.Format(@"(?<=CNTRL{0}::)(.+)(?=CNTRL{0};)", i))).Match(str)).ToString();
                if (string.IsNullOrEmpty(cntrlInfo))
                {
                    break;
                }
                controllers.Add(GetPressControllerInfo(cntrlInfo, i));
                i++;
            }
            return(controllers);
        }
Example #2
0
        private void AddModul(PressControllersList modules, int number = 0)
        {
            PressControllerInfo modul = new PressControllerInfo();

            modul.IsEnabled = true;
            modul.Number    = number + 1;
            modul.Precision = precision;
            modul.SN        = ReadSN(operationAttempts, number);
            modul.RangeHi   = ReadRange(operationAttempts, number);
            if (modul.RangeHi > Math.Abs(VacoomPressure))
            {
                modul.RangeLo = VacoomPressure;
            }
            else
            {
                modul.RangeLo = (-1) * modul.RangeHi;
            }
            if (pace.CheckBarometer())
            {
                modulWithBarometer = number;
            }
            modules.Add(modul);
        }