/// <summary> /// 绘制录井解释图 /// </summary> private void DrawLJJSPicture() { Childform frm = this.ActiveMdiChild as Childform; if (frm == null) { return; } DrawCommonData.activeDocument = frm.vdScrollableControl1.BaseControl.ActiveDocument; if (!FrameDesign.Validate(this))//验证; 若!=true 则return { return; } LJJSBuilder ljjsBuilder = new LJJSBuilderImpl(); LJJSDirector ljjsDirector = new LJJSDirector(ljjsBuilder); ljjsDirector.BuildLJJS(); vdDocument activeDocu = DrawCommonData.activeDocument; /** * if (DrawCommonData.icount == 1) * { * * if (SuiZuanForm.startpoint != null && this.zoomed == false) * { * gPoint g1 = new gPoint(SuiZuanForm.startpoint.XValue - 100, SuiZuanForm.startpoint.YValue + 40); * gPoint g2 = new gPoint(g1.x + 900.0, g1.y - 450.0); * frm.vdScrollableControl1.BaseControl.ActiveDocument.ActiveLayOut.ZoomWindow(g1, g2); * this.zoomed = true; * } * * }**/ Childform cf = this.MdiChildren[0] as Childform; //自动缩放到合适的大小 if (DrawCommonData.icount == 1) { VectorDraw.Professional.ActionUtilities.vdCommandAction.ZoomE_Ex(cf.vdScrollableControl1.BaseControl.ActiveDocument); } activeDocu.Redraw(true); //commandLine.ExecuteCommand("ze"); //frm.vdScrollableControl1.BaseControl.ActiveDocument.CommandAction. }
private void SetFrameDesign() { if (DrawCommonData.icount == 0) { /**try * { * this.startDepth1 = int.Parse(this.tb__JDStart.Text.ToString().Trim()); * //this.startDepth1 = int.Parse(this.tb__JDStart.Text.ToString().Trim()); * this.startDepth2 = int.Parse(this.tb__JDEnd.Text.ToString().Trim()); * } * catch (Exception e) * { * MessageBox.Show("输入数据有误??????"); * return; * }**/ if (!string.IsNullOrEmpty(this.tbJingHao.Text)) { FrameDesign.JH = this.tbJingHao.Text; } //比例尺值计算; FrameDesign.CorValue = FrameDesign.XCoordinate + ":" + FrameDesign.YCoordinate;//比例尺值赋值 if (Math.Abs(FrameDesign.YCoordinate) > 0.0001) { FrameDesign.ValueCoordinate = FrameDesign.XCoordinate / FrameDesign.YCoordinate; } //井段设计 FrameDesign.JdStrLst.Clear(); //添加井段信息 string tmpJdStr = this.tbStart.Text + DrawCommonData.jdSplitter.ToString() + this.tbEnd.Text; FrameDesign.JdStrLst.Add(tmpJdStr); this.tmpjd = tmpJdStr; try { // string currData = this.lb_JD.SelectedItem.ToString().Trim(); //现在选中的记录 string[] strStartDepthArr = Regex.Split(this.tmpjd, DrawCommonData.jdSplitter.ToString()); this.startDepth1 = double.Parse(strStartDepthArr[0].Trim()); this.startDepth2 = double.Parse(strStartDepthArr[1].Trim()); } catch (Exception e) { MessageBox.Show("data Error"); throw e; } FrameDesign.Validate(this);//数据验证; } else { FrameDesign.JdStrLst.Clear(); if (this.startDepth1 < 0 || this.startDepth2 < 0) { MessageBox.Show("error"); throw new Exception("Error startDepth"); // return; } this.startDepth1 += this.stepnum; this.startDepth2 += this.stepnum; string jdstr = startDepth1.ToString() + DrawCommonData.jdSplitter + startDepth2.ToString(); FrameDesign.JdStrLst.Add(jdstr); } DrawCommonData.icount++; }