using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace GeoSigmaViewer { public partial class FormTestView : Form { GeoSigma geoSigma; bool isNewFile = false; public FormTestView() { InitializeComponent(); } private void FormTestView_Load(object sender, EventArgs e) { //if (geoSigma!=null) //{ // geoSigma.Dispose(); //} //string drawFile = "c:\\temp\\钻探目标分布图.dfd"; //geoSigma =null; //geoSigma=new GeoSigma(); //geoSigma.OpenDocument(drawFile); //isNewFile=true; ////pcbDrawer.Invalidate(); ////this.drawer1.Invalidate(); //this.Invalidate(); ////drawer1.OpenFile(drawFile); ////return true; } private void FormTestView_Paint(object sender, PaintEventArgs e) { //Graphics graphics = e.Graphics; //Rectangle rect = e.ClipRectangle; // e.ClipRectangle-差一个像素; ////graphics.Clear(Color.White); //if (geoSigma==null) //{ // return; //} //IntPtr pMemDC = graphics.GetHdc(); //if (isNewFile==true) //{ // geoSigma.Initialize(pMemDC, rect.X, rect.Y, rect.Right, rect.Bottom); // // 获取全图面积 // double dLeft = 0.0, dTop = 0.0, dRight = 0.0, dBottom = 0.0; // geoSigma.GetMapRange(ref dLeft, ref dTop, ref dRight, ref dBottom); // //this.mapRange=RectangleD.FromLTRB(dLeft, dTop, dRight, dBottom); // //SetScrollBar(); // isNewFile=false; //} //else //{ // geoSigma.SetDC(pMemDC, rect.X, rect.Y, rect.Right, rect.Bottom); //} //geoSigma.Redraw(); } } }