示例#1
0
        public Pump(ComponentsLocationPaths _componentsLocation, string _componentsName, int _pumpsWidth, int _pressureSideDn,
                    int _suctionSideDn, StationComponentTypeEnum _stationComponentsType)
            : base(_stationComponentsType)
        {
            ComponentName  = _componentsName;
            PumpsWidth     = _pumpsWidth;
            PressureSideDn = _pressureSideDn;
            SuctionSideDn  = _suctionSideDn;

            ComponentLocationPath = ComponentsValCalculator.GetFullPathToTheComponent(_componentsLocation, ComponentName, this);
        }
        public PumpStation(ComponentsLocationPaths _componentsLocation, Pump _mainPump, Pump _jockeyPump, string _controlCabinetName,
                           bool _isAutoCalculationDiameterConnection, int _pumpsCount, double _waterConsumption, int _dnSuctionCollector,
                           int _dnPressureCollector, double _pressureValueForStation, CollectorsMaterialEnum _collectorMaterial,
                           StationScheme _stationScheme)
        {
            stationComponents  = new List <StationComponent>();
            StationScheme      = _stationScheme;
            componentsLocation = _componentsLocation;
            mainPump           = _mainPump;
            jockeyPump         = _jockeyPump;
            ControlCabinetSize = _controlCabinetName;
            IsAutoCalculationDiameterConnection = _isAutoCalculationDiameterConnection;
            PumpsCount              = _pumpsCount;
            WaterConsumption        = _waterConsumption;
            DnSuctionCollector      = _dnSuctionCollector;
            DnPressureCollector     = _dnPressureCollector;
            PressureValueForStation = _pressureValueForStation;
            CollectorMaterial       = _collectorMaterial;
            SecondaryLineDn         = GetSecondaryLineDn(DnSuctionCollector);
            DistanceBetweenAxis     = ComponentsValCalculator.GetDistanceBetweenPumpsAxis(mainPump.PumpsWidth);

            CreatePumpStationComponentsByScheme(StationScheme);
        }
        public static string GetComponentsPathByType(ComponentsLocationPaths componentsLocation, StationComponent component)
        {
            string[] s1 = component.ComponentType.ToString().Split('_');

            if (s1[0].Equals("КВ") || s1[0].Equals("КН"))
            {
                return(componentsLocation.componentsLocationPaths["collectorsPath"] + (component.ComponentType.Equals(StationComponentTypeEnum.КВ_коллектор_всасывающий)
                    ? componentsLocation.componentsLocationPaths["suctionCollectorsPath"] : componentsLocation.componentsLocationPaths["pressureCollectorsPath"]));
            }
            else if (s1[0].Equals("ОКФ") || s1[0].Equals("ОКР"))
            {
                return(componentsLocation.componentsLocationPaths["checkValvesPath"] + (component.ComponentType.Equals(StationComponentTypeEnum.ОКФ_обратный_клапан_фланцевый)
                    ? componentsLocation.componentsLocationPaths["flangeCheckValvesPath"] : componentsLocation.componentsLocationPaths["carveCheckValvesPath"]));
            }
            else if (s1[0].Equals("ЗД") || s1[0].Equals("РК"))
            {
                return(componentsLocation.componentsLocationPaths["lockValvesPath"] + (component.ComponentType.Equals(StationComponentTypeEnum.К_резьбовой_кран_2) || component.ComponentType.Equals(StationComponentTypeEnum.К_резьбовой_кран_1)
                    ? componentsLocation.componentsLocationPaths["carvesValvesPath"] : componentsLocation.componentsLocationPaths["shuttersPath"]));
            }
            else if (s1[0].Equals("ТВ") || s1[0].Equals("ТН"))
            {
                return(componentsLocation.componentsLocationPaths["teesPath"] + (component.ComponentType.Equals(StationComponentTypeEnum.ТВ_тройник_всасывающий_1) || component.ComponentType.Equals(StationComponentTypeEnum.ТВ_тройник_всасывающий_2)
                    ? componentsLocation.componentsLocationPaths["suctionTeesPath"] : componentsLocation.componentsLocationPaths["pressureTeesPath"]));
            }
            else if (s1[0].Equals("ШУ"))
            {
                return(componentsLocation.componentsLocationPaths["controlCabinetsPath"]);
            }
            else if (s1[0].Equals("КЭ") || s1[0].Equals("КЭР") || s1[0].Equals("КК") || s1[0].Equals("ККР") || s1[0].Equals("К") ||
                     s1[0].Equals("КР") || s1[0].Equals("КВЖ") || s1[0].Equals("КНЖ"))
            {
                string localPath = string.Empty;
                if (s1[0].Equals("КЭ"))
                {
                    localPath = componentsLocation.componentsLocationPaths["essentricCoilsPath"];
                }
                if (s1[0].Equals("КЭР"))
                {
                    localPath = componentsLocation.componentsLocationPaths["essentricCoilsPathWithNippel"];
                }
                if (s1[0].Equals("КК"))
                {
                    localPath = componentsLocation.componentsLocationPaths["concentricCoilsPath"];
                }
                if (s1[0].Equals("ККР"))
                {
                    localPath = componentsLocation.componentsLocationPaths["concentricCoilsWithNippelPath"];
                }
                if (s1[0].Equals("К"))
                {
                    localPath = componentsLocation.componentsLocationPaths["simpleCoilsPath"];
                }
                if (s1[0].Equals("КР"))
                {
                    localPath = componentsLocation.componentsLocationPaths["simpleCoilsWithNippelPath"];
                }
                if (s1[0].Equals("КВЖ"))
                {
                    localPath = componentsLocation.componentsLocationPaths["jockeySuctionCoils"];
                }
                if (s1[0].Equals("КНЖ"))
                {
                    localPath = componentsLocation.componentsLocationPaths["jockeyPressureCoils"];
                }

                return(componentsLocation.componentsLocationPaths["coilsPath"] + localPath);
            }
            else if (s1[0].Equals("Рама"))
            {
                Frame frame = (Frame)component;
                return(componentsLocation.componentsLocationPaths["framesPath"] + (frame.FrameType.Equals(FrameTypesEnum.StandartRottenFrame)
                    ? componentsLocation.componentsLocationPaths["weldedFramesPath"] : componentsLocation.componentsLocationPaths["framesFromShvellerPath"]));
            }
            else if (s1[0].Equals("ФланецСРеле"))
            {
                return(componentsLocation.componentsLocationPaths["flangesWithReley"]);
            }
            else if (s1[0].Equals("ФланцевыйПереход"))
            {
                return(componentsLocation.componentsLocationPaths["flangeOnCarveTransitionPath"]);
            }
            else if (s1[0].Equals("НиппельНН"))
            {
                return(componentsLocation.componentsLocationPaths["nippelsPath"]);
            }
            else if (s1[0].Equals("Американка"))
            {
                return(componentsLocation.componentsLocationPaths["screwFittingsPath"]);
            }

            return(string.Empty);
        }
 public static string GetComponentsPathByType(ComponentsLocationPaths componentsLocation, string pumpName, StationComponent component)
 {
     string[] startMainPumpsNameChars = pumpName.Split('_');
     return(componentsLocation.componentsLocationPaths["pumpsPath"] + startMainPumpsNameChars[0] + @"\");
 }
 public static string GetFullPathToTheComponent(ComponentsLocationPaths componentsLocation, string pumpName,
                                                StationComponent component)
 {
     return(String.Format(componentsLocation.componentsLocationPaths["mainDirPath"] +
                          GetComponentsPathByType(componentsLocation, pumpName, component) + component.ComponentName + ".SLDPRT"));
 }