Exemple #1
0
        public void ReadGrasebyPumpPressureSettings(ProductID pid, Misc.OcclusionLevel level)
        {
            string section = string.Empty;

            #region section
            switch (pid)
            {
            case ProductID.GrasebyC8:
                section = "GrasebyC8";
                break;

            case ProductID.GrasebyF8:
                section = "GrasebyF8";
                break;

            case ProductID.GrasebyC6:
                section = "GrasebyC6";
                break;

            case ProductID.Graseby2000:
                section = "Graseby2000";
                break;

            case ProductID.Graseby2100:
                section = "Graseby2100";
                break;

            case ProductID.GrasebyC6T:
                section = "GrasebyC6T";
                break;

            case ProductID.GrasebyF6:
                section = "GrasebyF6";
                break;

            default:
                section = "GrasebyC6";
                break;
            }
            #endregion

            string   val       = GetString(section, level.ToString()).Trim();
            string[] pressures = val.Split('~');
            if (pressures.Length != 2)
            {
                return;
            }
            float pMin = 0, pMax = 0;
            if (float.TryParse(pressures[0].Trim(), out pMin) && float.TryParse(pressures[1].Trim(), out pMax))
            {
                PressureManager.Instance().Add(pid, level, pMin, pMax);
            }
        }
Exemple #2
0
        public void ReadGrasebyPumpPressureSettings(PumpID pid, Misc.OcclusionLevel level)
        {
            string section = string.Empty;

            #region section
            switch (pid)
            {
            case PumpID.GrasebyC6:
                section = "GrasebyC6";
                break;

            case PumpID.Graseby2000:
                section = "Graseby2000";
                break;

            case PumpID.Graseby2100:
                section = "Graseby2100";
                break;

            case PumpID.GrasebyC6T:
                section = "GrasebyC6T";
                break;

            case PumpID.WZ50C6:
                section = "WZ50C6";
                break;

            case PumpID.WZ50C6T:
                section = "WZ50C6T";
                break;

            case PumpID.GrasebyF6:
                section = "GrasebyF6_1";
                break;

            case PumpID.GrasebyF6_2:
                section = "GrasebyF6_2";
                break;

            case PumpID.WZS50F6:
                section = "WZS50F6_1";
                break;

            case PumpID.WZS50F6_2:
                section = "WZS50F6_2";
                break;

            default:
                section = "GrasebyC6";
                break;
            }
            #endregion

            string   val = GetString(section, level.ToString()).Trim();
            string[] arrSyringeSizePValue = val.Split('|');
            if (arrSyringeSizePValue.Length == 0)
            {
                return;
            }
            int   size = 0;
            float p    = 0;
            foreach (string pair in arrSyringeSizePValue)
            {
                string[] arrSizePValuePair = pair.Trim().Split(',');
                if (arrSizePValuePair.Length != 2)
                {
                    continue;
                }
                if (int.TryParse(arrSizePValuePair[0].Trim(), out size) && float.TryParse(arrSizePValuePair[1].Trim(), out p))
                {
                    PressureManager.Instance().Add(pid, level, size, p);
                }
            }
        }