Ejemplo n.º 1
0
        public void start_SuiZuan()  //开始随钻
        {
            DrawCommonData.Initiate();

            if (this.tbDrillRadius.Text != "")
            {
                try
                {
                    DrawCommonData.drill_radius = double.Parse(this.tbDrillRadius.Text);
                }
                catch
                {
                    DrawCommonData.drill_radius = null;
                }
            }


            if (this.tbJingHao.Text == "" || this.tbStart.Text == "" || this.tbEnd.Text == "" || this.tbStepLength.Text == "" || this.tbInterval.Text == "")
            {
                MessageBox.Show("填写信息不全,无法进行随钻");
                return;
            }
            try
            {
                this.stepnum = double.Parse(this.tbStepLength.Text.ToString().Trim());
            }

            catch
            {
                MessageBox.Show("步长的格式不对,无法进行随钻");
                return;
            }

            try
            {
                this.timer1.Interval = Convert.ToInt32((double.Parse(this.tbInterval.Text.ToString().Trim()) * 1000));
            }

            catch
            {
                MessageBox.Show("随钻频率的格式不对,无法进行随钻");
                return;
            }
            //aaaa
            DrawCommonData.icount = 0;
            timer1.Enabled        = true;
            timer2.Enabled        = true;
            timer2.Interval       = timer1.Interval + 50;


            this.start_from_Zero = false;  //表示此时随钻已经开始



            Thread th = new Thread(this.check_SuiZuan_is_on_or_not);

            th.Start(); //此为检测随钻是否正在进行
        }
Ejemplo n.º 2
0
        private void SuiZuanForm_Load(object sender, EventArgs e)
        {
            menuStrip1.AutoSize = false;
            menuStrip1.Size     = new Size(100, 1);
            this.MainMenuStrip  = menuStrip1;
            #region    对静态类进行初始化
            DrawPointContainer.initiate();
            DrawCommonData.Initiate();
            pTableContainer.initiate();
            #endregion



            this.IsMdiContainer = true;


            DataTable dt = new DBHelper.SqlServerDAL("server=127.0.0.1;database=DQLREPORTDB;integrated security=true;").GetTable("use DQLREPORTDB select * from Draw_JH ");

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (i == dt.Rows.Count - 1)
                {
                    if (dt.Rows[i]["drawjh"].ToString().Length > 0)
                    {
                        this.tbJingHao.Text = dt.Rows[i]["drawjh"].ToString();
                    }
                }
            }

            DataTable mobanTable = new DBHelper.SqlServerDAL("server=127.0.0.1;database=DQLREPORTDB;integrated security=true;").GetTable("use JXBNCAD select LineRoadDesignName from LineRoadDesign");
            //this.cmbMoBan.Items
            foreach (DataRow row in mobanTable.Rows)
            {
                this.cmbMoBan.Items.Add(row[0].ToString());
            }

            commandLine.ExecuteCommand("new");



            /**
             *          void createForm()
             *      {
             *          //"new" order
             *          Childform form = new Childform();
             *          form.MdiParent = this;
             *          form.WindowState = FormWindowState.Maximized;
             *          form.Show();
             *
             *      }
             **/
        }
Ejemplo n.º 3
0
        public void Fdraw_pic(bool redraw)
        {
            SQLServerWorkDataProvider.invoke_method = "绘图";  //用绘图的方式读取数据库,即一次读完所有数据,不用depth

            if (redraw == false)
            {
                #region    对静态类进行初始化
                DrawPointContainer.initiate();
                DrawCommonData.Initiate();
                pTableContainer.initiate();
                #endregion
            }
            else
            {
                DrawPointContainer.initiate();
                DrawCommonData.Initiate();
            }

            DrawCommonData.icount   = 0;
            DrawCommonData.baseline = true;
            //绘图井,绘图框架等设计信息写入黑板区;
            this.mf.SetFrameDesign();
            //根据lb_LineRoadDesign重新整理线道设计顺序;
            //this.mf.SetLineRoadDesign();
            this.mf.ProperSetLineRoadDesign();


            //线道链表,线道框架即各个控制点数据等设计信息写入黑板区;
            FrameControlData.LineRoadControlLst = LineRoadOper.getLineRoadControlDataLst(LineRoadDesign.LineRoadDesginLst);
            WorkDataManage.WorkDataManage.BuildWorkDataHt();//获得绘图工作数据;将数据填充WorkDataManage类的WorkDataHt属性中;

            Entities.ClearAll();



            //绘图
            this.DrawLJJSPicture();
        }