Example #1
0
        // 给 Word 文档中的数据表插入空行(注:表中已有一行空行~)
        #region InsertEmptyRowsToTable
        /// <summary>
        /// 给 Word 文档中的数据表插入空行(注:表中已有一行空行~)
        /// </summary>
        /// <param name="selection"></param>
        /// <param name="table"> word 文档中的表格 </param>
        /// <param name="docRowStart"> word 表格的起始行 </param>
        /// <param name="rowCount">要插入的空行数目</param>
        /// <param name="logInfo"> 日志内容 </param>
        /// <returns></returns>
        public static bool InsertEmptyRowsToTable(ref Word.Selection selection, ref Word.Table table,
                                                  int docRowStart, int docColStart, int rowCount, out string logInfo)
        {
            bool res = true;

            try
            {
                // 2012-01-10 Update
                if (rowCount > 1)
                {
                    table.Cell(docRowStart, docColStart).Select();
                    selection.InsertRowsBelow(rowCount - 1);
                    logInfo = "插入空行成功!";
                }
                else
                {
                    res     = false;
                    logInfo = "无对应的数据记录!";
                }
            }
            catch (Exception ex)
            {
                JCMsg.ShowErrorOK(ex.GetType().ToString() + "\n" + ex.Message);
                res     = false;
                logInfo = "插入空行失败!";
            }
            return(res);
        }
Example #2
0
        // 判断电脑中是否存在Word2003或更高版本
        #region ValWordVersion
        /// <summary>
        /// 判断电脑中是否存在Word2003或更高版本
        /// </summary>
        /// <param name="curWordApp">当前 word 应用程序</param>
        /// <returns></returns>
        public static bool ValWordVersion(ref Word._Application curWordApp)
        {
            bool res = true;

            try
            {
                if (curWordApp == null)
                {
                    curWordApp = new Word.Application();
                }

                if (Convert.ToDouble(curWordApp.Version) < 11)
                {
                    JCMsg.ShowErrorOK("The version of Microsoft Word is too low. It must be Microsoft Word 2003 or higher.");
                    res = false;
                }
            }
            catch (System.Runtime.InteropServices.COMException)
            {
                JCMsg.ShowErrorOK("Missing support software:\nMicrosoft Word 2003 or higher.");
                res = false;
            }
            catch (System.Exception ex)
            {
                JCMsg.ShowErrorOK(ex.GetType().ToString() + "\n" + ex.Message);
                res = false;
            }
            return(res);
        }
Example #3
0
        // 在 word 文档中当前光标位置中插入指定路径下的图片
        #region InsertPicture
        /// <summary>
        /// 在 word 文档中当前光标位置中插入指定路径下的图片
        /// </summary>
        /// <param name="selection"></param>
        /// <param name="fullPath"></param>
        /// <param name="logInfo"></param>
        /// <returns></returns>
        public static bool InsertPicture(ref Word.Selection selection, string fullPath, out string logInfo)
        {
            bool res = true;

            try
            {
                object linkToFile       = false; //默认
                object saveWithDocument = true;  //默认
                //object drawrange = selection.Range;
                object           Nothing     = System.Reflection.Missing.Value;
                Word.InlineShape inlineShape = selection.InlineShapes.AddPicture(fullPath, ref linkToFile, ref saveWithDocument, ref Nothing);

                //System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(drawPath);
                //double dpi = bmp.VerticalResolution; //96
                //设置图片大小
                int maxHeight = JCBase.Utility.Util.CentimeterToPixel(22, 72);//TODO:待确认 word 2003默认为72
                if (inlineShape.Height > maxHeight)
                {
                    inlineShape.Height = maxHeight;
                }


                logInfo = "图片插入成功!";
            }
            catch (Exception ex)
            {
                JCMsg.ShowErrorOK(ex.GetType().ToString() + "\n" + ex.Message);
                res     = false;
                logInfo = "图片插入失败!";
            }
            return(res);
        }
Example #4
0
        // 给 Word 文档中的数据表插入数据(不带合计行)
        #region InsertDataToTable
        /// <summary>
        /// 给 Word 文档中的数据表插入数据(不带合计行)
        /// </summary>
        /// <param name="table"> word 文档中的表格 </param>
        /// <param name="docRowStart"> word 表格的起始行 </param>
        /// <param name="docColStart"> word 表格的起始列 </param>
        /// <param name="data"> DataTable 数据源 </param>
        /// <param name="logInfo"> 日志内容 </param>
        /// <returns></returns>
        public static bool InsertDataToTable(ref Word.Table table, int docRowStart, int docColStart,
                                             DataTable data, out string logInfo)
        {
            bool res = true;

            try
            {
                for (int rIndex = 0; rIndex < data.Rows.Count; rIndex++)
                {
                    DataRow RowItem = data.Rows[rIndex];
                    for (int cIndex = 0; cIndex < data.Columns.Count; cIndex++)
                    {
                        string colValueStr = RowItem[cIndex].ToString();
                        // 逐个单元格填充表格数据
                        table.Cell(rIndex + docRowStart, cIndex + docColStart).Range.Text = colValueStr;
                    }
                }
                res     = true;
                logInfo = "数据写入成功!";
            }
            catch (Exception ex)
            {
                JCMsg.ShowErrorOK(ex.GetType().ToString() + "\n" + ex.Message);
                res     = false;
                logInfo = "数据写入失败!";
            }
            return(res);
        }
Example #5
0
        /// <summary>
        /// 更改当前城市名称
        /// </summary>
        /// <param name="city"></param>
        private bool DoEditCity(string oldcity)
        {
            frmLoadIndexAddCity f = new frmLoadIndexAddCity(oldcity);

            if (f.ShowDialog() == DialogResult.OK)
            {
                string errMsg  = "";
                string newcity = f.CityName;
                if (newcity == oldcity)
                {
                    return(false);
                }
                int ret = bll.UpdateCity(newcity, oldcity, out errMsg);
                if (ret == 1)
                {
                    this.jccmbLocation.Text = newcity;
                    JCMsg.ShowInfoOK(JCMsg.INFO_SUCCESS);
                    return(true);
                }
                else
                {
                    JCMsg.ShowErrorOK(errMsg);
                }
            }
            return(false);
        }
Example #6
0
        /// <summary>
        /// 增加新城市
        /// </summary>
        private bool DoAddCity()
        {
            frmLoadIndexAddCity f = new frmLoadIndexAddCity();

            if (f.ShowDialog() == DialogResult.OK)
            {
                string city = f.CityName;
                int    ret  = bll.AddCity(city, out errMsg);
                if (ret == 1)
                {
                    this.jccmbLocation.Text = city;
                    JCMsg.ShowInfoOK(JCMsg.INFO_SUCCESS);
                    return(true);
                }
                else if (ret == 0)
                {
                    JCMsg.ShowWarningOK(errMsg);
                }
                else
                {
                    JCMsg.ShowErrorOK(errMsg);
                }
            }
            return(false);
        }
Example #7
0
        // 给 Word 文档中的数据表插入数据(带合计行)
        #region InsertDataToTableWithSum
        /// <summary>
        /// 给 Word 文档中的数据表插入数据(带合计行)--注意:插入数据源无需拆分单元格!!
        /// </summary>
        /// <param name="table"> word 文档中的表格 </param>
        /// <param name="docRowStart"> word 表格的起始行 </param>
        /// <param name="docColStart"> word 表格的起始列 </param>
        /// <param name="data"> DataTable 数据源 </param>
        /// <param name="sumColIndexArray"> 求和的列的索引(数据源中的列索引号) </param>
        /// <param name="sumColIndexDiff"> word 文档中的表的合计列号跟数据源的列索引号的差距(正差) </param>
        /// <param name="logInfo"> 日志内容 </param>
        /// <returns></returns>
        public static bool InsertDataToTableWithSum(ref Word.Table table, int docRowStart, int docColStart,
                                                    DataTable data, int[] sumColIndexArray, int sumColIndexDiff, out string logInfo)
        {
            bool res = true;

            try
            {
                // 定义并初始化存放合计值的 list
                List <double> sumValueArray = new List <double>();
                for (int i = 0; i < sumColIndexArray.Length; i++)
                {
                    sumValueArray.Add(0);
                }

                // 逐行填充表格的数据部分(合计行除外)并累计每一个合计值
                for (int rIndex = 0; rIndex < data.Rows.Count; rIndex++)
                {
                    DataRow RowItem = data.Rows[rIndex];
                    // 逐列填充表格数据
                    for (int cIndex = 0; cIndex < data.Columns.Count; cIndex++)
                    {
                        string colValueStr = RowItem[cIndex].ToString();
                        table.Cell(rIndex + docRowStart, cIndex + docColStart).Range.Text = colValueStr;
                    }
                    // 累计计算当前行中参与合计的列
                    for (int i = 0; i < sumColIndexArray.Length; i++)
                    {
                        int    cIndex      = sumColIndexArray[i];
                        string colValueStr = RowItem[cIndex].ToString();
                        if (colValueStr == "-" || string.IsNullOrEmpty(colValueStr))
                        {
                            continue;
                        }
                        sumValueArray[i] += Convert.ToDouble(colValueStr);
                    }
                }

                // 逐个单元格填充合计行的值
                for (int i = 0; i < sumColIndexArray.Length; i++)
                {
                    string sumValueStr = sumValueArray[i].ToString();
                    if (sumValueStr == "0")
                    {
                        sumValueStr = "-";
                    }
                    table.Cell(table.Rows.Count, sumColIndexArray[i] + 1 + sumColIndexDiff).Range.Text = sumValueStr;
                }

                res     = true;
                logInfo = "数据写入成功!";
            }
            catch (Exception ex)
            {
                JCMsg.ShowErrorOK(ex.GetType().ToString() + "\n" + ex.Message);
                res     = false;
                logInfo = "数据写入失败!";
            }
            return(res);
        }
Example #8
0
        /// <summary>
        /// 校验输入长度 add by axj 2018 03 12
        /// 规则 LA <= LB <= LC <= 10m
        /// </summary>
        /// <returns></returns>
        private bool ValidateLength()
        {
            bool   chk    = true;
            string series = curSystemItem.Series;

            //Add FSNC7B/5B by Yunxiao Lin 20190107
            if (series.Contains("FSNS") || series.Contains("FSNP") || series.Contains("FSXNS") || series.Contains("FSXNP") || series.Contains("JTOH-BS1") || series.Contains("JTOR-BS1") || series.Contains("FSNC7B") || series.Contains("FSNC5B"))
            {
                if (_nodeOut.UnitCount == 2)
                {
                    double b = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthB.Text), UnitType.LENGTH_M, ut_length);
                    double c = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthC.Text), UnitType.LENGTH_M, ut_length);
                    if (!(b <= c && c <= 10))
                    {
                        JCMsg.ShowErrorOK("b ≤ c ≤ " + Unit.ConvertToControl(10d, UnitType.LENGTH_M, ut_length).ToString("n1") + ut_length);
                        chk = false;
                    }
                }
                else if (_nodeOut.UnitCount == 3)
                {
                    double b = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthB.Text), UnitType.LENGTH_M, ut_length);
                    double c = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthC.Text), UnitType.LENGTH_M, ut_length);
                    double d = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthD.Text), UnitType.LENGTH_M, ut_length);
                    double e = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthE.Text), UnitType.LENGTH_M, ut_length);
                    if (!(c <= (b + d) && (b + d) <= (b + e) && (b + e) <= 10))
                    {
                        JCMsg.ShowErrorOK("c ≤ b+d ≤ b+e ≤" + Unit.ConvertToControl(10d, UnitType.LENGTH_M, ut_length).ToString("n1") + ut_length);
                        chk = false;
                    }
                }
                else if (_nodeOut.UnitCount == 4)
                {
                    double b = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthB.Text), UnitType.LENGTH_M, ut_length);
                    double c = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthC.Text), UnitType.LENGTH_M, ut_length);
                    double d = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthD.Text), UnitType.LENGTH_M, ut_length);
                    double e = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthE.Text), UnitType.LENGTH_M, ut_length);
                    double f = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthF.Text), UnitType.LENGTH_M, ut_length);
                    if (!useDoublePipeB)
                    {
                        double g = Unit.ConvertToSource(Convert.ToDouble(jctxtLengthG.Text), UnitType.LENGTH_M, ut_length);
                        if (!((b + d) <= (b + e) && (b + e) <= (c + f) && (c + f) <= (c + g) && (c + g) <= 10))
                        {
                            JCMsg.ShowErrorOK("b+d ≤ b+e ≤ c+f ≤ c+g ≤" + Unit.ConvertToControl(10d, UnitType.LENGTH_M, ut_length).ToString("n1") + ut_length);
                            chk = false;
                        }
                    }
                    else
                    {
                        if (!((b + c) <= (b + d) && (b + d) <= (b + e) && (b + e) <= (b + f) && (b + f) <= 10))
                        {
                            JCMsg.ShowErrorOK("b+c ≤ b+d ≤ b+e ≤ b+f ≤" + Unit.ConvertToControl(10d, UnitType.LENGTH_M, ut_length).ToString("n1") + ut_length);
                            chk = false;
                        }
                    }
                }
            }
            return(chk);
        }
Example #9
0
 /// <summary>
 /// 删除当前选中城市,包括该城市下的所有数据
 /// </summary>
 /// <param name="city"></param>
 private bool DoDeleteCity(string city)
 {
     if (!bll.DeleteCity(city, out errMsg))
     {
         JCMsg.ShowErrorOK(errMsg);
         return(false);
     }
     return(true);
 }
Example #10
0
 /// <summary>
 /// 将当前城市设为默认城市
 /// </summary>
 private void DoSetDefaultCity(string city)
 {
     if (bll.SetDefaultCity(city, out errMsg))
     {
         JCMsg.ShowInfoOK(JCMsg.INFO_SUCCESS);
     }
     else
     {
         JCMsg.ShowErrorOK(errMsg);
     }
 }
Example #11
0
 /// <summary>
 /// 删除当前选中的 Load index 记录
 /// </summary>
 /// <param name="roomType"></param>
 private void DoDeleteIndex(string city, string rType)
 {
     if (bll.DeleteLoadIndex(city, rType, out errMsg))
     {
         JCMsg.ShowInfoOK(JCMsg.INFO_SUCCESS);
         BindLoadIndexList(jccmbLocation.Text.Trim());
     }
     else
     {
         JCMsg.ShowErrorOK(errMsg);
     }
 }
Example #12
0
 /// <summary>
 /// 将当前 Load index 记录设为默认项
 /// </summary>
 private void DoSetDefaultLoadIndex(string city, string rType)
 {
     if (bll.SetDefaultRoomLoadIndex(city, rType, out errMsg))
     {
         JCMsg.ShowInfoOK(JCMsg.INFO_SUCCESS);
         BindLoadIndexList(city);
     }
     else
     {
         JCMsg.ShowErrorOK(errMsg);
     }
 }
Example #13
0
        /// <summary>
        /// 编辑当前选中的 Load index 记录
        /// </summary>
        /// <param name="roomType"></param>
        private void DoEditIndex(RoomLoadIndex item)
        {
            frmLoadIndexAddIndex f = new frmLoadIndexAddIndex(item);

            if (f.ShowDialog() == DialogResult.OK)
            {
                RoomLoadIndex newItem = f.LoadIndexItem;
                if (bll.UpdateLoadIndex(newItem, out errMsg) == 1)
                {
                    JCMsg.ShowInfoOK(JCMsg.INFO_SUCCESS);
                    BindLoadIndexList(jccmbLocation.Text.Trim());
                }
                else
                {
                    JCMsg.ShowErrorOK(errMsg);
                }
            }
        }
Example #14
0
        // 插入指定文本(带style和font)
        #region InsertTextWithStyle
        /// <summary>
        /// 在书签位置 插入指定文本(带style)
        /// </summary>
        /// <param name="style"> 指定样式 </param>
        /// <param name="font"> 指定字体 </param>
        /// <param name="selection"></param>
        /// <param name="text"> 插入的字符串内容 </param>
        /// <param name="logInfo"> 日志内容 </param>
        /// <returns></returns>
        public static bool InsertTextWithStyle(object style, ref Word.Selection selection,
                                               string text, out string logInfo)
        {
            bool res = true;

            try
            {
                selection.set_Style(style);
                selection.TypeText(text);
                logInfo = "写入成功!";
            }
            catch (Exception ex)
            {
                JCMsg.ShowErrorOK(ex.GetType().ToString() + "\n" + ex.Message);
                res     = false;
                logInfo = "写入失败!";
            }
            return(res);
        }
Example #15
0
        // 在书签位置 插入指定文本(不带style)
        #region InsertTextToBookMark
        /// <summary>
        /// 在书签位置 插入指定文本(不带style)
        /// </summary>
        /// <param name="selection"></param>
        /// <param name="markName"> BookMark Name </param>
        /// <param name="text"> 插入的字符串内容 </param>
        /// <param name="logInfo"> 日志内容 </param>
        /// <returns></returns>
        public static bool InsertTextToBookMark(ref Word.Selection selection,
                                                string markName, string text, out string logInfo)
        {
            bool res = true;

            try
            {
                GoToBookMark(ref selection, markName);
                selection.TypeText(text);
                logInfo = "写入 【" + markName + "】 成功!";
            }
            catch (Exception ex)
            {
                JCMsg.ShowErrorOK(ex.GetType().ToString() + "\n" + ex.Message);
                res     = false;
                logInfo = "写入 【" + markName + "】 失败!";
            }
            return(res);
        }
Example #16
0
        /// <summary>
        /// 增加新的 Load index 记录
        /// </summary>
        private void DoAddIndex(string city)
        {
            frmLoadIndexAddIndex f = new frmLoadIndexAddIndex(city);

            if (f.ShowDialog() == DialogResult.OK)
            {
                RoomLoadIndex newItem = f.LoadIndexItem;
                int           index   = bll.AddLoadIndex(newItem, out errMsg);
                if (index == 1)
                {
                    JCMsg.ShowInfoOK(JCMsg.INFO_SUCCESS);
                    BindLoadIndexList(jccmbLocation.Text.Trim());
                }
                else if (index == 0)
                {
                    JCMsg.ShowErrorOK(Msg.ROOM_TYPE_IS_EXIST());
                }
                else
                {
                    JCMsg.ShowErrorOK(errMsg);
                }
            }
        }
Example #17
0
        private void btnControlOK_Click(object sender, EventArgs e)
        {
            if (!JCValidateSingle(jctxtIndoorDifference))
            {
                JCMsg.ShowWarningOK(Msg.WARNING_PAYATTENTION);
                return;
            }
            RoomIndoor emptyIndoor = new RoomIndoor();

            if (this.jccmbPosition.SelectedIndex == 0)
            {
                emptyIndoor.PositionType = PipingPositionType.Upper.ToString();
            }
            else if (this.jccmbPosition.SelectedIndex == 1)
            {
                emptyIndoor.PositionType = PipingPositionType.SameLevel.ToString();
            }
            else
            {
                emptyIndoor.PositionType = PipingPositionType.Lower.ToString();
            }
            emptyIndoor.HeightDiff = Unit.ConvertToSource(Convert.ToDouble(this.jctxtIndoorDifference.Text == "" ? "0" : this.jctxtIndoorDifference.Text), UnitType.LENGTH_M, ut_length);

            if (emptyIndoor.PositionType != PipingPositionType.SameLevel.ToString())
            {
                if (emptyIndoor.HeightDiff <= 0)
                {
                    JCMsg.ShowErrorOK(Msg.GetResourceString("INDOOR_HIGHERDIFFERENCE_LENGTH"));
                    return;
                }
            }
            //判断当前室外机高度差
            if (emptyIndoor.PositionType == PipingPositionType.Upper.ToString() && emptyIndoor.HeightDiff > sysItemSource.MaxOutdoorAboveHeight)
            {
                double len = Unit.ConvertToControl(sysItemSource.MaxOutdoorAboveHeight, UnitType.LENGTH_M, ut_length);
                JCMsg.ShowErrorOK(Msg.Piping_HeightDiffH(len.ToString("n0") + ut_length));
                return;
            }
            if (emptyIndoor.PositionType == PipingPositionType.Lower.ToString() && emptyIndoor.HeightDiff > sysItemSource.MaxOutdoorBelowHeight)
            {
                double len = Unit.ConvertToControl(sysItemSource.MaxOutdoorBelowHeight, UnitType.LENGTH_M, ut_length);
                JCMsg.ShowErrorOK(Msg.Piping_HeightDiffH(len.ToString("n0") + ut_length));
                return;
            }
            foreach (SelectedIDUList ind in SelIDUList)
            {
                int    IDU_ID     = ind.IndoorNo;
                double HeightDiff = emptyIndoor.HeightDiff;
                if (ind.IndoorTag is MyNodeCH)
                {
                    MyNodeCH nodech = ind.IndoorTag as MyNodeCH;
                    if (emptyIndoor.PositionType == PipingPositionType.Lower.ToString())
                    {
                        HeightDiff = -HeightDiff;
                    }
                    nodech.HeightDiff = HeightDiff;
                }
                else if (ind.IndoorTag is MyNodeMultiCH)
                {
                    MyNodeMultiCH nodech = ind.IndoorTag as MyNodeMultiCH;
                    if (emptyIndoor.PositionType == PipingPositionType.Lower.ToString())
                    {
                        HeightDiff = -HeightDiff;
                    }
                    nodech.HeightDiff = HeightDiff;
                }
                else if (ind.IndoorTag is MyNodeIn)
                {
                    MyNodeIn node = ind.IndoorTag as MyNodeIn;
                    node.RoomIndooItem.PositionType = emptyIndoor.PositionType.ToString();
                    node.RoomIndooItem.HeightDiff   = HeightDiff;
                    //RoomIndoor ri = listRISelected.Find(p => p.IndoorNO == IDU_ID);
                    // UpdateHeightDiff(ri, emptyIndoor);
                    //RoomIndoor inds = thisProject.RoomIndoorList.Find(p => p.IndoorNO == IDU_ID);
                    //UpdateHeightDiff(inds, emptyIndoor);
                }
            }
            RefreshPanel();
            BindHighDifference();
            //验证当前输入的高度差 是否大于系统
            VerificationHighDiff();
        }
Example #18
0
        /// <summary>
        /// 管长校验
        /// </summary>
        /// <returns></returns>
        private bool ValidateOthers()
        {
            // 多台室外机组成机组时,Connection kit之间的管长(b)不能小于0.5m add on 20170720 by Shen Junjie
            double betweenConnectionKits_Min = 0.5;

            for (int i = 0; i < _pipeLengthes.Length; i++)
            {
                double len = _pipeLengthes[i];
                //所有管长必须>0
                if (len <= 0)
                {
                    JCMsg.ShowErrorOK(Msg.PIPING_LINK_LENGTH);
                    return(false);
                }
                //connection kit前面的管长不能小于0.5m add on 2018/8/3 by Shen Junjie
                if (len < betweenConnectionKits_Min)
                {
                    if ((_nodeOut.UnitCount == 3 && i < 1) || (_nodeOut.UnitCount == 4 && i < 2))
                    {
                        string msg = Unit.ConvertToControl(betweenConnectionKits_Min, UnitType.LENGTH_M, ut_length).ToString("n1") + ut_length;
                        JCMsg.ShowErrorOK(Msg.PIPING_BETWEEN_CONNECTION_KITS_MIN_LENGTH("b", msg));
                        return(false);
                    }
                }
            }

            //第一Piping connection kit 与每一个室外机之间的管长不能大于10m
            double firstConnectionKitToODU_Max = curSystemItem.MaxFirstConnectionKitToEachODU;
            string firstConnectionKitToODU_Msg = Unit.ConvertToControl(firstConnectionKitToODU_Max, UnitType.LENGTH_M, ut_length).ToString("n2") + ut_length;

            if (_nodeOut.UnitCount == 2)
            {
                if (_pipeLengthes[0] > firstConnectionKitToODU_Max)
                {
                    JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("b", firstConnectionKitToODU_Msg));
                    return(false);
                }
                else if (_pipeLengthes[1] > firstConnectionKitToODU_Max)
                {
                    JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("c", firstConnectionKitToODU_Msg));
                    return(false);
                }
            }
            else if (_nodeOut.UnitCount == 3)
            {
                if (_pipeLengthes[1] > firstConnectionKitToODU_Max)
                {
                    JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("c", firstConnectionKitToODU_Msg));
                    return(false);
                }
                else if (_pipeLengthes[0] + _pipeLengthes[2] > firstConnectionKitToODU_Max)
                {
                    JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("b+d", firstConnectionKitToODU_Msg));
                    return(false);
                }
                else if (_pipeLengthes[0] + _pipeLengthes[3] > firstConnectionKitToODU_Max)
                {
                    JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("b+e", firstConnectionKitToODU_Msg));
                    return(false);
                }
            }
            else if (_nodeOut.UnitCount == 4)
            {
                if (!useDoublePipeB)
                {
                    if (_pipeLengthes[1] + _pipeLengthes[2] > firstConnectionKitToODU_Max)
                    {
                        JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("b+d", firstConnectionKitToODU_Msg));
                        return(false);
                    }
                    else if (_pipeLengthes[1] + _pipeLengthes[3] > firstConnectionKitToODU_Max)
                    {
                        JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("b+e", firstConnectionKitToODU_Msg));
                        return(false);
                    }
                    else if (_pipeLengthes[0] + _pipeLengthes[4] > firstConnectionKitToODU_Max)
                    {
                        JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("c+f", firstConnectionKitToODU_Msg));
                        return(false);
                    }
                    else if (_pipeLengthes[0] + _pipeLengthes[5] > firstConnectionKitToODU_Max)
                    {
                        JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("c+g", firstConnectionKitToODU_Msg));
                        return(false);
                    }
                }
                else
                {
                    if (_pipeLengthes[0] + _pipeLengthes[2] > firstConnectionKitToODU_Max)
                    {
                        JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("b+c", firstConnectionKitToODU_Msg));
                        return(false);
                    }
                    else if (_pipeLengthes[0] + _pipeLengthes[3] > firstConnectionKitToODU_Max)
                    {
                        JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("b+d", firstConnectionKitToODU_Msg));
                        return(false);
                    }
                    else if (_pipeLengthes[1] + _pipeLengthes[4] > firstConnectionKitToODU_Max)
                    {
                        JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("b+e", firstConnectionKitToODU_Msg));
                        return(false);
                    }
                    else if (_pipeLengthes[1] + _pipeLengthes[5] > firstConnectionKitToODU_Max)
                    {
                        JCMsg.ShowErrorOK(Msg.PIPING_FIRST_CONNECTION_KIT_TO_ODU_MAX_LENGTH("b+f", firstConnectionKitToODU_Msg));
                        return(false);
                    }
                }
            }

            return(true);
        }