Esempio n. 1
0
        private void InitData()
        {
            if (currSystem == null)
            {
                return;
            }
            var inds      = thisProject.RoomIndoorList.FindAll(p => p.SystemID == currSystem.Id);
            int indsCount = 0;

            if (inds != null && inds.Count > 0)
            {
                indsCount = inds.Count;
            }
            var lengthList  = new List <dynamic>();
            var heightList  = new List <dynamic>();
            var pipingRules = new { Length = lengthList, Height = heightList };
            int starRow     = 0;



            #region Length
            dgvPipingRules.Rows.Add(1);
            //Total pipe length
            dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Length");
            dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_TotalPipeLength");
            dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(currSystem.TotalPipeLength, UnitType.LENGTH_M, utLength).ToString("n0");
            dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.MaxTotalPipeLength == 0 ? "-" : Unit.ConvertToControl(currSystem.MaxTotalPipeLength, UnitType.LENGTH_M, utLength).ToString("n0");
            dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.MaxTotalPipeLength == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(currSystem.TotalPipeLength, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.MaxTotalPipeLength, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);

            //Maximum piping length (Actual length)
            starRow = starRow + 1;
            dgvPipingRules.Rows.Add(1);
            dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Length");
            dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_PipeActualLength");
            dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(currSystem.PipeActualLength, UnitType.LENGTH_M, utLength).ToString("n0");
            dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.MaxPipeLength == 0 ? "-" : Unit.ConvertToControl(currSystem.MaxPipeLength, UnitType.LENGTH_M, utLength).ToString("n0");
            dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.MaxPipeLength == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(currSystem.PipeActualLength, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.MaxPipeLength, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);

            //Maximum piping length (Equivalent length)
            starRow = starRow + 1;
            dgvPipingRules.Rows.Add(1);
            dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Length");
            dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_PipeEquivalentLength");
            dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(currSystem.PipeEquivalentLength, UnitType.LENGTH_M, utLength).ToString("n0");
            dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.MaxEqPipeLength == 0 ? "-" : Unit.ConvertToControl(currSystem.MaxEqPipeLength, UnitType.LENGTH_M, utLength).ToString("n0");
            dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.MaxEqPipeLength == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(currSystem.PipeEquivalentLength, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.MaxEqPipeLength, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);

            //Maximum Piping Length between Multi-kit of 1st Branch and Each Indoor Unit
            starRow = starRow + 1;
            dgvPipingRules.Rows.Add(1);
            dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Length");
            dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_FirstPipeLength");
            dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(currSystem.FirstPipeLength, UnitType.LENGTH_M, utLength).ToString("n0");
            dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.MaxIndoorLength == 0 ? "-" : Unit.ConvertToControl(currSystem.MaxIndoorLength, UnitType.LENGTH_M, utLength).ToString("n0");
            dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.MaxIndoorLength == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(currSystem.FirstPipeLength, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.MaxIndoorLength, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);

            //Maximum Piping Length between Each Multi-kit and Each Indoor Unit
            starRow = starRow + 1;
            dgvPipingRules.Rows.Add(1);
            dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Length");
            dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_ActualMaxMKIndoorPipeLength");
            dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(currSystem.ActualMaxMKIndoorPipeLength, UnitType.LENGTH_M, utLength).ToString("n0");
            dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.MaxMKIndoorPipeLength == 0 ? "-" : Unit.ConvertToControl(currSystem.MaxMKIndoorPipeLength, UnitType.LENGTH_M, utLength).ToString("n0");
            dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.MaxMKIndoorPipeLength == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(currSystem.ActualMaxMKIndoorPipeLength, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.MaxMKIndoorPipeLength, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);

            //Piping Length between Piping Connection Kit 1 and Each Outdoor Unit
            //单独的室外机不需要显示该项限制
            if (!string.IsNullOrEmpty(currSystem.OutdoorItem.JointKitModelG.Trim()) && currSystem.OutdoorItem.JointKitModelG.Trim() != "-")
            {
                starRow = starRow + 1;
                dgvPipingRules.Rows.Add(1);
                dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Length");
                dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_PipeLengthes");
                double MaxPipeLengths = 0;
                if (currSystem.IsInputLengthManually)
                {
                    MaxPipeLengths = PipingBLL.GetMaxPipeLengthOfNodeOut(currSystem.MyPipingNodeOut);
                }
                dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(MaxPipeLengths, UnitType.LENGTH_M, utLength).ToString("n0");
                dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.MaxFirstConnectionKitToEachODU == 0 ? "-" : Unit.ConvertToControl(currSystem.MaxFirstConnectionKitToEachODU, UnitType.LENGTH_M, utLength).ToString("n0");
                dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.MaxFirstConnectionKitToEachODU == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(MaxPipeLengths > 0 ? MaxPipeLengths : 0, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.MaxFirstConnectionKitToEachODU, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);
            }


            if (HeatRecovery)
            {
                bool isAllOK = true;
                var  chBoxs  = new List <dynamic>();
                JCHVRF.MyPipingBLL.PipingBLL.EachNode(currSystem.MyPipingNodeOut, (node1) =>
                {
                    double actual;
                    double max;
                    string model;
                    if (node1 is MyNodeCH)
                    {
                        var item = (MyNodeCH)node1;
                        actual   = item.ActualTotalCHIndoorPipeLength;
                        max      = item.MaxTotalCHIndoorPipeLength;
                        model    = item.Model;
                    }
                    else if (node1 is MyNodeMultiCH)
                    {
                        var item = (MyNodeMultiCH)node1;
                        actual   = item.ActualTotalCHIndoorPipeLength;
                        max      = item.MaxTotalCHIndoorPipeLength;
                        model    = item.Model;
                    }
                    else
                    {
                        return;
                    }

                    bool isOK = !(max > 0 && actual > max);
                    isAllOK   = isAllOK && isOK;

                    var chbox = chBoxs.Find(p => p.Rules == model);
                    if (chbox == null)
                    {
                        chbox        = new System.Dynamic.ExpandoObject();
                        chbox.Rules  = model;
                        chbox.Actual = actual;
                        chbox.Max    = max;
                        chbox.isOK   = isOK;
                        chBoxs.Add(chbox);
                    }
                    else
                    {
                        if ((chbox.isOK && isOK && actual > chbox.Actual) || //高的覆盖低的
                            (chbox.isOK && !isOK))      //出错的覆盖正常的
                        {
                            chbox.Actual = actual;
                            chbox.Max    = max;
                            chbox.isOK   = isOK;
                        }
                    }
                });
                if (chBoxs.Count > 0)
                {
                    //Total piping length between CH-Box and Each Indoor Unit
                    starRow = starRow + 1;
                    dgvPipingRules.Rows.Add(1);
                    dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Length");
                    dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_CHBoxs");
                    dgvPipingRules.Rows[starRow].Cells[2].Value = "-";
                    dgvPipingRules.Rows[starRow].Cells[3].Value = "-";
                    dgvPipingRules.Rows[starRow].Cells[4].Value = isAllOK ? Properties.Resources.piping_ok : Properties.Resources.piping_error;

                    chBoxs.ForEach((c) =>
                    {
                        starRow = starRow + 1;
                        dgvPipingRules.Rows.Add(1);
                        dgvPipingRules.Rows[starRow].Cells[0].Value           = Msg.GetResourceString("PipingRules_Length");
                        dgvPipingRules.Rows[starRow].Cells[1].Style.Alignment = DataGridViewContentAlignment.MiddleRight;
                        dgvPipingRules.Rows[starRow].Cells[1].Value           = c.Rules == null ? Msg.GetResourceString("PipingRules_CH_Box") : c.Rules;
                        dgvPipingRules.Rows[starRow].Cells[2].Value           = Unit.ConvertToControl(c.Actual, UnitType.LENGTH_M, utLength).ToString("n0");
                        dgvPipingRules.Rows[starRow].Cells[3].Value           = c.Max > 0 ? Unit.ConvertToControl(c.Max, UnitType.LENGTH_M, utLength).ToString("n0") : "-";
                        dgvPipingRules.Rows[starRow].Cells[4].Value           = c.isOK ? Properties.Resources.piping_ok : Properties.Resources.piping_error;
                    });
                }
            }

            #endregion

            #region Height
            //Height Difference between (O.U. is Upper)
            starRow = starRow + 1;
            dgvPipingRules.Rows.Add(1);
            dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Height");
            dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_HeightDiffH");
            dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(currSystem.MaxUpperHeightDifferenceLength, UnitType.LENGTH_M, utLength).ToString("0.#");
            dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.MaxOutdoorAboveHeight == 0 ? "-" : Unit.ConvertToControl(currSystem.MaxOutdoorAboveHeight, UnitType.LENGTH_M, utLength).ToString("0.#");
            dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.MaxOutdoorAboveHeight == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(currSystem.MaxUpperHeightDifferenceLength, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.MaxOutdoorAboveHeight, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);

            //Height Difference between (O.U. is Lower)
            starRow = starRow + 1;
            dgvPipingRules.Rows.Add(1);
            dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Height");
            dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_HeightDiffL");
            dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(currSystem.MaxLowerHeightDifferenceLength, UnitType.LENGTH_M, utLength).ToString("0.#");
            dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.MaxOutdoorBelowHeight == 0 ? "-" : Unit.ConvertToControl(currSystem.MaxOutdoorBelowHeight, UnitType.LENGTH_M, utLength).ToString("0.#");
            dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.MaxOutdoorBelowHeight == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(currSystem.MaxLowerHeightDifferenceLength, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.MaxOutdoorBelowHeight, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);

            //Height Difference between Indoor units
            starRow = starRow + 1;
            dgvPipingRules.Rows.Add(1);
            dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Height");
            dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_DiffIndoorHeight");
            dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(currSystem.MaxIndoorHeightDifferenceLength, UnitType.LENGTH_M, utLength).ToString("0.#");
            dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.MaxDiffIndoorHeight == 0 ? "-" : Unit.ConvertToControl(currSystem.MaxDiffIndoorHeight, UnitType.LENGTH_M, utLength).ToString("0.#");
            dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.MaxDiffIndoorHeight == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(currSystem.MaxIndoorHeightDifferenceLength, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.MaxDiffIndoorHeight, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);
            #endregion

            if (HeatRecovery)
            {
                starRow = starRow + 1;
                dgvPipingRules.Rows.Add(1);
                //Height Difference between CH-Box and Indoor Units
                dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Height");
                dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_DiffCHBox_IndoorHeight");
                dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(currSystem.MaxCHBox_IndoorHighDiffLength, UnitType.LENGTH_M, utLength).ToString("0.#");
                dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.NormalCHBox_IndoorHighDiffLength == 0 ? "-" : Unit.ConvertToControl(currSystem.NormalCHBox_IndoorHighDiffLength, UnitType.LENGTH_M, utLength).ToString("0.#");
                dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.NormalCHBox_IndoorHighDiffLength == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(currSystem.MaxCHBox_IndoorHighDiffLength, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.NormalCHBox_IndoorHighDiffLength, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);

                starRow = starRow + 1;
                dgvPipingRules.Rows.Add(1);
                //Height Difference between Indoor Units using the Same Branch of CH-Box
                dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Height");
                dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_DiffMulitBoxHeight");
                dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(currSystem.MaxSameCHBoxHighDiffLength, UnitType.LENGTH_M, utLength).ToString("0.#");
                dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.NormalSameCHBoxHighDiffLength == 0 ? "-" : Unit.ConvertToControl(currSystem.NormalSameCHBoxHighDiffLength, UnitType.LENGTH_M, utLength).ToString("0.#");
                dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.NormalSameCHBoxHighDiffLength == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(currSystem.MaxSameCHBoxHighDiffLength, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.NormalSameCHBoxHighDiffLength, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);

                starRow = starRow + 1;
                dgvPipingRules.Rows.Add(1);
                //Height Difference between CH-Boxes
                dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_Height");
                dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_DiffCHBoxHeight");
                dgvPipingRules.Rows[starRow].Cells[2].Value = Unit.ConvertToControl(currSystem.MaxCHBoxHighDiffLength, UnitType.LENGTH_M, utLength).ToString("0.#");
                dgvPipingRules.Rows[starRow].Cells[3].Value = currSystem.NormalCHBoxHighDiffLength == 0 ? "-" : Unit.ConvertToControl(currSystem.NormalCHBoxHighDiffLength, UnitType.LENGTH_M, utLength).ToString("0.#");
                dgvPipingRules.Rows[starRow].Cells[4].Value = currSystem.NormalCHBoxHighDiffLength == 0 ? Properties.Resources.piping_ok : (Unit.ConvertToControl(currSystem.MaxCHBoxHighDiffLength, UnitType.LENGTH_M, utLength) <= Unit.ConvertToControl(currSystem.NormalCHBoxHighDiffLength, UnitType.LENGTH_M, utLength) ? Properties.Resources.piping_ok : Properties.Resources.piping_error);
            }

            starRow = starRow + 1;
            dgvPipingRules.Rows.Add(1);
            dgvPipingRules.Rows[starRow].Cells[0].Value = "";
            dgvPipingRules.Rows[starRow].Cells[1].Value = "";
            dgvPipingRules.Rows[starRow].Cells[2].Value = "";
            dgvPipingRules.Rows[starRow].Cells[3].Value = "";
            dgvPipingRules.Rows[starRow].Cells[4].Value = Properties.Resources.piping_Transparent;


            starRow = starRow + 1;
            dgvPipingRules.Rows.Add(1);
            dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_IUConnectable");
            dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_IUConnectable");
            dgvPipingRules.Rows[starRow].Cells[2].Value = indsCount;
            dgvPipingRules.Rows[starRow].Cells[3].Value = "1 / " + currSystem.OutdoorItem.RecommendedIU + " / " + currSystem.OutdoorItem.MaxIU;
            dgvPipingRules.Rows[starRow].Cells[4].Value = Properties.Resources.piping_ok;

            string Ratio = "50%-130%";
            if (currSystem.OutdoorItem.Series.Contains("FSNP") ||
                currSystem.OutdoorItem.Series.Contains("FSXNP") ||
                currSystem.OutdoorItem.Series.Contains("FSNS7B") || currSystem.OutdoorItem.Series.Contains("FSNS5B") ||
                currSystem.OutdoorItem.Series.Contains("FSNC7B") || currSystem.OutdoorItem.Series.Contains("FSNC5B")    //巴西的Connection Ratio可以达到150% 20190105 by Yunxiao Lin
                )
            {
                Ratio = "50%-150%";
            }
            if (currSystem.OutdoorItem.Series.Contains("FSXNPE"))
            {
                if (currSystem.OutdoorItem.CoolingCapacity > 150)
                {
                    Ratio = "50%-130%";
                }
            }

            starRow = starRow + 1;
            dgvPipingRules.Rows.Add(1);
            dgvPipingRules.Rows[starRow].Cells[0].Value = Msg.GetResourceString("PipingRules_ConnectedCap");
            dgvPipingRules.Rows[starRow].Cells[1].Value = Msg.GetResourceString("PipingRules_ConnectedCap");
            dgvPipingRules.Rows[starRow].Cells[2].Value = (currSystem.Ratio * 100).ToString("n0") + "%";
            dgvPipingRules.Rows[starRow].Cells[3].Value = Ratio;
            dgvPipingRules.Rows[starRow].Cells[4].Value = Properties.Resources.piping_ok;
        }
Esempio n. 2
0
        /// <summary>
        /// The BindPipingInfoLength
        /// </summary>
        public void BindPipingInfoLength(JCHVRF.Model.NextGen.SystemVRF currentSystem)
        {
            ListPipingInfoLength = new ObservableCollection <PipingInfoModel>();

            PipingInfoModel PipingObjectLength = new PipingInfoModel();

            PipingObjectLength.Description     = TOTAL_LENGTH;
            PipingObjectLength.LongDescription = Msg.GetResourceString("PipingRules_TotalPipeLength");
            PipingObjectLength.Value           = JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(currentSystem.TotalPipeLength, UnitType.LENGTH_M, LengthUnit));
            PipingObjectLength.Max             = currentSystem.MaxTotalPipeLength == 0 ? "-" : JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(currentSystem.MaxTotalPipeLength, UnitType.LENGTH_M, LengthUnit));
            PipingObjectLength.IsValid         = currentSystem.MaxTotalPipeLength == 0 ? true : (Unit.ConvertToControl(currentSystem.TotalPipeLength, UnitType.LENGTH_M, LengthUnit) <= Unit.ConvertToControl(currentSystem.MaxTotalPipeLength, UnitType.LENGTH_M, LengthUnit) ? true : false);
            //if (PipingObjectLength.Max.Equals("-"))
            //{
            //    PipingObjectLength.IsValid = true;
            //}
            //else
            //{
            //    PipingObjectLength.IsValid = JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectLength.Value) >= JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectLength.Min) && JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectLength.Value) <= JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectLength.Max);
            //}

            ListPipingInfoLength.Add(PipingObjectLength);

            PipingInfoModel PipingObjectMaxLengthActual = new PipingInfoModel();

            FormattedText actualLength = new FormattedText("Actuals",
                                                           System.Globalization.CultureInfo.InvariantCulture,
                                                           FlowDirection.LeftToRight, new Typeface(FONT_STYLE), 9, System.Windows.Media.Brushes.Black);

            PipingObjectMaxLengthActual.Description     = MAX_LENGTH + " " + actualLength.Text;
            PipingObjectMaxLengthActual.LongDescription = Msg.GetResourceString("PipingRules_PipeActualLength");
            PipingObjectMaxLengthActual.Value           = JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(currentSystem.PipeActualLength, UnitType.LENGTH_M, LengthUnit));
            PipingObjectMaxLengthActual.Max             = currentSystem.MaxPipeLength == 0 ? "-" : JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(currentSystem.MaxPipeLength, UnitType.LENGTH_M, LengthUnit));
            PipingObjectMaxLengthActual.IsValid         = currentSystem.MaxPipeLength == 0 ? true : (Unit.ConvertToControl(currentSystem.PipeActualLength, UnitType.LENGTH_M, LengthUnit) <= Unit.ConvertToControl(currentSystem.MaxPipeLength, UnitType.LENGTH_M, LengthUnit) ? true : false);
            //if (PipingObjectMaxLengthActual.Max.Equals("-"))
            //{
            //    PipingObjectLength.IsValid = true;
            //}
            //else
            //{
            //    PipingObjectMaxLengthActual.IsValid = JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthActual.Value) >= JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthActual.Min) && JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthActual.Value) <= JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthActual.Max);
            //}

            ListPipingInfoLength.Add(PipingObjectMaxLengthActual);

            PipingInfoModel PipingObjectMaxLengthEquiVal = new PipingInfoModel();

            FormattedText equivalLength = new FormattedText("Equival",
                                                            System.Globalization.CultureInfo.InvariantCulture,
                                                            FlowDirection.LeftToRight, new Typeface(FONT_STYLE), 9, System.Windows.Media.Brushes.Black);

            PipingObjectMaxLengthEquiVal.Description     = MAX_LENGTH + " " + equivalLength.Text;
            PipingObjectMaxLengthEquiVal.LongDescription = Msg.GetResourceString("PipingRules_PipeEquivalentLength");
            PipingObjectMaxLengthEquiVal.Value           = JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(currentSystem.PipeEquivalentLength, UnitType.LENGTH_M, LengthUnit).ToString("n0"));
            PipingObjectMaxLengthEquiVal.Max             = currentSystem.MaxEqPipeLength == 0 ? "-" : JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(currentSystem.MaxEqPipeLength, UnitType.LENGTH_M, LengthUnit));
            PipingObjectMaxLengthEquiVal.IsValid         = currentSystem.MaxEqPipeLength == 0 ? true : (Unit.ConvertToControl(currentSystem.PipeEquivalentLength, UnitType.LENGTH_M, LengthUnit) <= Unit.ConvertToControl(currentSystem.MaxEqPipeLength, UnitType.LENGTH_M, LengthUnit) ? true : false);
            //if (PipingObjectMaxLengthEquiVal.Max.Equals("-"))
            //{
            //    PipingObjectLength.IsValid = true;
            //}
            //else
            //{
            //    PipingObjectMaxLengthEquiVal.IsValid = JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthEquiVal.Value) >= JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthEquiVal.Min) && JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthEquiVal.Value) <= JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthEquiVal.Max);
            //}


            ListPipingInfoLength.Add(PipingObjectMaxLengthEquiVal);

            PipingInfoModel PipingObjectMaxLengthFirstPipeLength = new PipingInfoModel();

            FormattedText firstPipeLength = new FormattedText("Mkit-IDU",
                                                              System.Globalization.CultureInfo.InvariantCulture,
                                                              FlowDirection.LeftToRight, new Typeface(FONT_STYLE), 9, System.Windows.Media.Brushes.Black);

            PipingObjectMaxLengthFirstPipeLength.Description     = MAX_LENGTH + " " + firstPipeLength.Text;
            PipingObjectMaxLengthFirstPipeLength.LongDescription = Msg.GetResourceString("PipingRules_FirstPipeLength");
            PipingObjectMaxLengthFirstPipeLength.Value           = JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(currentSystem.FirstPipeLength, UnitType.LENGTH_M, LengthUnit));
            PipingObjectMaxLengthFirstPipeLength.Max             = currentSystem.MaxIndoorLength == 0 ? "-" : JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(currentSystem.MaxIndoorLength, UnitType.LENGTH_M, LengthUnit));
            PipingObjectMaxLengthFirstPipeLength.IsValid         = currentSystem.MaxIndoorLength == 0 ? true : (Unit.ConvertToControl(currentSystem.FirstPipeLength, UnitType.LENGTH_M, LengthUnit) <= Unit.ConvertToControl(currentSystem.MaxIndoorLength, UnitType.LENGTH_M, LengthUnit) ? true : false);
            //if (PipingObjectMaxLengthFirstPipeLength.Max.Equals("-"))
            //{
            //    PipingObjectLength.IsValid = true;
            //}
            //else
            //{
            //    PipingObjectMaxLengthFirstPipeLength.IsValid = JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthFirstPipeLength.Value) >= JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthFirstPipeLength.Min) && JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthFirstPipeLength.Value) <= JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthFirstPipeLength.Max);
            //}

            ListPipingInfoLength.Add(PipingObjectMaxLengthFirstPipeLength);

            PipingInfoModel PipingObjectMaxLengthActualMaxMKIndoorPipeLength = new PipingInfoModel();

            FormattedText eachIndoorLength = new FormattedText("Mkit-IDU",
                                                               System.Globalization.CultureInfo.InvariantCulture,
                                                               FlowDirection.LeftToRight, new Typeface(FONT_STYLE), 9, System.Windows.Media.Brushes.Black);

            PipingObjectMaxLengthActualMaxMKIndoorPipeLength.Description     = MAX_LENGTH + " " + eachIndoorLength.Text;
            PipingObjectMaxLengthActualMaxMKIndoorPipeLength.LongDescription = Msg.GetResourceString("PipingRules_ActualMaxMKIndoorPipeLength");
            PipingObjectMaxLengthActualMaxMKIndoorPipeLength.Value           = JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(currentSystem.ActualMaxMKIndoorPipeLength, UnitType.LENGTH_M, LengthUnit));
            PipingObjectMaxLengthActualMaxMKIndoorPipeLength.Max             = currentSystem.MaxMKIndoorPipeLength == 0 ? "-" : JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(currentSystem.MaxMKIndoorPipeLength, UnitType.LENGTH_M, LengthUnit));
            PipingObjectMaxLengthActualMaxMKIndoorPipeLength.IsValid         = currentSystem.MaxMKIndoorPipeLength == 0 ? true : (Unit.ConvertToControl(currentSystem.ActualMaxMKIndoorPipeLength, UnitType.LENGTH_M, LengthUnit) <= Unit.ConvertToControl(currentSystem.MaxMKIndoorPipeLength, UnitType.LENGTH_M, LengthUnit) ? true : false);
            //if (PipingObjectMaxLengthActualMaxMKIndoorPipeLength.Max.Equals("-"))
            //{
            //    PipingObjectLength.IsValid = true;
            //}
            //else
            //{
            //    PipingObjectMaxLengthActualMaxMKIndoorPipeLength.IsValid = JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthActualMaxMKIndoorPipeLength.Value) >= JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthActualMaxMKIndoorPipeLength.Min) && JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthActualMaxMKIndoorPipeLength.Value) <= JCHVRF.BLL.CommonBLL.DoubleParser(PipingObjectMaxLengthActualMaxMKIndoorPipeLength.Max);
            //}

            ListPipingInfoLength.Add(PipingObjectMaxLengthActualMaxMKIndoorPipeLength);

            if ((currentSystem != null) && (currentSystem.OutdoorItem != null))
            {
                if (!string.IsNullOrEmpty(currentSystem.OutdoorItem.JointKitModelG) && !string.IsNullOrEmpty(currentSystem.OutdoorItem.JointKitModelG.Trim()) && currentSystem.OutdoorItem.JointKitModelG.Trim() != "-")
                {
                    PipingInfoModel PipingObjectPipingLengthConKitOutdoorPipeLength = new PipingInfoModel();

                    FormattedText conKitOutdoorPipeLength = new FormattedText("Ckit-ODU",
                                                                              System.Globalization.CultureInfo.InvariantCulture,
                                                                              FlowDirection.LeftToRight, new Typeface(FONT_STYLE), 9, System.Windows.Media.Brushes.Black);
                    double MaxPipeLengths = 0;
                    if (currentSystem.IsInputLengthManually)
                    {
                        MaxPipeLengths = PipingBLL.GetMaxPipeLengthOfNodeOut(currentSystem.MyPipingNodeOut);
                    }

                    PipingObjectPipingLengthConKitOutdoorPipeLength.Description     = PIPE_LENGTH + " " + conKitOutdoorPipeLength.Text;
                    PipingObjectPipingLengthConKitOutdoorPipeLength.LongDescription = Msg.GetResourceString("PipingRules_PipeLengthes");

                    PipingObjectPipingLengthConKitOutdoorPipeLength.Value   = JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(MaxPipeLengths, UnitType.LENGTH_M, LengthUnit));
                    PipingObjectPipingLengthConKitOutdoorPipeLength.Max     = currentSystem.MaxFirstConnectionKitToEachODU == 0 ? "-" : JCHVRF.BLL.CommonBLL.StringConversion(Unit.ConvertToControl(currentSystem.MaxFirstConnectionKitToEachODU, UnitType.LENGTH_M, LengthUnit));
                    PipingObjectPipingLengthConKitOutdoorPipeLength.IsValid = currentSystem.MaxFirstConnectionKitToEachODU == 0 ? true : (Unit.ConvertToControl(MaxPipeLengths > 0 ? MaxPipeLengths : 0, UnitType.LENGTH_M, LengthUnit) <= Unit.ConvertToControl(currentSystem.MaxFirstConnectionKitToEachODU, UnitType.LENGTH_M, LengthUnit) ? true : false);

                    ListPipingInfoLength.Add(PipingObjectPipingLengthConKitOutdoorPipeLength);
                }
            }

            var ishrModel = IsHeatRecovery(currentSystem);

            if (ishrModel)
            {
                AddCHBoxPipingLengthInfo(currentSystem);
            }
        }