Esempio n. 1
0
        public void setruler(double x, double y)
        {
            //主标尺系统
            double mainchip = DipHelper.GetRulerMileage(x);

            //显示隧道主洞桩号
            hruler.Chip = mainchip;
            int    i   = (int)Math.Round(mainchip);
            string st  = i.ToString();
            string st1 = st.Substring(0, st.Length - 3);

            if ((st1 == null) || (st1 == ""))
            {
                st1 = "0";
            }
            string st2 = st.Substring(st.Length - 3);

            if (partchar == '左')
            {
                st = "ZK" + st1 + "+" + st2;
            }
            else
            {
                st = "YK" + st1 + "+" + st2;
            }
            MapCoordsZH.Text = "桩号:" + st;
            //显示沿桩衬砌
            mili_ruler.Chip = mainchip;

            //显示高程信息
            double heightchip = DipHelper.GetRulerAltitude(y);

            vruler.Chip      = heightchip;
            st               = Math.Round(heightchip).ToString();
            MapCoordsGC.Text = "高程:" + st + "米";

            //显示斜井桩号
            int pile = DipHelper.GetRulerXJMileage(Convert.ToInt32(x));

            xjruler.Chip = x;
            string temp;

            if (x < 3250)
            {
                temp = "BX";
            }
            else
            {
                temp = "LX";
            }

            if (pile >= 0)
            {
                st  = pile.ToString().PadLeft(4, '0');
                st2 = st.Substring(st.Length - 3);
                st  = temp + "K" + st[0] + "+" + st2;
                MapCoordsXJ.Text = "斜井桩号:" + st;
            }
        }