예제 #1
0
        /// <summary>
        /// 读取触探孔数据函数
        /// </summary>
        private void ReadJkList()
        {
            // 读取钻孔数据
            JkList = CPTDataBase.ReadJkListAsClass(Program.currentProject);

            // 赋值ComboBox
            for (int i = 0; i < JkList.Count; i++)
            {
                CheckBox checkBox = new CheckBox();
                checkBox.Content = JkList[i].Name;
                this.JkListBox.Items.Add(checkBox);
            }
        }
예제 #2
0
        /// <summary>
        /// 筛选统计数据
        /// </summary>
        /// <returns></returns>
        public static StatisticWordLoad SelectStatisticData()
        {
            // 定义统计数据列表
            StatisticWordLoad statisticData = new StatisticWordLoad();

            // 读取钻孔列表
            List <Borehole> zkList = BoreholeDataBase.ReadZkListAsClass(Program.currentProject);

            // 统计钻孔数量
            int countZk = zkList.Count;

            double countZkDepth = 0;
            int    countUndisturbedSample = 0, countDisturbedSample = 0;
            int    countNTestStandard = 0, countNTestN10 = 0, countNTestN635 = 0, countNTestN120 = 0;

            foreach (Borehole zk in zkList)
            {
                // 统计钻孔进尺
                countZkDepth += zk.Layers[zk.Layers.Count - 1].Depth;

                // 统计原状样、扰动样数量
                foreach (ZkSample sample in zk.Samples)
                {
                    if (sample.IsDisturbed)
                    {
                        countDisturbedSample++;
                    }
                    else
                    {
                        countUndisturbedSample++;
                    }
                }

                // 统计标贯/动探数量
                foreach (ZkNTest ntest in zk.NTests)
                {
                    if (ntest.Type == ZkNTest.ntype.N)
                    {
                        countNTestStandard++;
                    }
                    else if (ntest.Type == ZkNTest.ntype.N10)
                    {
                        countNTestN10++;
                    }
                    else if (ntest.Type == ZkNTest.ntype.N635)
                    {
                        countNTestN635++;
                    }
                    else
                    {
                        countNTestN120++;
                    }
                }
            }

            // 读取土工常规试验列表
            List <RoutineSoilTest> rstList = RoutineSoilTestDataBase.ReadAllData(Program.currentProject);

            // 统计常规试验数量、室内渗透试验数量
            int    countRST = 0, countPermeability = 0;
            double n = -0.19880205;

            foreach (RoutineSoilTest rst in rstList)
            {
                // 统计室内渗透试验
                if (rst.permeability != n)
                {
                    countPermeability++;
                }

                //统计土工常规试验
                if (rst.waterLevel != n ||
                    rst.voidRatio != n ||
                    rst.specificGravity != n ||
                    rst.saturation != n ||
                    rst.plasticLimit != n ||
                    rst.plasticIndex != n ||
                    rst.modulus != n ||
                    rst.liquidLimit != n ||
                    rst.liquidityIndex != n ||
                    rst.frictionAngle != n ||
                    rst.density != n ||
                    rst.compressibility != n ||
                    rst.cohesion != n)
                {
                    countRST++;
                }
            }

            // 读取颗粒分析试验列表
            List <GrainAnalysisTest> gatList = GrainAnalysisTestDataBase.ReadAllData(Program.currentProject);

            // 统计颗分试验数量
            int countGAT = gatList.Count;

            // 读取静力触探列表
            List <CPT> jkList = CPTDataBase.ReadJkListAsClass(Program.currentProject);

            // 统计钻孔数量
            int countJk = jkList.Count;

            // 统计静力触探进尺
            double countJkDepth = 0;

            foreach (CPT jk in jkList)
            {
                countJkDepth += jk.Layers[jk.Layers.Count - 1].Depth;
            }

            // 赋值给统计列表
            statisticData.CountBorehole        = countZk;
            statisticData.CountBoreholePacking = countZk;
            statisticData.Borehole             = countZkDepth;
            statisticData.BoreholePacking      = countZkDepth;
            statisticData.UndisturbedSample    = countUndisturbedSample;
            statisticData.DisturbedSample      = countDisturbedSample;
            statisticData.NTestStandard        = countNTestStandard;
            statisticData.NTestN10             = countNTestN10;
            statisticData.NTestN635            = countNTestN635;
            statisticData.NTestN120            = countNTestN120;
            statisticData.CountCPT             = countJk;
            statisticData.CPT          = countJkDepth;
            statisticData.RST          = countRST;
            statisticData.Permeability = countPermeability;
            statisticData.GAT          = countGAT;

            // 返回
            return(statisticData);
        }