private decimal getvalue7()
        {
            string    domain       = "Construction";
            string    objType_name = "SCHE";
            DGObjects objs         = Globals.project.objsDefIndex[objType_name];

            Type       objType = iS3Property.GetType(domain, objType_name);
            MethodInfo mi      = typeof(iS3Property).GetMethod("GetProperty").MakeGenericMethod(objType);
            Pile       ageo_mileage;

            foreach (DGObject ageo in objs.objContainer)
            {
                List <PropertyDef> _propertyDefs = mi.Invoke(new iS3Property(), new object[] { ageo }) as List <PropertyDef>;

                string st1, st2;
                st1 = _propertyDefs.Find(s => s.key.Equals("PROG_CCJD")).value;
                st2 = _propertyDefs.Find(s => s.key.Equals("PROG_ECJD")).value;
                if ((st1 == null) || (st2 == null))
                {
                    continue;
                }

                ageo_mileage = DrawObjects.getSectionPos(st1);
                decimal v1 = ageo_mileage.pilepoint;
                ageo_mileage = DrawObjects.getSectionPos(st2);
                decimal v2 = ageo_mileage.pilepoint;

                if (Math.Abs(v1 - v2) > 120)
                {
                    return(2);
                }
            }
            return(0);
        }
        private decimal getvalue8()
        {
            string    domain       = "Construction";
            string    objType_name = "SKTH";
            DGObjects objs         = Globals.project.objsDefIndex[objType_name];

            Type       objType = iS3Property.GetType(domain, objType_name);
            MethodInfo mi      = typeof(iS3Property).GetMethod("GetProperty").MakeGenericMethod(objType);

            foreach (DGObject ageo in objs.objContainer)
            {
                List <PropertyDef> _propertyDefs = mi.Invoke(new iS3Property(), new object[] { ageo }) as List <PropertyDef>;
                string             t1            = _propertyDefs.Find(s => s.key.Equals("SKTH_CHAI")).value;

                Pile ageo_mileage;
                if ((t1 == null) || (t1 == ""))
                {
                    continue;
                }
                ageo_mileage = DrawObjects.getSectionPos(t1);
                bool pos_flag = false;
                if (ageo_mileage.piletype == Piletype.point)
                {
                    if ((risk_position >= ageo_mileage.pilepoint - 40) && (risk_position <= ageo_mileage.pilepoint + 40))
                    {
                        pos_flag = true;
                    }
                }
                else
                {
                    if ((risk_position >= ageo_mileage.startpile) && (risk_position <= ageo_mileage.endpile))
                    {
                        pos_flag = true;
                    }
                }

                if (pos_flag == true)
                {
                    string st1;
                    st1 = _propertyDefs.Find(s => s.key.Equals("SKTH_WATG")).value;

                    if (st1 == null)
                    {
                        continue;
                    }
                    if (st1.Contains("淋雨状"))
                    {
                        return(3);
                    }
                    else
                    {
                        if (st1.Contains("大股"))
                        {
                            return(5);
                        }
                    }
                }
            }
            return(0);
        }
        private void PredictLining(object sender, RoutedEventArgs e)
        {
            if (null == tunnelpile)
            {
                return;
            }
            rec_type        = new List <string>();
            similar_section = new List <string>();
            foreach (MILN obj in miln_objList)
            {
                Pile t1 = DrawObjects.getSectionPos(obj.MILN_STAR);
                Pile t2 = DrawObjects.getSectionPos(obj.MILN_END);
                if (obj.MILN_LNTY != design_type)
                {
                    continue;
                }

                //判断是否为已施工段
                if ((tunnelpile.sectionnumber == "S1") || (tunnelpile.sectionnumber == "S2"))
                {
                    if (t2.pilepoint > tunnelpile.pilepoint)
                    {
                        continue;
                    }
                }
                else
                {
                    if (t1.endpile < tunnelpile.pilepoint)
                    {
                        continue;
                    }
                }

                foreach (CHAG obj1 in chag_objList)
                {
                    Pile _tp = DrawObjects.getSectionPos(obj1.CHAG_CHAI);
                    //找已经施工的且相同设计衬砌类型的施工段
                    if ((_tp.startpile >= t1.pilepoint) || (_tp.endpile <= t2.pilepoint))
                    {
                        if (!rec_type.Contains(obj1.CHAG_PRES))
                        {
                            rec_type.Add(obj1.CHAG_PRES);
                        }
                        if (!similar_section.Contains(obj1.CHAG_CHAI))
                        {
                            similar_section.Add(obj1.CHAG_CHAI);
                        }
                    }
                }
                lininglist.Items.Clear();
                lininglist.ItemsSource = rec_type;

                similarlining.Items.Clear();
                similarlining.ItemsSource = similar_section;
            }
        }
Example #4
0
        private void LiningPredictionWindow_Loaded(object sender, RoutedEventArgs e)
        {
            _prj      = Globals.project;
            mainFrame = Globals.mainFrame;

            _currentDoamin = _prj.getDomain("Construction");
            _getDGObjects  = _currentDoamin.DGObjectsList.Where(x => x.definition.Type == "ACHE").FirstOrDefault();
            //ache_objList = _getDGObjects.objContainer.Cast<ACHE>().ToList();
            ache_objList  = Transfer <ACHE>(_getDGObjects.objContainer);
            _getDGObjects = _currentDoamin.DGObjectsList.Where(x => x.definition.Type == "CHAG").FirstOrDefault();
            //chag_objList = _getDGObjects.objContainer.Cast<CHAG>().ToList();
            chag_objList = Transfer <CHAG>(_getDGObjects.objContainer);

            _currentDoamin = _prj.getDomain("Structure");
            _getDGObjects  = _currentDoamin.DGObjectsList.Where(x => x.definition.Type == "MILI").FirstOrDefault();
            //mili_objList = _getDGObjects.objContainer.Cast<MILN>().ToList();
            //use this func
            mili_objList = Transfer <MILI>(_getDGObjects.objContainer);

            DateTime latesttime = new DateTime(2000, 1, 1, 0, 0, 0);

            //寻找施工进度最新时间
            foreach (ACHE obj in ache_objList)
            {
                if (null != obj.PROG_DATE)
                {
                    DateTime temp = Convert.ToDateTime(obj.PROG_DATE);
                    if (DateTime.Compare(latesttime, temp) < 0)
                    {
                        latesttime = temp;
                    }
                }
            }
            //获取掌子面列表
            List <string> tunnelfacelist = new List <string>();

            foreach (ACHE obj in ache_objList)
            {
                if (obj.PROG_DATE == latesttime)
                {
                    string st        = obj.PROG_SGJD;
                    Pile   judgepile = DrawObjects.getSectionPos(st);
                    if (null != judgepile)
                    {
                        tunnelfacelist.Add(st);
                    }
                }
            }
            tunnelfacebox.ItemsSource = tunnelfacelist;
        }
        private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            int index1 = sect1.SelectedIndex;

            if (index1 == 0)
            {
                mileage.Text = "K4+020";
            }
            else if (index1 == 1)
            {
                mileage.Text = "K4+715";
            }
            else if (index1 == 2)
            {
                mileage.Text = "K0+180";
            }
            else if (index1 == 3)
            {
                mileage.Text = "YK10+820";
            }
            string t1 = mileage.Text;
            Pile   ageo_mileage;

            ageo_mileage  = DrawObjects.getSectionPos(t1);
            risk_position = ageo_mileage.pilepoint;
            g1.Content    = getvalue1().ToString();
            g2.Content    = getvalue2().ToString();
            g3.Content    = getvalue3().ToString();
            g4.Content    = getvalue4().ToString();
            g5.Content    = getvalue5().ToString();
            g6.Content    = getvalue6().ToString();
            g7.Content    = getvalue7().ToString();
            g8.Content    = getvalue8().ToString();
            g9.Content    = getvalue9().ToString();
            g10.Content   = getvalue10().ToString();
        }
Example #6
0
        private void tuennalfacebox_changed(object sender, SelectionChangedEventArgs e)
        {
            string _facepile = tunnelfacebox.SelectedValue.ToString();

            tunnelpile = DrawObjects.getSectionPos(_facepile);
            tunnelpile.sectionnumber = DrawObjects.getrightSectionnumber(tunnelpile.pilepoint);
            //找到该桩号的设计衬砌类型
            foreach (MILI obj in mili_objList)
            {
                Pile t1 = DrawObjects.getSectionPos(obj.MILI_STAR);
                Pile t2 = DrawObjects.getSectionPos(obj.MILI_END);

                if (t1.tunnelpart != tunnelpile.tunnelpart)
                {
                    continue;
                }
                if ((t1.pilepoint <= tunnelpile.pilepoint) && (t2.pilepoint >= tunnelpile.pilepoint))
                {
                    design_type = obj.MILI_LNTY;
                    break;
                }
            }
            disgntype.Text = design_type;
        }
        private decimal getvalue2()
        {
            string    domain       = "Geology";
            string    objType_name = "AGEO";
            Pile      ageo_mileage;
            DGObjects objs = Globals.project.objsDefIndex[objType_name];

            Type       objType = iS3Property.GetType(domain, objType_name);
            MethodInfo mi      = typeof(iS3Property).GetMethod("GetProperty").MakeGenericMethod(objType);



            foreach (DGObject ageo in objs.objContainer)
            {
                List <PropertyDef> _propertyDefs = mi.Invoke(new iS3Property(), new object[] { ageo }) as List <PropertyDef>;
                string             t             = _propertyDefs.Find(s => s.key.Equals("AGEO_DSRG")).value;

                if ((t == null) || (t == ""))
                {
                    continue;
                }
                string t1 = "";
                if (t.Contains("左"))
                {
                    t1 = t.Split('左')[0];
                }
                if (t.Contains("右"))
                {
                    t1 = t.Split('右')[0];
                }
                try
                {
                    ageo_mileage = DrawObjects.getSectionPos(t1);

                    bool pos_flag = false;
                    if (ageo_mileage.piletype == Piletype.point)
                    {
                        if ((risk_position >= ageo_mileage.pilepoint - 40) && (risk_position <= ageo_mileage.pilepoint + 40))
                        {
                            pos_flag = true;
                        }
                    }
                    else
                    {
                        if ((risk_position >= ageo_mileage.startpile) && (risk_position <= ageo_mileage.endpile))
                        {
                            pos_flag = true;
                        }
                    }

                    if (pos_flag == true)
                    {
                        string st1, st2;
                        st1 = _propertyDefs.Find(s => s.key.Equals("AGEO_TYPE")).value;
                        st2 = _propertyDefs.Find(s => s.key.Equals("AGEO_LAWD")).value;
                        if ((st2 == null) || (st1 == null))
                        {
                            continue;
                        }
                        if ((st1 == "溶洞") || (st1 == "岩溶漏斗"))
                        {
                            decimal dis = Convert.ToDecimal(st2);
                            if (dis < 8)
                            {
                                return(3);
                            }
                            else
                            {
                                if (dis < 24)
                                {
                                    return(2);
                                }
                                else
                                {
                                    return(1);
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                }
            }
            return(0);
        }
Example #8
0
        private void PredictLining(object sender, RoutedEventArgs e)
        {
            if (null == tunnelpile)
            {
                return;
            }
            rec_type        = new List <string>();
            similar_section = new List <string>();
            foreach (MILI obj in mili_objList)
            {
                Pile t1 = DrawObjects.getSectionPos(obj.MILI_STAR);
                Pile t2 = DrawObjects.getSectionPos(obj.MILI_END);

                if ((obj.MILI_LNTY != design_type) || (t1.tunnelpart != tunnelpile.tunnelpart))
                {
                    continue;
                }

                //判断是否为已施工段
                if ((tunnelpile.sectionnumber == "S1") || (tunnelpile.sectionnumber == "S2"))
                {
                    if (t1.pilepoint > tunnelpile.pilepoint)
                    {
                        continue;
                    }
                }
                else
                {
                    if (t2.pilepoint < tunnelpile.pilepoint)
                    {
                        continue;
                    }
                }

                foreach (CHAG obj1 in chag_objList)
                {
                    Pile _tp = DrawObjects.getSectionPos(obj1.CHAG_CHAI);
                    //找已经施工的且相同设计衬砌类型的施工段
                    if ((_tp.startpile >= t1.pilepoint) && (_tp.endpile <= t2.pilepoint) && (_tp.tunnelpart == t1.tunnelpart))
                    {
                        if ((tunnelpile.sectionnumber == "S1") || (tunnelpile.sectionnumber == "S2"))
                        {
                            if (_tp.endpile > tunnelpile.pilepoint)
                            {
                                continue;
                            }
                        }
                        else
                        {
                            if (_tp.startpile < tunnelpile.pilepoint)
                            {
                                continue;
                            }
                        }
                        if (!judgeliningtype(obj1.CHAG_PRES))
                        {
                            continue;
                        }
                        if (!rec_type.Contains(obj1.CHAG_PRES))
                        {
                            rec_type.Add(obj1.CHAG_PRES);
                        }
                        if (!similar_section.Contains(obj1.CHAG_CHAI))
                        {
                            similar_section.Add(obj1.CHAG_CHAI);
                        }
                    }
                }
            }

            if (rec_type.Count == 0)
            {
                rec_type.Add("建议采取设计衬砌类型");
            }
            lininglist.ItemsSource = rec_type;

            if (similar_section.Count == 0)
            {
                similar_section.Add("无相似施工段变更记录");
            }
            similarlining.ItemsSource = similar_section;
        }
        private void ACHE_Control_Loaded(object sender, RoutedEventArgs e)
        {
            _prj           = Globals.project;
            mainFrame      = Globals.mainFrame;
            _currentDoamin = _prj.getDomain("Construction");
            _getDGObjects  = _currentDoamin.DGObjectsList.Where(x => x.definition.Type == "ACHE").FirstOrDefault();
            ache_objList   = Transfer <ACHE>(_getDGObjects.objContainer);
            _getDGObjects  = _currentDoamin.DGObjectsList.Where(x => x.definition.Type == "SCHE").FirstOrDefault();
            sche_objList   = Transfer <SCHE>(_getDGObjects.objContainer);


            Dictionary <string, DateTime> latesttime = new Dictionary <string, DateTime>();
            DateTime temp2 = new DateTime(2000, 1, 1, 0, 0, 0);

            latesttime.Add("S1", temp2);
            latesttime.Add("S2", temp2);
            latesttime.Add("S3", temp2);
            latesttime.Add("S4", temp2);
            latesttime.Add("S2XJ", temp2);
            latesttime.Add("S3XJ", temp2);

            //寻找最新时间
            foreach (ACHE obj in ache_objList)
            {
                if (null != obj.PROG_DATE)
                {
                    string bd = obj.PROG_NAME;
                    if (latesttime[bd] != null)
                    {
                        DateTime temp1 = Convert.ToDateTime(obj.PROG_DATE);
                        if (DateTime.Compare(latesttime[bd], temp1) < 0)
                        {
                            latesttime[bd] = temp1;
                        }
                    }
                }
            }

            //计算各个实际进度比例
            ccdegree = new float[4];
            ecdegree = new float[4];
            ygdegree = new float[4];
            foreach (ACHE obj in ache_objList)
            {
                if ((obj.PROG_DATE != latesttime[obj.PROG_NAME]) || (obj.PROG_LORR != "右幅"))
                {
                    continue;
                }
                ccres = DrawObjects.getSectionPos(obj.PROG_CCJD);
                ecres = DrawObjects.getSectionPos(obj.PROG_ECJD);
                ygres = DrawObjects.getSectionPos(obj.PROG_YGJD);
                switch (obj.PROG_NAME)
                {
                case ("S1"):
                    if (ccres == null)
                    {
                        ccdegree[0] = 0;
                    }
                    else
                    {
                        ccdegree[0] = Convert.ToSingle(ccres.pilepoint - 1440) / (4300 - 1440);
                    }
                    if (ecres == null)
                    {
                        ecdegree[0] = 0;
                    }
                    else
                    {
                        ecdegree[0] = Convert.ToSingle(ecres.pilepoint - 1440) / (4300 - 1440);
                    }
                    if (ygres == null)
                    {
                        ygdegree[0] = 0;
                    }
                    else
                    {
                        ygdegree[0] = Convert.ToSingle(ygres.pilepoint - 1440) / (4300 - 1440);
                    }
                    break;

                case ("S2"):
                    if (ccres == null)
                    {
                        ccdegree[1] = 0;
                    }
                    else
                    {
                        ccdegree[1] = Convert.ToSingle(ccres.pilepoint - 4300) / (7200 - 4300);
                    }
                    if (ecres == null)
                    {
                        ecdegree[1] = 0;
                    }
                    else
                    {
                        ecdegree[1] = Convert.ToSingle(ecres.pilepoint - 4300) / (7200 - 4300);
                    }
                    if (ygres == null)
                    {
                        ygdegree[1] = 0;
                    }
                    else
                    {
                        ygdegree[1] = Convert.ToSingle(ygres.pilepoint - 4300) / (7200 - 4300);
                    }
                    break;

                case ("S3"):
                    if (ccres == null)
                    {
                        ccdegree[2] = 0;
                    }
                    else
                    {
                        ccdegree[2] = Convert.ToSingle(ccres.pilepoint - 10000) / (7200 - 10000);
                    }
                    if (ecres == null)
                    {
                        ecdegree[2] = 0;
                    }
                    else
                    {
                        ecdegree[2] = Convert.ToSingle(ecres.pilepoint - 10000) / (7200 - 10000);
                    }
                    if (ygres == null)
                    {
                        ygdegree[2] = 0;
                    }
                    else
                    {
                        ygdegree[2] = Convert.ToSingle(ygres.pilepoint - 10000) / (7200 - 10000);
                    }
                    break;

                case ("S4"):
                    if (ccres == null)
                    {
                        ccdegree[3] = 0;
                    }
                    else
                    {
                        ccdegree[3] = Convert.ToSingle(ccres.pilepoint - 12995) / (10000 - 12995);
                    }
                    if (ecres == null)
                    {
                        ecdegree[3] = 0;
                    }
                    else
                    {
                        ecdegree[3] = Convert.ToSingle(ecres.pilepoint - 12995) / (10000 - 12995);
                    }
                    if (ygres == null)
                    {
                        ygdegree[3] = 0;
                    }
                    else
                    {
                        ygdegree[3] = Convert.ToSingle(ygres.pilepoint - 12995) / (10000 - 12995);
                    }
                    break;

                default:
                    return;
                }
            }

            plandegree = new float[5, 4];
            //计算计划进度比例
            foreach (SCHE obj in sche_objList)
            {
                if ((obj.PROG_DATE != latesttime[obj.PROG_NAME]) || (obj.PROG_LORR != "右幅"))
                {
                    continue;
                }
                ccres = DrawObjects.getSectionPos(obj.PROG_CCJD);
                ecres = DrawObjects.getSectionPos(obj.PROG_ECJD);
                ygres = DrawObjects.getSectionPos(obj.PROG_YGJD);
                switch (obj.PROG_NAME)
                {
                case ("S1"):
                    if (ccres == null)
                    {
                        plandegree[1, 1] = 0;
                    }
                    else
                    {
                        plandegree[1, 1] = Convert.ToSingle(ccres.pilepoint - 1440) / (4300 - 1440);
                    }
                    if (ecres == null)
                    {
                        plandegree[1, 2] = 0;
                    }
                    else
                    {
                        plandegree[1, 2] = Convert.ToSingle(ecres.pilepoint - 1440) / (4300 - 1440);
                    }
                    if (ygres == null)
                    {
                        plandegree[1, 3] = 0;
                    }
                    else
                    {
                        plandegree[1, 3] = Convert.ToSingle(ygres.pilepoint - 1440) / (4300 - 1440);
                    }
                    break;

                case ("S2"):
                    if (ccres == null)
                    {
                        plandegree[2, 1] = 0;
                    }
                    else
                    {
                        plandegree[2, 1] = Convert.ToSingle(ccres.pilepoint - 4300) / (7200 - 4300);
                    }
                    if (ecres == null)
                    {
                        plandegree[2, 2] = 0;
                    }
                    else
                    {
                        plandegree[2, 2] = Convert.ToSingle(ecres.pilepoint - 4300) / (7200 - 4300);
                    }
                    if (ygres == null)
                    {
                        plandegree[2, 3] = 0;
                    }
                    else
                    {
                        plandegree[2, 3] = Convert.ToSingle(ygres.pilepoint - 4300) / (7200 - 4300);
                    }
                    break;

                case ("S3"):
                    if (ccres == null)
                    {
                        plandegree[3, 1] = 0;
                    }
                    else
                    {
                        plandegree[3, 1] = Convert.ToSingle(ccres.pilepoint - 10000) / (7200 - 10000);
                    }
                    if (ecres == null)
                    {
                        plandegree[3, 2] = 0;
                    }
                    else
                    {
                        plandegree[3, 2] = Convert.ToSingle(ecres.pilepoint - 10000) / (7200 - 10000);
                    }
                    if (ygres == null)
                    {
                        plandegree[3, 3] = 0;
                    }
                    else
                    {
                        plandegree[3, 3] = Convert.ToSingle(ygres.pilepoint - 10000) / (7200 - 10000);
                    }
                    break;

                case ("S4"):
                    if (ccres == null)
                    {
                        plandegree[4, 1] = 0;
                    }
                    else
                    {
                        plandegree[4, 1] = Convert.ToSingle(ccres.pilepoint - 12995) / (10000 - 12995);
                    }
                    if (ecres == null)
                    {
                        plandegree[4, 2] = 0;
                    }
                    else
                    {
                        plandegree[4, 2] = Convert.ToSingle(ecres.pilepoint - 12995) / (10000 - 12995);
                    }
                    if (ygres == null)
                    {
                        plandegree[4, 3] = 0;
                    }
                    else
                    {
                        plandegree[4, 3] = Convert.ToSingle(ygres.pilepoint - 12995) / (10000 - 12995);
                    }
                    break;

                default:
                    return;
                }
            }

            ache_colors = new List <string>()
            {
                "Yellow", "GreenYellow", "Khaki"
            };
            pilebackcolor = "Gray";

            S1_draw();
            S2_draw();
            S3_draw();
            S4_draw();
        }