Browse Source

can add measure area and moving sizing the area(but not set to low level)

gsp 3 years ago
parent
commit
2df846729d

+ 1 - 1
OTSIncAMeasureApp/1-OTSMeasure/OTSMeasureDisplayResult.cs

@@ -393,7 +393,7 @@ namespace OTSMeasureApp
                                 if (m_MeasureApp.m_MessageStates == MessageState.ShotBSEPicture)
                                 if (m_MeasureApp.m_MessageStates == MessageState.ShotBSEPicture)
                                 {
                                 {
                                     //根据放大倍数、重新绘制帧图信息
                                     //根据放大倍数、重新绘制帧图信息
-                                    m_MeasureApp.m_SamplepaceWindow.DrawMeasureField();
+                                    //m_MeasureApp.m_SamplepaceWindow.DrawMeasureField();
                                 }
                                 }
                                 break;
                                 break;
                             //测量状态已完成
                             //测量状态已完成

+ 3 - 2
OTSIncAMeasureApp/2-OTSMeasureParamManage/COTSMeasureParam.cs

@@ -647,10 +647,10 @@ namespace OTSMeasureApp
             CDomain Domain = new CDomain();
             CDomain Domain = new CDomain();
             Domain.SetShape((otsdataconst.DOMAIN_SHAPE)SMeasurePara.iShape);
             Domain.SetShape((otsdataconst.DOMAIN_SHAPE)SMeasurePara.iShape);
             Domain.SetRectDomain(SMeasurePara.MeasureRect);
             Domain.SetRectDomain(SMeasurePara.MeasureRect);
-            if (SMeasurePara.DrawPolygonPointRegionF != null)
+            if (SMeasurePara.DrawPolygonPointList != null)
             {
             {
                 List<Point> PolygonPoint = new List<Point>();
                 List<Point> PolygonPoint = new List<Point>();
-                foreach (var item in SMeasurePara.DrawPolygonPointRegionF)
+                foreach (var item in SMeasurePara.DrawPolygonPointList)
                 {
                 {
                     PolygonPoint.Add(new Point((int)item.X, (int)item.Y));
                     PolygonPoint.Add(new Point((int)item.X, (int)item.Y));
                 }
                 }
@@ -1691,6 +1691,7 @@ namespace OTSMeasureApp
         {
         {
             bool reuslt = false;
             bool reuslt = false;
             COTSSample COTSSample = GetResultData().GetWorkingSample();
             COTSSample COTSSample = GetResultData().GetWorkingSample();
+            if (COTSSample == null) return false;
             int sampleStatus = COTSSample.GetMsrStatus().GetCompletedFields();
             int sampleStatus = COTSSample.GetMsrStatus().GetCompletedFields();
             if (sampleStatus > 0)
             if (sampleStatus > 0)
             {
             {

+ 2 - 2
OTSIncAMeasureApp/3-OTSDisplaySourceGridData/OTSPropertyWindow.cs

@@ -270,8 +270,8 @@ namespace OTSMeasureApp
                     || OTS_SAMPLE_PROP_GRID_ITEMS.IMAGERESOLUTION_SIZE == SampleId)
                     || OTS_SAMPLE_PROP_GRID_ITEMS.IMAGERESOLUTION_SIZE == SampleId)
                 {
                 {
                     m_MeasureAppForm.m_MessageStates = (int)MessageState.StartMeasure;
                     m_MeasureAppForm.m_MessageStates = (int)MessageState.StartMeasure;
-                    m_MeasureAppForm. m_SamplepaceWindow.DrawMeasureField();
-                }
+                m_MeasureAppForm.m_SamplepaceWindow.DrawMeasureField();
+            }
           
           
         }
         }
 
 

+ 412 - 270
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/CreateRectangle.cs

@@ -41,19 +41,19 @@ namespace OTSMeasureApp
 
 
         public CRectangleGDIObject(RectangleF rect, CreateRectangleType cType)
         public CRectangleGDIObject(RectangleF rect, CreateRectangleType cType)
         {
         {
-            //m_RegionF = rect;
+       
             m_OrigineRegionF = rect;
             m_OrigineRegionF = rect;
             SetInitRegionF(m_OrigineRegionF);
             SetInitRegionF(m_OrigineRegionF);
             CreateType = cType;
             CreateType = cType;
             ID = System.Guid.NewGuid().ToString();
             ID = System.Guid.NewGuid().ToString();
-            startPoint = new PointF(rect.Left, rect.Top);
-            EndPoint = new PointF(rect.Right, rect.Bottom);
+            //startPoint = new PointF(rect.Left, rect.Top);
+            //EndPoint = new PointF(rect.Right, rect.Bottom);
             OTSX = -1;
             OTSX = -1;
             OTSY = -1;
             OTSY = -1;
         }
         }
         public CRectangleGDIObject(RectangleF rect, CreateRectangleType cType, string name)
         public CRectangleGDIObject(RectangleF rect, CreateRectangleType cType, string name)
         {
         {
-            //m_RegionF = rect;
+     
             m_OrigineRegionF = rect;
             m_OrigineRegionF = rect;
             SetInitRegionF(m_OrigineRegionF);
             SetInitRegionF(m_OrigineRegionF);
             CreateType = cType;
             CreateType = cType;
@@ -64,7 +64,7 @@ namespace OTSMeasureApp
         }
         }
         public CRectangleGDIObject(RectangleF rect, CreateRectangleType cType, ShapeType shape, string name)
         public CRectangleGDIObject(RectangleF rect, CreateRectangleType cType, ShapeType shape, string name)
         {
         {
-            //m_RegionF = rect;
+      
             m_OrigineRegionF = rect;
             m_OrigineRegionF = rect;
             SetInitRegionF(m_OrigineRegionF);
             SetInitRegionF(m_OrigineRegionF);
             CreateType = cType;
             CreateType = cType;
@@ -76,7 +76,7 @@ namespace OTSMeasureApp
         }
         }
         public CRectangleGDIObject(RectangleF rect, CreateRectangleType cType, ShapeType shape, string name, Color selColor)
         public CRectangleGDIObject(RectangleF rect, CreateRectangleType cType, ShapeType shape, string name, Color selColor)
         {
         {
-            //m_RegionF = rect;
+          
             m_OrigineRegionF = rect;
             m_OrigineRegionF = rect;
             SetInitRegionF(m_OrigineRegionF);
             SetInitRegionF(m_OrigineRegionF);
             CreateType = cType;
             CreateType = cType;
@@ -89,7 +89,7 @@ namespace OTSMeasureApp
         }
         }
         public CRectangleGDIObject(RectangleF rectMeasure,  CreateRectangleType cType, ShapeType shape, string name, string sampleName, Color selColor)
         public CRectangleGDIObject(RectangleF rectMeasure,  CreateRectangleType cType, ShapeType shape, string name, string sampleName, Color selColor)
         {
         {
-            //m_RegionF = rectMeasure;
+      
             m_OrigineRegionF = rectMeasure;
             m_OrigineRegionF = rectMeasure;
             SetInitRegionF(m_OrigineRegionF);
             SetInitRegionF(m_OrigineRegionF);
             CreateType = cType;
             CreateType = cType;
@@ -105,7 +105,7 @@ namespace OTSMeasureApp
         //绘制帧图
         //绘制帧图
         public CRectangleGDIObject(RectangleF rectSingle, CreateRectangleType cType, string name, string sampleName, Color selColor)
         public CRectangleGDIObject(RectangleF rectSingle, CreateRectangleType cType, string name, string sampleName, Color selColor)
         {
         {
-            //m_RegionF = rectSingle;
+          
             m_OrigineRegionF = rectSingle;
             m_OrigineRegionF = rectSingle;
             SetInitRegionF(m_OrigineRegionF);
             SetInitRegionF(m_OrigineRegionF);
             CreateType = cType;
             CreateType = cType;
@@ -120,7 +120,7 @@ namespace OTSMeasureApp
         //绘制帧图
         //绘制帧图
         public CRectangleGDIObject(RectangleF rectSingle, int OTSx, int OTSy, CreateRectangleType cType, string name, string sampleName, Color selColor)
         public CRectangleGDIObject(RectangleF rectSingle, int OTSx, int OTSy, CreateRectangleType cType, string name, string sampleName, Color selColor)
         {
         {
-            //m_RegionF = rectSingle;
+         
             m_OrigineRegionF = rectSingle;
             m_OrigineRegionF = rectSingle;
             SetInitRegionF(m_OrigineRegionF);
             SetInitRegionF(m_OrigineRegionF);
             CreateType = cType;
             CreateType = cType;
@@ -145,7 +145,7 @@ namespace OTSMeasureApp
         /// <param name="cType">绘制类型</param>
         /// <param name="cType">绘制类型</param>
         public CRectangleGDIObject(RectangleF rect, int OTSx, int OTSy, string sampleName, string sampleHoleName, Image bseImage, float bseImageWitdh, float bseImageHeight, CreateRectangleType cType)
         public CRectangleGDIObject(RectangleF rect, int OTSx, int OTSy, string sampleName, string sampleHoleName, Image bseImage, float bseImageWitdh, float bseImageHeight, CreateRectangleType cType)
         {
         {
-            //m_RegionF = rect;
+         
             m_OrigineRegionF = rect;
             m_OrigineRegionF = rect;
             SetInitRegionF(m_OrigineRegionF);
             SetInitRegionF(m_OrigineRegionF);
             Name = sampleHoleName;
             Name = sampleHoleName;
@@ -169,14 +169,13 @@ namespace OTSMeasureApp
 
 
         public CRectangleGDIObject(RectangleF rect, Point ImgPoint, float m_Multiple, CreateRectangleType cType)
         public CRectangleGDIObject(RectangleF rect, Point ImgPoint, float m_Multiple, CreateRectangleType cType)
         {
         {
-            //m_RegionF.X = rect.X - ImgPoint.X * m_Multiple;
-            //m_RegionF.Y = rect.Y - ImgPoint.Y * m_Multiple;
+
             m_OrigineRegionF = rect;
             m_OrigineRegionF = rect;
             SetInitRegionF(m_OrigineRegionF);
             SetInitRegionF(m_OrigineRegionF);
             CreateType = cType;
             CreateType = cType;
             ID = System.Guid.NewGuid().ToString();
             ID = System.Guid.NewGuid().ToString();
-            startPoint = new PointF(rect.Left, rect.Top);
-            EndPoint = new PointF(rect.Right, rect.Bottom);
+            //startPoint = new PointF(rect.Left, rect.Top);
+            //EndPoint = new PointF(rect.Right, rect.Bottom);
             OTSX = -1;
             OTSX = -1;
             OTSY = -1;
             OTSY = -1;
         }
         }
@@ -188,232 +187,27 @@ namespace OTSMeasureApp
         public CRectangleGDIObject(List<PointF> mPoint, CreateRectangleType cType, ShapeType shape, string name, string sampleName, Color selColor)
         public CRectangleGDIObject(List<PointF> mPoint, CreateRectangleType cType, ShapeType shape, string name, string sampleName, Color selColor)
         {
         {
             ID = System.Guid.NewGuid().ToString();
             ID = System.Guid.NewGuid().ToString();
-            List<Point> PointRegion = new List<Point>();
-            foreach (var item in mPoint)
-            {
-                PointRegion.Add(new Point((int)item.X, (int)item.Y));
-            }
-            PolygonPointRegion = PointRegion;
-            PolygonPointRegionF = mPoint;
-            List<PointF> DrawPoint = new List<PointF>();
-            foreach (var item in mPoint)
-            {
-                DrawPoint.Add(item);
-            }
-           
-            m_PolygonPointRegionF = DrawPoint;
+
+            this.PolygonPointFList = mPoint;
+
+
             Name = name;
             Name = name;
             SampleName = sampleName;
             SampleName = sampleName;
             CreateType = cType;
             CreateType = cType;
             Shape = shape;
             Shape = shape;
             SelColor = selColor;
             SelColor = selColor;
-        }
-        #region 变量重写
-        public  Image BSEImage
-        {
-            get { return bseImage; }
-            set { bseImage = value; }
-        }
-        public  float BSEImageWitdh
-        {
-            get { return bseImageWidth; }
-            set { bseImageWidth = value; }
-        }
-        public  float BSEImageHeight
-        {
-            get { return bseImageHeight; }
-            set { bseImageHeight = value; }
-        }
-        public  PointF BSEImageLocation
-        {
-            get { return bseImageLocation; }
-            set { bseImageLocation = value; }
-        }
-        public  Color LineColor
-        {
-            get { return lineColor; }
-            set { lineColor = value; }
-        }
-        public  float LineLength
-        {
-            get { return lineLength; }
-            set { lineLength = value; }
-        }
-        public  PointF LineStartPoint
-        {
-            get { return lineStartPoint; }
-            set { lineStartPoint = value; }
-        }
-        public  PointF SEMCenterPoint
-        {
-            get { return semCenterPoint; }
-            set { semCenterPoint = value; }
-        }
-        public  int OTSX
-        {
-            get { return otsX; }
-            set { otsX = value; }
-        }
-        public  int OTSY
-        {
-            get { return otsY; }
-            set { otsY = value; }
-        }
-        public  CreateRectangleType CreateType
-        {
-            get { return createType; }
-            set { createType = value; }
-        }
-        public  ShapeType Shape
-        {
-            get { return shape; }
-            set { shape = value; }
-        }
-        public  Color SelColor
-        {
-            get { return selColor; }
-            set { selColor = value; }
-        }
-        public  string Name
-        {
-            get { return name; }
-            set { name = value; }
-        }
-        public  string ID
-        {
-            get { return id; }
-            set { id = value; }
-        }
-        public  string SampleName
-        {
-            get { return sampleName; }
-            set { sampleName = value; }
-        }
-        public  int SampleCount
-        {
-            get { return sampleCount; }
-            set { sampleCount = value; }
-        }
-        public string StrContent
-        {
-            get { return strContent; }
-            set { strContent = value; }
-        }
-        public  RectangleF GetZoomedRegion
-        {
-            
-            get {
-                var m_Region = new RectangleF();
-                m_Region.X = m_RegionF.X;
-                m_Region.Y = m_RegionF.Y;
-                m_Region.Width = m_RegionF.Width;
-                m_Region.Height = m_RegionF.Height;
-                   return m_Region;          
-                }
-           
-        }
 
 
-        public  RectangleF GetZoomedRegionF()
-        { 
-            return m_RegionF; 
-        }
-        public  void SetInitRegionF(RectangleF OrigineRegionF)//not zoomed regine value
-        {
             
             
+            //if(mPoint.Count>2)
+                
+            //GPath.AddPolygon(PolygonPointFList.ToArray());
+         
 
 
-            float x1, y1;
-            x1 = OrigineRegionF.X * m_zoomNum + m_refPoint.X;
-            y1 = OrigineRegionF.Y * m_zoomNum + m_refPoint.Y;
-
-            float w1, h1;
-            w1 = OrigineRegionF.Width * m_zoomNum;
-            h1 = OrigineRegionF.Height * m_zoomNum;
-
-
-
-            m_OrigineRegionF = OrigineRegionF;
-
-            m_RegionF = new RectangleF(x1, y1, w1, h1);
-
-            CreateRectangleType shape = this.CreateType;
-            GraphicsPath MeasurePath = new GraphicsPath();
-            if (shape == CreateRectangleType.Rectangle)
-            {
-                MeasurePath.AddRectangle(m_RegionF);
-            }
-            else
-            {
-                MeasurePath.AddEllipse(m_RegionF);
-            }
-            this.g_Path = MeasurePath;
-
-
-        }
-        public  RectangleF OrigionalDrawRegionF
-        {
-            get { return m_OrigineRegionF; }
-          
-        }
-
-        public  List<Point> PolygonPointRegion
-        {
-            get { return m_PolygonPointRegion; }
-            set { m_PolygonPointRegion = value; }
-        }
-
-        public  List<PointF> PolygonPointRegionF
-        {
-            get { return m_PolygonPointRegionF; }
-            set { m_PolygonPointRegionF = value; }
-        }
-
-        public  List<PointF> DrawPolygonPointRegionF
-        {
-            get { return m_DrawPolygonPointRegionF; }
-            //set { m_DrawPolygonPointRegionF = value; }
-        }
 
 
-        public  GraphicsPath GPath
-        {
-            get { return g_Path; }
-            set { g_Path = value; }
         }
         }
-        public  PointF StartPoint
-        {
-            get { return startPoint; }
-            set { startPoint = value; }
-        }
-        public  PointF EndPoint
-        {
-            get { return endPoint; }
-            set { endPoint = value; }
-        }
-  
-
-        public  Point GetZoomedCenterPoint()
-        {
-            Point pCenterPoint = new Point();
-            //获取在工作窗口中X,Y位置
-            pCenterPoint.X = (int)(this.GetZoomedRegion.X + this.GetZoomedRegion.Width / 2);
-            pCenterPoint.Y = (int)(this.GetZoomedRegion.Y + this.GetZoomedRegion.Height / 2);
-            return pCenterPoint;
-        }
-
-        public Point GetCenterPoint()
-        {
-            Point pCenterPoint = new Point();
-            //获取在工作窗口中X,Y位置
-            pCenterPoint.X = (int)(this.OrigionalDrawRegionF.X + this.OrigionalDrawRegionF.Width / 2);
-            pCenterPoint.Y = (int)(this.OrigionalDrawRegionF.Y + this.OrigionalDrawRegionF.Height / 2);
-            return pCenterPoint;
-        }
-        #endregion
-
-
-        public  void OnPaint(PaintEventArgs e)
+        #region 变量重写
+        public void OnPaint(PaintEventArgs e)
         {
         {
-       
-
 
 
             //createType=0 圆角矩形 createType=1 圆形 createType=2 文字
             //createType=0 圆角矩形 createType=1 圆形 createType=2 文字
             if (createType == CreateRectangleType.SampleBackGround_Rectangle)
             if (createType == CreateRectangleType.SampleBackGround_Rectangle)
@@ -531,11 +325,11 @@ namespace OTSMeasureApp
                 e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;  //图片柔顺模式选择
                 e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;  //图片柔顺模式选择
                 e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;//高质量
                 e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;//高质量
                 e.Graphics.CompositingQuality = CompositingQuality.HighQuality;//再加一点
                 e.Graphics.CompositingQuality = CompositingQuality.HighQuality;//再加一点
-            
+
 
 
                 if (Shape == 0)
                 if (Shape == 0)
                 {
                 {
-                    
+
                     e.Graphics.DrawEllipse(p, m_RegionF);
                     e.Graphics.DrawEllipse(p, m_RegionF);
                 }
                 }
                 else
                 else
@@ -545,7 +339,7 @@ namespace OTSMeasureApp
                     m_Region.Y = (int)m_RegionF.Y;
                     m_Region.Y = (int)m_RegionF.Y;
                     m_Region.Width = (int)m_RegionF.Width;
                     m_Region.Width = (int)m_RegionF.Width;
                     m_Region.Height = (int)m_RegionF.Height;
                     m_Region.Height = (int)m_RegionF.Height;
-                   
+
                     e.Graphics.DrawRectangle(p, m_Region);
                     e.Graphics.DrawRectangle(p, m_Region);
 
 
                 }
                 }
@@ -688,8 +482,8 @@ namespace OTSMeasureApp
                 Pen pen = new Pen(sampleBrush, 2f);
                 Pen pen = new Pen(sampleBrush, 2f);
                 int X = (int)m_OrigineRegionF.X;
                 int X = (int)m_OrigineRegionF.X;
                 int Y = (int)m_OrigineRegionF.Y;
                 int Y = (int)m_OrigineRegionF.Y;
-                e.Graphics.DrawLine(pen, new Point(X-8,Y), new Point(X+8, Y));
-                e.Graphics.DrawLine(pen, new Point(X, Y-8), new Point(X, Y+8));
+                e.Graphics.DrawLine(pen, new Point(X - 8, Y), new Point(X + 8, Y));
+                e.Graphics.DrawLine(pen, new Point(X, Y - 8), new Point(X, Y + 8));
             }
             }
             //绘制多边形测量区域
             //绘制多边形测量区域
             else if (createType == CreateRectangleType.Polygon)
             else if (createType == CreateRectangleType.Polygon)
@@ -700,25 +494,21 @@ namespace OTSMeasureApp
                 Color myColor = selColor;
                 Color myColor = selColor;
                 System.Drawing.SolidBrush sampleBrush = new System.Drawing.SolidBrush(myColor);
                 System.Drawing.SolidBrush sampleBrush = new System.Drawing.SolidBrush(myColor);
                 Pen pen = new Pen(myColor, 1);
                 Pen pen = new Pen(myColor, 1);
-                if (PolygonPointRegionF.Count > 0)
+                if (PolygonPointFList.Count > 1)
                 {
                 {
                     List<PointF> PolygonPointF = new List<PointF>();
                     List<PointF> PolygonPointF = new List<PointF>();
-                    foreach (var item in PolygonPointRegionF)
+                    foreach (var item in m_PolygonPoints)
                     {
                     {
                         PolygonPointF.Add(item);
                         PolygonPointF.Add(item);
                     }
                     }
-                    if (EndPoint.X != 0 && EndPoint.Y != 0)
+                    if (PolygonDrawingEndPoint.X != 0 && PolygonDrawingEndPoint.Y != 0)
                     {
                     {
-                        PolygonPointF.Add(EndPoint);
+                        PolygonPointF.Add(PolygonDrawingEndPoint);
                     }
                     }
-                   
-                        e.Graphics.DrawLines(pen, PolygonPointF.ToArray());
-                        //多边形的外接矩形
-                        //if (Region != null)
-                        //{
-                        //    e.Graphics.DrawRectangle(new Pen(Color.Green), Region);
-                        //}
+
+                    e.Graphics.DrawLines(pen, PolygonPointF.ToArray());
                     
                     
+
                 }
                 }
             }//多边形测量区域完成标识
             }//多边形测量区域完成标识
             else if (createType == CreateRectangleType.DrawPolygonFinish)
             else if (createType == CreateRectangleType.DrawPolygonFinish)
@@ -750,25 +540,312 @@ namespace OTSMeasureApp
                 e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;  //图片柔顺模式选择
                 e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;  //图片柔顺模式选择
                 e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;//高质量
                 e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;//高质量
                 e.Graphics.CompositingQuality = CompositingQuality.HighQuality;//再加一点
                 e.Graphics.CompositingQuality = CompositingQuality.HighQuality;//再加一点
-          
+
                 var m_Region = new Rectangle();
                 var m_Region = new Rectangle();
                 m_Region.X = (int)m_RegionF.X;
                 m_Region.X = (int)m_RegionF.X;
                 m_Region.Y = (int)m_RegionF.Y;
                 m_Region.Y = (int)m_RegionF.Y;
                 m_Region.Width = (int)m_RegionF.Width;
                 m_Region.Width = (int)m_RegionF.Width;
                 m_Region.Height = (int)m_RegionF.Height;
                 m_Region.Height = (int)m_RegionF.Height;
                 e.Graphics.DrawEllipse(p, m_Region);
                 e.Graphics.DrawEllipse(p, m_Region);
+
+            }
+        }
+        public  Image BSEImage
+        {
+            get { return bseImage; }
+            set { bseImage = value; }
+        }
+        public  float BSEImageWitdh
+        {
+            get { return bseImageWidth; }
+            set { bseImageWidth = value; }
+        }
+        public  float BSEImageHeight
+        {
+            get { return bseImageHeight; }
+            set { bseImageHeight = value; }
+        }
+        public  PointF BSEImageLocation
+        {
+            get { return bseImageLocation; }
+            set { bseImageLocation = value; }
+        }
+        public  Color LineColor
+        {
+            get { return lineColor; }
+            set { lineColor = value; }
+        }
+        public  float LineLength
+        {
+            get { return lineLength; }
+            set { lineLength = value; }
+        }
+        public  PointF LineStartPoint
+        {
+            get { return lineStartPoint; }
+            set { lineStartPoint = value; }
+        }
+        public  PointF SEMCenterPoint
+        {
+            get { return semCenterPoint; }
+            set { semCenterPoint = value; }
+        }
+        public  int OTSX
+        {
+            get { return otsX; }
+            set { otsX = value; }
+        }
+        public  int OTSY
+        {
+            get { return otsY; }
+            set { otsY = value; }
+        }
+        public  CreateRectangleType CreateType
+        {
+            get { return createType; }
+            set { createType = value; }
+        }
+        public  ShapeType Shape
+        {
+            get { return shape; }
+            set { shape = value; }
+        }
+        public  Color SelColor
+        {
+            get { return selColor; }
+            set { selColor = value; }
+        }
+        public  string Name
+        {
+            get { return name; }
+            set { name = value; }
+        }
+        public  string ID
+        {
+            get { return id; }
+            set { id = value; }
+        }
+        public  string SampleName
+        {
+            get { return sampleName; }
+            set { sampleName = value; }
+        }
+        public  int SampleCount
+        {
+            get { return sampleCount; }
+            set { sampleCount = value; }
+        }
+        public string StrContent
+        {
+            get { return strContent; }
+            set { strContent = value; }
+        }
+        public  RectangleF GetZoomedRegion
+        {
+            
+            get {
+                var m_Region = new RectangleF();
+                m_Region.X = m_RegionF.X;
+                m_Region.Y = m_RegionF.Y;
+                m_Region.Width = m_RegionF.Width;
+                m_Region.Height = m_RegionF.Height;
+                   return m_Region;          
+                }
+           
+        }
+
+        public  RectangleF GetZoomedRegionF()
+        { 
+            return m_RegionF; 
+        }
+        public  void SetInitRegionF(RectangleF OrigineRegionF)//not zoomed regine value
+        {
+            
+
+            float x1, y1;
+            x1 = OrigineRegionF.X * m_zoomNum + m_refPoint.X;
+            y1 = OrigineRegionF.Y * m_zoomNum + m_refPoint.Y;
+
+            float w1, h1;
+            w1 = OrigineRegionF.Width * m_zoomNum;
+            h1 = OrigineRegionF.Height * m_zoomNum;
+
+
+
+            m_OrigineRegionF = OrigineRegionF;
+
+            m_RegionF = new RectangleF(x1, y1, w1, h1);
+
+            CreateRectangleType shape = this.CreateType;
+            GraphicsPath MeasurePath = new GraphicsPath();
+            if (shape == CreateRectangleType.Rectangle)
+            {
+                MeasurePath.AddRectangle(m_RegionF);
+            }
+            else
+            {
+                MeasurePath.AddEllipse(m_RegionF);
+            }
+            this.g_Path = MeasurePath;
+
+
+        }
+        internal void SetScaleRegionF(RectangleF scaleRectangleF)
+        {
+            float x1, y1;
+            x1 = (scaleRectangleF.X-m_refPoint.X) / m_zoomNum ;
+            y1 = (scaleRectangleF.Y-m_refPoint.Y) / m_zoomNum ;
+
+            float w1, h1;
+            w1 = scaleRectangleF.Width / m_zoomNum;
+            h1 = scaleRectangleF.Height / m_zoomNum;
+
+
+
+            m_OrigineRegionF =  new RectangleF(x1, y1, w1, h1);
+
+            m_RegionF = scaleRectangleF;
+
+            CreateRectangleType shape = this.CreateType;
+            GraphicsPath MeasurePath = new GraphicsPath();
+            if (shape == CreateRectangleType.Rectangle)
+            {
+                MeasurePath.AddRectangle(m_RegionF);
+            }
+            else
+            {
+                MeasurePath.AddEllipse(m_RegionF);
+            }
+            this.g_Path = MeasurePath;
+        }
+
+        public RectangleF GetOrigionalDrawRegionF()
+        { return m_OrigineRegionF; }
+
+        public  List<Point> PolygonPointRegion
+        {
+            get {
+                var m_PolygonPointRegion = new List<Point>();
+                foreach (var p in m_PolygonPoints)
+                {
+                    m_PolygonPointRegion.Add(new Point((int)(p.X), (int)(p.Y)));
+
+
+                }
+                return m_PolygonPointRegion;
+            }
+           
+        }
+        public List<PointF> OriginalPolygonPointFList
+        {
+            get { return m_originalPolygonPoints; }
+
+        }
+        public List<PointF> PolygonPointFList
+        {
+            get { return m_PolygonPoints; }
+            set {
+                if (m_zoomNum != 1)
+                {
+                    var ps = new List<PointF>();
+                    foreach (var p in value)
+                    {
+                        var p1 = new PointF();
+                        //x1 = (scaleRectangleF.X - m_refPoint.X) / m_zoomNum;
+                        //y1 = (scaleRectangleF.Y - m_refPoint.Y) / m_zoomNum;
+                        p1.X = (p.X -m_refPoint.X) / m_zoomNum;
+                        p1.Y = (p.Y - m_refPoint.Y) / m_zoomNum;
+                        ps.Add(p1);
+
+                    }
+
+
+                    m_originalPolygonPoints = ps;
+                    m_PolygonPoints = value;
+                }
+                else
+                {
+                    m_originalPolygonPoints = value;
+                    m_PolygonPoints = value;
+                }
                 
                 
             }
             }
         }
         }
+
+    
+
+        public  GraphicsPath GPath
+        {
+            get {
+
+                var measureItem = this;
+                //重新绘制测量区域路径
+                GraphicsPath GPath = new GraphicsPath();
+                if (measureItem.CreateType == CreateRectangleType.Polygon)
+                {
+                    GraphicsPath PolygonMeasurePath = new GraphicsPath();
+                    PolygonMeasurePath.AddPolygon(measureItem.PolygonPointFList.ToArray());
+                    GPath = PolygonMeasurePath;
+                }
+                else if (measureItem.CreateType == CreateRectangleType.CircleByThreePoints)
+                {
+                    GPath.AddEllipse(GetZoomedRegionF());
+                }
+                else
+                {
+                    if (measureItem.Shape == (int)CreateRectangleType.Circle)
+                    {
+                        GPath.AddEllipse(GetZoomedRegionF());
+                    }
+                    else
+                    {
+                        GPath.AddRectangle(GetZoomedRegionF());
+                    }
+                }
+                g_Path = GPath;
+                return g_Path;
+
+            }
+           
+        }
+  
+        public  PointF PolygonDrawingEndPoint
+        {
+            get { return endPoint; }
+            set { endPoint = value; }
+        }
+  
+
+        public  Point GetZoomedCenterPoint()
+        {
+            Point pCenterPoint = new Point();
+            //获取在工作窗口中X,Y位置
+            pCenterPoint.X = (int)(this.GetZoomedRegion.X + this.GetZoomedRegion.Width / 2);
+            pCenterPoint.Y = (int)(this.GetZoomedRegion.Y + this.GetZoomedRegion.Height / 2);
+            return pCenterPoint;
+        }
+
+        public Point GetCenterPoint()
+        {
+            Point pCenterPoint = new Point();
+            //获取在工作窗口中X,Y位置
+            pCenterPoint.X = (int)(this.GetOrigionalDrawRegionF().X + this.GetOrigionalDrawRegionF().Width / 2);
+            pCenterPoint.Y = (int)(this.GetOrigionalDrawRegionF().Y + this.GetOrigionalDrawRegionF().Height / 2);
+            return pCenterPoint;
+        }
+        #endregion
+
+
+       
         public  bool IsDragging
         public  bool IsDragging
         {
         {
             get { return m_IsDragging; }
             get { return m_IsDragging; }
             set { m_IsDragging = value; }
             set { m_IsDragging = value; }
         }
         }
-        public  bool IsSelect
+        public  bool IsAltering// moving position or changing the size by gui operating.
         {
         {
-            get { return m_IsSelect; }
-            set { m_IsSelect = value; }
+            get { return m_IsAlter; }
+            set { m_IsAlter = value; }
         }
         }
         
         
         public  bool IsWorkSample
         public  bool IsWorkSample
@@ -789,6 +866,10 @@ namespace OTSMeasureApp
         { 
         { 
             m_refPoint = value;
             m_refPoint = value;
             SetInitRegionF(m_OrigineRegionF);
             SetInitRegionF(m_OrigineRegionF);
+            if (m_originalPolygonPoints.Count != 0)
+            {
+                this.PolygonPointFList = m_originalPolygonPoints;
+            }
         }
         }
 
 
         public float GetZoomNumber()
         public float GetZoomNumber()
@@ -799,7 +880,10 @@ namespace OTSMeasureApp
         { 
         { 
             m_zoomNum = value;
             m_zoomNum = value;
             SetInitRegionF(m_OrigineRegionF);
             SetInitRegionF(m_OrigineRegionF);
-        
+            if (m_originalPolygonPoints.Count != 0)
+            {
+                this.PolygonPointFList = m_originalPolygonPoints;
+            }
         }
         }
 
 
 
 
@@ -822,7 +906,7 @@ namespace OTSMeasureApp
             return roundedRect;
             return roundedRect;
         }
         }
 
 
-        public  bool IfContains(Point mousePoint)
+        public  bool IfScaleContains(Point mousePoint)
         {
         {
             if (mousePoint.X > m_RegionF.Left && mousePoint.X < m_RegionF.Left + m_RegionF.Width)
             if (mousePoint.X > m_RegionF.Left && mousePoint.X < m_RegionF.Left + m_RegionF.Width)
             {
             {
@@ -833,6 +917,20 @@ namespace OTSMeasureApp
                 }
                 }
             
             
             
             
+            }
+            return false;
+        }
+        public bool IfContains(Point thePoint)
+        {
+            if (thePoint.X > m_OrigineRegionF.Left && thePoint.X < m_OrigineRegionF.Left + m_OrigineRegionF.Width)
+            {
+                if (thePoint.Y > m_OrigineRegionF.Top && thePoint.Y < m_OrigineRegionF.Top + m_OrigineRegionF.Height)
+                {
+                    return true;
+
+                }
+
+
             }
             }
             return false;
             return false;
         }
         }
@@ -849,8 +947,9 @@ namespace OTSMeasureApp
         {
         {
             if (m_zoomNum == 1)
             if (m_zoomNum == 1)
             {
             {
-                m_RegionF = OrigionalDrawRegionF;
+                m_RegionF = m_OrigineRegionF;
                 m_refPoint = new PointF(0, 0);
                 m_refPoint = new PointF(0, 0);
+                m_PolygonPoints = m_originalPolygonPoints;
             } 
             } 
             float curZoom = m_zoomNum;
             float curZoom = m_zoomNum;
 
 
@@ -864,8 +963,8 @@ namespace OTSMeasureApp
             m_refPoint.X= (m_refPoint.X-mousePoint.X)/ curZoom * deltaZoom+m_refPoint.X;
             m_refPoint.X= (m_refPoint.X-mousePoint.X)/ curZoom * deltaZoom+m_refPoint.X;
             m_refPoint.Y = (m_refPoint.Y - mousePoint.Y) / curZoom * deltaZoom + m_refPoint.Y;
             m_refPoint.Y = (m_refPoint.Y - mousePoint.Y) / curZoom * deltaZoom + m_refPoint.Y;
 
 
-            float Width = OrigionalDrawRegionF.Width * zoomNum;
-            float Height = OrigionalDrawRegionF.Height * zoomNum;
+            float Width = GetOrigionalDrawRegionF().Width * zoomNum;
+            float Height = GetOrigionalDrawRegionF().Height * zoomNum;
             m_RegionF = new RectangleF(X1, Y1, Width, Height);
             m_RegionF = new RectangleF(X1, Y1, Width, Height);
             m_zoomNum = zoomNum;
             m_zoomNum = zoomNum;
            
            
@@ -876,10 +975,32 @@ namespace OTSMeasureApp
             BSEImageLocation = m_RegionF.Location;
             BSEImageLocation = m_RegionF.Location;
             SEMCenterPoint = m_RegionF.Location;
             SEMCenterPoint = m_RegionF.Location;
 
 
-        }
+            var scalePs = new List<PointF>();
+            foreach (var p in m_PolygonPoints)
+            {
+                float x, y;
+                x = (p.X - mousePoint.X) / curZoom * deltaZoom + p.X;
+                y = (p.Y - mousePoint.Y) / curZoom * deltaZoom + p.Y;
+              
+                scalePs.Add(new PointF(x, y));
+
 
 
+            }
+            m_PolygonPoints = scalePs;
+
+        
+            if (this.subItems.Count != 0)
+            {
+                foreach (var g in subItems)
+                {
+                    g.Zoom(mousePoint,zoomNum);
+                }
 
 
 
 
+            }
+        }
+        
+
         public  void Move(PointF location)
         public  void Move(PointF location)
         {
         {
             
             
@@ -901,9 +1022,33 @@ namespace OTSMeasureApp
             LineStartPoint = m_RegionF.Location;
             LineStartPoint = m_RegionF.Location;
 
 
             m_DraggingPoint = new Point((int)location.X,(int)location.Y);
             m_DraggingPoint = new Point((int)location.X,(int)location.Y);
-       
+
+            var scalePs = new List<PointF>();
+            foreach (var p in m_PolygonPoints)
+            {
+                float x, y;
+                x = (p.X + offset.X);
+                y = (p.Y + offset.Y);
+
+                scalePs.Add(new PointF(x, y));
 
 
 
 
+            }
+            m_PolygonPoints = scalePs;
+          
+            if (this.subItems.Count != 0)
+            {
+                foreach (var g in subItems)
+                {
+                    g.Move(location);
+                }
+            
+            
+            }
+        }
+        public void Show(PointF location)
+        {
+            m_RegionF.Location = location;
         }
         }
 
 
         public  CRectangleGDIObject Duplicate(CreateRectangleType newType)
         public  CRectangleGDIObject Duplicate(CreateRectangleType newType)
@@ -914,7 +1059,7 @@ namespace OTSMeasureApp
             r.m_OrigineRegionF = this.m_OrigineRegionF;
             r.m_OrigineRegionF = this.m_OrigineRegionF;
         
         
             r.IsWorkSample = this.IsWorkSample;
             r.IsWorkSample = this.IsWorkSample;
-            r.IsSelect = this.IsSelect;
+            //r.IsAltering = this.IsAltering;
             r.m_RegionF = this.m_RegionF;
             r.m_RegionF = this.m_RegionF;
        
        
 
 
@@ -928,18 +1073,13 @@ namespace OTSMeasureApp
             return r;
             return r;
         }
         }
 
 
-        public  void Reset()
-        {
-            m_RegionF = m_OrigineRegionF;
-            //Zoom(m_refPoint, 1);
-        }
 
 
 
 
         #endregion
         #endregion
         //是否设置为选择样品
         //是否设置为选择样品
-        private bool m_IsSelect;
+        private bool m_IsAlter;
         //是否存在帧图信息
         //是否存在帧图信息
-        //private bool m_IsSingle;
+      
         //是否设置为拖动
         //是否设置为拖动
         private bool m_IsDragging;
         private bool m_IsDragging;
         //是否为工作样品
         //是否为工作样品
@@ -958,7 +1098,7 @@ namespace OTSMeasureApp
         private RectangleF m_RegionF;
         private RectangleF m_RegionF;
         //绘制时与移动缩放时记录的位置与尺寸
         //绘制时与移动缩放时记录的位置与尺寸
         private RectangleF m_OrigineRegionF;
         private RectangleF m_OrigineRegionF;
-        private GraphicsPath g_Path;
+        private GraphicsPath g_Path=new GraphicsPath();
         private PointF startPoint;
         private PointF startPoint;
         private PointF endPoint;
         private PointF endPoint;
     
     
@@ -978,18 +1118,20 @@ namespace OTSMeasureApp
         private PointF bseImageLocation;
         private PointF bseImageLocation;
         //绘制SEM中心位置
         //绘制SEM中心位置
         private PointF semCenterPoint;
         private PointF semCenterPoint;
-        //
-        private List<Point> m_PolygonPointRegion;
-        private List<PointF> m_PolygonPointRegionF;
+     
+   
+        private List<PointF> m_PolygonPoints=new List<PointF>();
         //绘制时与移动缩放时记录的位置
         //绘制时与移动缩放时记录的位置
-        private List<PointF> m_DrawPolygonPointRegionF;
+        private List<PointF> m_originalPolygonPoints = new List<PointF>();
 
 
-        private List<CRectangleGDIObject> subItems;
+        private List<CRectangleGDIObject> subItems=new List<CRectangleGDIObject>();
 
 
       
       
         private float m_zoomNum=1;
         private float m_zoomNum=1;
 
 
         private PointF m_refPoint=new PointF(0,0);
         private PointF m_refPoint=new PointF(0,0);
+
+        
     }
     }
 
 
     public enum SEMControlIndex
     public enum SEMControlIndex

+ 1 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/OTSSamplespaceGraphicsPanelFun.cs

@@ -232,7 +232,7 @@ namespace OTSMeasureApp
         /// </summary>
         /// </summary>
         /// <param name="polygonPointList">不规则形状坐标集合</param>
         /// <param name="polygonPointList">不规则形状坐标集合</param>
         /// <returns></returns>
         /// <returns></returns>
-        public static Rectangle GetPolygonToMinRectangle(List<PointF> polygonPointList)
+        public static Rectangle GetMinRectangleOfPolygon(List<PointF> polygonPointList)
         {
         {
             if (polygonPointList != null)
             if (polygonPointList != null)
             {
             {

File diff suppressed because it is too large
+ 289 - 320
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/OTSSamplespaceWindow.cs


+ 80 - 194
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/VisualStage.cs

@@ -123,7 +123,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
         {
         {
             foreach (var g in m_SampleHoleGDIObjects)
             foreach (var g in m_SampleHoleGDIObjects)
             {
             {
-                if (g.IfContains(mousePoint))
+                if (g.IfScaleContains(mousePoint))
                 {
                 {
                     return g;
                     return g;
                 }
                 }
@@ -272,17 +272,17 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
       
       
                 //添加样品台 对象
                 //添加样品台 对象
                 //设置路径
                 //设置路径
-                GraphicsPath MeasurePath = new GraphicsPath();
+                //GraphicsPath MeasurePath = new GraphicsPath();
 
 
-                if (StageShape == (int)CreateRectangleType.Circle)
-                {
-                    MeasurePath.AddEllipse(CreateBourary.GetZoomedRegion);
-                }
-                else
-                {
-                    MeasurePath.AddRectangle(CreateBourary.GetZoomedRegion);
-                }
-                CreateBourary.GPath = MeasurePath;
+                //if (StageShape == (int)CreateRectangleType.Circle)
+                //{
+                //    MeasurePath.AddEllipse(CreateBourary.GetZoomedRegion);
+                //}
+                //else
+                //{
+                //    MeasurePath.AddRectangle(CreateBourary.GetZoomedRegion);
+                //}
+                //CreateBourary.GPath = MeasurePath;
                 CreateBourary.Shape = StageShape;
                 CreateBourary.Shape = StageShape;
                 m_StageEdgeGDIObjects.Add(CreateBourary);
                 m_StageEdgeGDIObjects.Add(CreateBourary);
                 //绘制后的样品台中心位置
                 //绘制后的样品台中心位置
@@ -320,17 +320,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
                             CreateHole =  new CRectangleGDIObject(RecF, CreateRectangleType.Circle);
                             CreateHole =  new CRectangleGDIObject(RecF, CreateRectangleType.Circle);
                         }
                         }
                 
                 
-                        //绘制样品孔路径
-                        //GraphicsPath HolePath = new GraphicsPath();
-                        //if (ChloeClrList[i].iSHoleShape == (int)CreateRectangleType.Circle)
-                        //{
-                        //    HolePath.AddEllipse(CreateHole.GetZoomedRegion);
-                        //}
-                        //else
-                        //{
-                        //    HolePath.AddRectangle(CreateHole.GetZoomedRegion);
-                        //}
-                        //CreateHole.GPath = HolePath;
+               
                         CreateHole.Name= ChloeClrList[i].sSHoleName;
                         CreateHole.Name= ChloeClrList[i].sSHoleName;
                         m_SampleHoleGDIObjects.Add(CreateHole);
                         m_SampleHoleGDIObjects.Add(CreateHole);
 
 
@@ -362,17 +352,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
                     CreateSTD = GetCtrlCoordRect(stageLeftTop, stageRightBottom, CreateRectangleType.SpecimenRectangle, "", "");
                     CreateSTD = GetCtrlCoordRect(stageLeftTop, stageRightBottom, CreateRectangleType.SpecimenRectangle, "", "");
                 }
                 }
         
         
-                //绘制标样路径
-                //GraphicsPath STDPath = new GraphicsPath();
-                //if (StageShapes == (int)CreateRectangleType.Circle)
-                //{
-                //    STDPath.AddEllipse(CreateSTD.GetZoomedRegion);
-                //}
-                //else
-                //{
-                //    STDPath.AddRectangle(CreateSTD.GetZoomedRegion);
-                //}
-                //CreateSTD.GPath = STDPath;
+         
                 m_SpecimenGDIObjects.Add(CreateSTD);
                 m_SpecimenGDIObjects.Add(CreateSTD);
                 return;
                 return;
             }
             }
@@ -416,7 +396,6 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
             try
             try
             {
             {
 
 
-               
                 //将微米信息 转换为 像素
                 //将微米信息 转换为 像素
                 PointF leftTop = new PointF();
                 PointF leftTop = new PointF();
                 PointF rightBottom = new PointF();
                 PointF rightBottom = new PointF();
@@ -469,41 +448,29 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
         }
         }
 
 
 
 
-        //public PointF OTSCoordToCtrlCoord(PointF point)
-        //{
-        //    var x = MicronConvertToPixel(point.X);
-        //    var y = MicronConvertToPixel(point.Y);
-        //    return CalculateLocationF(new PointF((float)x, (float)y));
-        
-        //}
-
-
-        //public PointF CtrlCoordToOTSCoord(PointF point)
-        //{
-        //    var ctrlcenter = m_StageEdgeGDIObjects[0].GetCenterPoint();
-        //    var x = PixelConvertToMicron(point.X-ctrlcenter.X);
-        //    var y = PixelConvertToMicron(-(point.Y-ctrlcenter.Y));
+        public PointF OTSCoordToCtrlCoord(PointF point)
+        {
+            var x = MicronConvertToPixel(point.X);
+            var y = MicronConvertToPixel(point.Y);
+            return CalculateLocationF(new PointF((float)x, (float)y));
 
 
+        }
 
 
-         
 
 
+        public PointF CtrlCoordToOTSCoord(PointF point)
+        {
+            var ctrlcenter = m_StageEdgeGDIObjects[0].GetCenterPoint();
+            var x = PixelConvertToMicron(point.X - ctrlcenter.X);
+            var y = PixelConvertToMicron(-(point.Y - ctrlcenter.Y));
 
 
-        //}
 
 
-        public PointF CalculateOTSLocation(PointF p1)
-        {
-            float OTSWholeWidth = m_OTSCoordStageEdgeLength;
-            float OTSWholeHeight = m_OTSCoordStageEdgeLength;
-            //获取屏幕中心点
-            PointF pointXY = new PointF();
-            PointF centerPoint = new PointF(0, 0);
-            pointXY.X = centerPoint.X + p1.X;
-            pointXY.Y = centerPoint.Y + p1.Y;
-            return pointXY;
+            return new PointF(x, y);
 
 
 
 
         }
         }
 
 
+       
+
         public RectangleF GetOTSCoordRegionF(PointF ctrlLeftTop, PointF ctrlRightBottom)
         public RectangleF GetOTSCoordRegionF(PointF ctrlLeftTop, PointF ctrlRightBottom)
         {
         {
             try
             try
@@ -519,8 +486,8 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
                 rightBottom.X = (float)PixelConvertToMicron(ctrlRightBottom.X-ctrlcenter.X);
                 rightBottom.X = (float)PixelConvertToMicron(ctrlRightBottom.X-ctrlcenter.X);
                 rightBottom.Y = (float)PixelConvertToMicron((ctrlRightBottom.Y-ctrlcenter.Y));
                 rightBottom.Y = (float)PixelConvertToMicron((ctrlRightBottom.Y-ctrlcenter.Y));
                 //计算位置
                 //计算位置
-                leftTop = CalculateOTSLocation(leftTop);
-                rightBottom = CalculateOTSLocation(rightBottom);
+                //leftTop = CalculateOTSLocation(leftTop);
+                //rightBottom = CalculateOTSLocation(rightBottom);
 
 
                 //获取OTS图形四个点
                 //获取OTS图形四个点
                 float realStartX = Math.Min(leftTop.X, rightBottom.X);
                 float realStartX = Math.Min(leftTop.X, rightBottom.X);
@@ -597,17 +564,6 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
                 sampleGDIObject.SelColor = selColor;
                 sampleGDIObject.SelColor = selColor;
 ;
 ;
 
 
-                //GraphicsPath NewSamplePath = new GraphicsPath();
-                //if (sampleGDIObject.Shape == (int)CreateRectangleType.Circle)
-                //{
-                //    NewSamplePath.AddEllipse(sampleGDIObject.GetZoomedRegion);
-                //}
-                //else
-                //{
-                //    NewSamplePath.AddRectangle(sampleGDIObject.GetZoomedRegion);
-                //}
-                //sampleGDIObject.GPath = NewSamplePath;
-
                 //add the default measure area from config file.
                 //add the default measure area from config file.
 
 
                 CRectangleGDIObject newMeasureGDIObject;
                 CRectangleGDIObject newMeasureGDIObject;
@@ -648,88 +604,28 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
 
 
 
 
 
 
-            //获取测量区域的OTS位置与尺寸
-            //SampleMeasurePara sampleMeasurePara = GetMeasureInfo(MeasureItem);
+       
             var item = MeasureItem;
             var item = MeasureItem;
 
 
             SampleMeasurePara sampleMeasurePara = new SampleMeasurePara();
             SampleMeasurePara sampleMeasurePara = new SampleMeasurePara();
 
 
-            //设置测量区域位置与尺寸
-            float left = 0;
-            float Top = 0;
-            float Right = 0;
-            float Bottom = 0;
-            float Widths = 0;
-            float Height = 0;
-            //设置测量区域位置与尺寸
-            //left = PixelConvertToMicron(item.OrigionalDrawRegionF.X);
-            //Top = PixelConvertToMicron(item.OrigionalDrawRegionF.Y);
-            //var p = CtrlCoordToOTSCoord(item.OrigionalDrawRegionF.Location);
-            //Right = PixelConvertToMicron(item.OrigionalDrawRegionF.Right);
-            //Bottom = PixelConvertToMicron(item.OrigionalDrawRegionF.Bottom);
-            //Widths = PixelConvertToMicron(item.OrigionalDrawRegionF.Width);
-            //Height = PixelConvertToMicron(item.OrigionalDrawRegionF.Height);
-
-            var region = this.GetOTSCoordRegionF(item.OrigionalDrawRegionF.Location, new PointF(item.OrigionalDrawRegionF.Right, item.OrigionalDrawRegionF.Bottom));
-            //保存原位置
-            RectangleF polygonRectPara = item.OrigionalDrawRegionF;
-            if (item.CreateType == CreateRectangleType.Polygon)
-            {
-                polygonRectPara = OTSSamplespaceGraphicsPanelFun.GetPolygonToMinRectangle(item.DrawPolygonPointRegionF);
-                //设置测量区域位置与尺寸
-                left = PixelConvertToMicron(polygonRectPara.X);
-                Top = PixelConvertToMicron(polygonRectPara.Y);
-                Right = PixelConvertToMicron(polygonRectPara.Right);
-                Bottom = PixelConvertToMicron(polygonRectPara.Bottom);
-                Widths = PixelConvertToMicron(polygonRectPara.Width);
-                Height = PixelConvertToMicron(polygonRectPara.Height);
-            }
-            //设置测量区域
-            //PointF startPoint = p;
-            //SizeF MeasureSize = new SizeF(Widths, Height);
+           
+
+            var region = this.GetOTSCoordRegionF(item.GetOrigionalDrawRegionF().Location, new PointF(item.GetOrigionalDrawRegionF().Right, item.GetOrigionalDrawRegionF().Bottom));
+           
 
 
             sampleMeasurePara.MeasureRect = region;
             sampleMeasurePara.MeasureRect = region;
 
 
-            //sampleMeasurePara.MeasureRect = new Rectangle(new Point((int)startPoint.X, (int)startPoint.Y), new Size((int)MeasureSize.Width, (int)MeasureSize.Height));
+         
             //设置样品孔名称
             //设置样品孔名称
             sampleMeasurePara.sampleHoleName = item.Name;
             sampleMeasurePara.sampleHoleName = item.Name;
             //设置样品名称
             //设置样品名称
             sampleMeasurePara.sSampleName = item.SampleName;
             sampleMeasurePara.sSampleName = item.SampleName;
             //设置测量区域形状
             //设置测量区域形状
             sampleMeasurePara.iShape = item.Shape;
             sampleMeasurePara.iShape = item.Shape;
-            //设置多边形点集合
-            sampleMeasurePara.PolygonPointRegion = PointFConvertPoint(ConvertPolygonPointToOTSPoint(item.PolygonPointRegionF));
-            sampleMeasurePara.PolygonPointRegionF = ConvertPolygonPointToOTSPoint(item.PolygonPointRegionF);
-            sampleMeasurePara.DrawPolygonPointRegionF = ConvertPolygonPointToOTSPoint(item.DrawPolygonPointRegionF);
-
-
-
-
-
-
-
-
-            //获取样品台 中心点
-            PointF RectanglePointCenter = GetCenterPointF();
-
-            ////获取样品台中心点
-            float CenterX = PixelConvertToMicron((int)RectanglePointCenter.X);
-            float CenterY = PixelConvertToMicron((int)RectanglePointCenter.Y);
-            //RectangleF sampleMeasureRect = new Rectangle();
-
-            ////根据样品台中心点获取开始点位置
-            //sampleMeasureRect.X = -(CenterX - sampleMeasurePara.MeasureRect.X);
-            //sampleMeasureRect.Y = CenterY - sampleMeasurePara.MeasureRect.Bottom;
-            //sampleMeasurePara.MeasureRect.X = sampleMeasureRect.X;
-            //sampleMeasurePara.MeasureRect.Y = sampleMeasureRect.Y;
-
-            for (int i = 0; i < sampleMeasurePara.DrawPolygonPointRegionF.Count; i++)
-            {
-                int X = -((int)CenterX - (int)sampleMeasurePara.DrawPolygonPointRegionF[i].X);
-                int Y = (int)CenterY - (int)sampleMeasurePara.DrawPolygonPointRegionF[i].Y;
+            
+            sampleMeasurePara.DrawPolygonPointList = ConvertPolygonPointToOTSPoint(item.OriginalPolygonPointFList);
 
 
-                sampleMeasurePara.DrawPolygonPointRegionF[i] = new Point(X, Y);
-            }
 
 
             sampleMeasurePara.sSampleName = MeasureItem.SampleName ;
             sampleMeasurePara.sSampleName = MeasureItem.SampleName ;
             sampleMeasurePara.sampleHoleName =MeasureItem.Name;
             sampleMeasurePara.sampleHoleName =MeasureItem.Name;
@@ -739,15 +635,13 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
         public  List<PointF> ConvertPolygonPointToOTSPoint(List<PointF> polygonPointList)
         public  List<PointF> ConvertPolygonPointToOTSPoint(List<PointF> polygonPointList)
         {
         {
             List<PointF> OTSPoint = new List<PointF>();
             List<PointF> OTSPoint = new List<PointF>();
-            float X = 0;
-            float Y = 0;
+   
             if (polygonPointList != null)
             if (polygonPointList != null)
             {
             {
                 foreach (var item in polygonPointList)
                 foreach (var item in polygonPointList)
                 {
                 {
-                    X = (float)(item.X * ((double)m_OTSCoordStageEdgeLength / m_VisualStageEdgeLength));
-                    Y = (float)(item.Y * ((double)m_OTSCoordStageEdgeLength / m_VisualStageEdgeLength));
-                    OTSPoint.Add(new PointF(X, Y));
+         
+                    OTSPoint.Add(CtrlCoordToOTSCoord(item));
                 }
                 }
             }
             }
             return OTSPoint;
             return OTSPoint;
@@ -803,11 +697,11 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
                 //添加测量区域
                 //添加测量区域
            
            
               
               
-                Color MeasureColor = Color.Red;
+               
                 var MeasureRect = sampleGDIObject.Duplicate(CreateRectangleType.MeasureArea);
                 var MeasureRect = sampleGDIObject.Duplicate(CreateRectangleType.MeasureArea);
                  MeasureRect.SetInitRegionF(newRegion);
                  MeasureRect.SetInitRegionF(newRegion);
             
             
-                MeasureRect.SelColor = MeasureColor;
+                MeasureRect.SelColor = Color.Red;
              
              
 
 
 
 
@@ -820,20 +714,12 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
 
 
             //添加测量区域
             //添加测量区域
             CreateRectangleType shape = sampleGDIObject.CreateType;
             CreateRectangleType shape = sampleGDIObject.CreateType;
-            GraphicsPath MeasurePath = new GraphicsPath();
-            if (shape == CreateRectangleType.Rectangle)
-            {
-                MeasurePath.AddRectangle(sampleGDIObject.GetZoomedRegion);
-            }
-            else
-            {
-                MeasurePath.AddEllipse(sampleGDIObject.GetZoomedRegion);
-            }
+     
+         
          
          
-            Color MeasureColor = Color.Red;
             var MeasureRect = sampleGDIObject.Duplicate(CreateRectangleType.MeasureArea);
             var MeasureRect = sampleGDIObject.Duplicate(CreateRectangleType.MeasureArea);
-            MeasureRect.GPath = MeasurePath;
-            MeasureRect.SelColor = MeasureColor;
+            //MeasureRect.GPath = MeasurePath;
+            MeasureRect.SelColor = Color.Red;
            
            
 
 
             outMeasureRect = MeasureRect;
             outMeasureRect = MeasureRect;
@@ -918,7 +804,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
         {
         {
             foreach (CRectangleGDIObject item in m_SampleHoleGDIObjects)
             foreach (CRectangleGDIObject item in m_SampleHoleGDIObjects)
             {
             {
-                if (item.IfContains(mousePoint))
+                if (item.IfScaleContains(mousePoint))
                 {
                 {
                     gdiItem = item;
                     gdiItem = item;
                     return true; ;
                     return true; ;
@@ -932,7 +818,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
         {
         {
             foreach (CRectangleGDIObject item in m_StageEdgeGDIObjects)
             foreach (CRectangleGDIObject item in m_StageEdgeGDIObjects)
             {
             {
-                if (item.IfContains(mousePoint))
+                if (item.IfScaleContains(mousePoint))
                 {
                 {
                     gdiobj = item;
                     gdiobj = item;
                     return true;
                     return true;
@@ -946,7 +832,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
         {
         {
             foreach (CRectangleGDIObject item in m_StageEdgeGDIObjects)
             foreach (CRectangleGDIObject item in m_StageEdgeGDIObjects)
             {
             {
-                if (item.IfContains(mousePoint))
+                if (item.IfScaleContains(mousePoint))
                 {
                 {
                   
                   
                     return true;
                     return true;
@@ -957,32 +843,32 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
 
 
         }
         }
 
 
-        public void OnMouseMove(CRectangleGDIObject item,MouseEventArgs e)
-        {
-            foreach (CRectangleGDIObject sampleHoleItem in m_SampleHoleGDIObjects)
-            {
-                //获取样品孔中心点 
-                Point sampleHoleCenterPoint = sampleHoleItem.GetCenterPoint();
-                if (item.IfContains(sampleHoleCenterPoint))
-                {
-                    if (item.Name != sampleHoleItem.Name)
-                    {
-                        //获取颜色
-                        string ColorStr = OTSSamplespaceGraphicsPanelFun.GetColorValue(ColorType.SampleColor);
-                        item.SelColor = ColorTranslator.FromHtml(ColorStr);
-                        break;
-                    }
-                }
-                else
-                {
-                    //获取颜色
-                    string ColorStr = OTSSamplespaceGraphicsPanelFun.GetColorValue(ColorType.SampleSelColor);
-                    item.SelColor = ColorTranslator.FromHtml(ColorStr);
-                }
-            }
+        //public void OnMouseMove(CRectangleGDIObject item,MouseEventArgs e)
+        //{
+        //    foreach (CRectangleGDIObject sampleHoleItem in m_SampleHoleGDIObjects)
+        //    {
+        //        //获取样品孔中心点 
+        //        Point sampleHoleCenterPoint = sampleHoleItem.GetCenterPoint();
+        //        if (item.IfScaleContains(sampleHoleCenterPoint))
+        //        {
+        //            if (item.Name != sampleHoleItem.Name)
+        //            {
+        //                //获取颜色
+        //                string ColorStr = OTSSamplespaceGraphicsPanelFun.GetColorValue(ColorType.SampleColor);
+        //                item.SelColor = ColorTranslator.FromHtml(ColorStr);
+        //                break;
+        //            }
+        //        }
+        //        else
+        //        {
+        //            //获取颜色
+        //            string ColorStr = OTSSamplespaceGraphicsPanelFun.GetColorValue(ColorType.SampleSelColor);
+        //            item.SelColor = ColorTranslator.FromHtml(ColorStr);
+        //        }
+        //    }
 
 
 
 
-        }
+        //}
         public void OnMouseMove( MouseEventArgs e)
         public void OnMouseMove( MouseEventArgs e)
         {
         {
             foreach (CRectangleGDIObject item in m_ContentGDIObjects)
             foreach (CRectangleGDIObject item in m_ContentGDIObjects)
@@ -1027,7 +913,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
 
 
             return allobj;
             return allobj;
         }
         }
-        public  bool NewLocationDrawSingleInfo(  Point moveToSEMLocation, List<CRectangleGDIObject> UpdateLocationGDIObject, CRectangleGDIObject WorkMeasure, float m_GlobalZoomNum)
+        public  bool NewLocationDrawSingleInfo(  Point moveToSEMLocation, List<CRectangleGDIObject> UpdateLocationGDIObject, CRectangleGDIObject WorkMeasure)
         {
         {
             //样品台中心点位置
             //样品台中心点位置
             Point m_StageCenterPoint = GetCenterPoint();
             Point m_StageCenterPoint = GetCenterPoint();
@@ -1053,8 +939,8 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
                     m_WorkMeasureCenterPoint = WorkMeasure.GetCenterPoint();
                     m_WorkMeasureCenterPoint = WorkMeasure.GetCenterPoint();
                     m_StageCenterDiffX = m_StageCenterPoint.X - m_WorkMeasureCenterPoint.X;//(int)((m_StageCenterPoint.X - m_WorkMeasureCenterPoint.X) * m_GlobalZoomNum);
                     m_StageCenterDiffX = m_StageCenterPoint.X - m_WorkMeasureCenterPoint.X;//(int)((m_StageCenterPoint.X - m_WorkMeasureCenterPoint.X) * m_GlobalZoomNum);
                     m_StageCenterDiffY = m_StageCenterPoint.Y - m_WorkMeasureCenterPoint.Y;// (int)((m_StageCenterPoint.Y - m_WorkMeasureCenterPoint.Y) * m_GlobalZoomNum);
                     m_StageCenterDiffY = m_StageCenterPoint.Y - m_WorkMeasureCenterPoint.Y;// (int)((m_StageCenterPoint.Y - m_WorkMeasureCenterPoint.Y) * m_GlobalZoomNum);
-                    diffNewX = (int)(moveToSEMLocation.X * m_GlobalZoomNum);
-                    diffNewY = (int)(moveToSEMLocation.Y * m_GlobalZoomNum);
+                    diffNewX = (int)(moveToSEMLocation.X * GetZoomNum());
+                    diffNewY = (int)(moveToSEMLocation.Y * GetZoomNum());
                     //根据鼠标_更改测量区域的位置
                     //根据鼠标_更改测量区域的位置
                     //item.Region = new Rectangle(new Point(item.Region.X + m_StageCenterDiffX + diffNewX, item.Region.Y + m_StageCenterDiffY - diffNewY), new Size(item.Region.Width, item.Region.Height));
                     //item.Region = new Rectangle(new Point(item.Region.X + m_StageCenterDiffX + diffNewX, item.Region.Y + m_StageCenterDiffY - diffNewY), new Size(item.Region.Width, item.Region.Height));
                     item.SetInitRegionF(new RectangleF(new PointF(item.GetZoomedRegionF().X + (m_StageCenterDiffX + diffNewX), item.GetZoomedRegionF().Y + (m_StageCenterDiffY - diffNewY)), new SizeF(item.GetZoomedRegionF().Width, item.GetZoomedRegionF().Height)));
                     item.SetInitRegionF(new RectangleF(new PointF(item.GetZoomedRegionF().X + (m_StageCenterDiffX + diffNewX), item.GetZoomedRegionF().Y + (m_StageCenterDiffY - diffNewY)), new SizeF(item.GetZoomedRegionF().Width, item.GetZoomedRegionF().Height)));
@@ -1063,7 +949,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
             }
             }
             return IsOK;
             return IsOK;
         }
         }
-        public  void NewLocationDrawMeasureInfo( Point moveToSEMLocation, CRectangleGDIObject UpdateLocationGDIObject, float m_GlobalZoomNum)
+        public  void NewLocationDrawMeasureInfo( Point moveToSEMLocation, CRectangleGDIObject UpdateLocationGDIObject)
         {
         {
             //样品台中心点位置
             //样品台中心点位置
             Point m_StageCenterPoint = GetCenterPoint();
             Point m_StageCenterPoint = GetCenterPoint();
@@ -1073,7 +959,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
             int diffNewX ;
             int diffNewX ;
             int diffNewY ;
             int diffNewY ;
             Point m_UpdateCenterPoint ;
             Point m_UpdateCenterPoint ;
-
+            var m_GlobalZoomNum = GetZoomNum();
             var item = UpdateLocationGDIObject;
             var item = UpdateLocationGDIObject;
           
           
             m_UpdateCenterPoint = item.GetCenterPoint();
             m_UpdateCenterPoint = item.GetCenterPoint();
@@ -1092,8 +978,8 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
                         for (int i = 0; i < item.PolygonPointRegion.Count; i++)
                         for (int i = 0; i < item.PolygonPointRegion.Count; i++)
                         {
                         {
                             item.PolygonPointRegion[i] = new Point(item.PolygonPointRegion[i].X + m_StageCenterDiffX + diffNewX, item.PolygonPointRegion[i].Y + m_StageCenterDiffY - diffNewY);
                             item.PolygonPointRegion[i] = new Point(item.PolygonPointRegion[i].X + m_StageCenterDiffX + diffNewX, item.PolygonPointRegion[i].Y + m_StageCenterDiffY - diffNewY);
-                            item.PolygonPointRegionF[i] = new PointF(item.PolygonPointRegionF[i].X + (m_StageCenterDiffX + diffNewX), item.PolygonPointRegionF[i].Y + (m_StageCenterDiffY - diffNewY));
-                            item.DrawPolygonPointRegionF[i] = new PointF(item.DrawPolygonPointRegionF[i].X + (m_StageCenterDiffX + diffNewX) / m_GlobalZoomNum, item.DrawPolygonPointRegionF[i].Y + (m_StageCenterDiffY - diffNewY) / m_GlobalZoomNum);
+                            item.PolygonPointFList[i] = new PointF(item.PolygonPointFList[i].X + (m_StageCenterDiffX + diffNewX), item.PolygonPointFList[i].Y + (m_StageCenterDiffY - diffNewY));
+                            item.PolygonPointFList[i] = new PointF(item.PolygonPointFList[i].X + (m_StageCenterDiffX + diffNewX) / m_GlobalZoomNum, item.PolygonPointFList[i].Y + (m_StageCenterDiffY - diffNewY) / m_GlobalZoomNum);
                         }
                         }
                     }
                     }
             
             

+ 2 - 2
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/OTSMeasureStatusWindow.cs

@@ -644,7 +644,7 @@ namespace OTSMeasureApp
                             foreach (var item in m_ElementPointGDIObjects)
                             foreach (var item in m_ElementPointGDIObjects)
                             {
                             {
                                 Rectangle rect = new Rectangle(e.Location, new Size(1, 1));
                                 Rectangle rect = new Rectangle(e.Location, new Size(1, 1));
-                                if (Math.Abs(e.Y - item.OrigionalDrawRegionF.Y) < 5 && Math.Abs(e.X - item.OrigionalDrawRegionF.X) < 5)
+                                if (Math.Abs(e.Y - item.GetOrigionalDrawRegionF().Y) < 5 && Math.Abs(e.X - item.GetOrigionalDrawRegionF().X) < 5)
                                 {
                                 {
                                     //显示Xray图像
                                     //显示Xray图像
                                     panelXray.Visible = true;
                                     panelXray.Visible = true;
@@ -1036,7 +1036,7 @@ namespace OTSMeasureApp
                             foreach (var item in m_ElementPointGDIObjects)
                             foreach (var item in m_ElementPointGDIObjects)
                             {
                             {
                                 Rectangle rect = new Rectangle(e.Location, new Size(1, 1));
                                 Rectangle rect = new Rectangle(e.Location, new Size(1, 1));
-                                if (Math.Abs(e.Y - item.OrigionalDrawRegionF.Y) < 5 && Math.Abs(e.X - item.OrigionalDrawRegionF.X) < 5)
+                                if (Math.Abs(e.Y - item.GetOrigionalDrawRegionF().Y) < 5 && Math.Abs(e.X - item.GetOrigionalDrawRegionF().X) < 5)
                                 {
                                 {
                                     //设置鼠标样式
                                     //设置鼠标样式
                                     this.Cursor = Cursors.Hand;
                                     this.Cursor = Cursors.Hand;

+ 3 - 3
OTSIncAMeasureApp/8-OTSSampleMeasureInfo/OTSSampleMeasureInfo.cs

@@ -32,9 +32,9 @@ namespace OTSMeasureApp
         public string sSampleName;
         public string sSampleName;
         public string sampleHoleName;
         public string sampleHoleName;
         public ShapeType iShape;   //测量区域形状                                
         public ShapeType iShape;   //测量区域形状                                
-        public List<Point> PolygonPointRegion;//多边形点集合                                
-        public List<PointF> PolygonPointRegionF;//多边形点集合                                
-        public List<PointF> DrawPolygonPointRegionF;//多边形点集合
+        //public List<Point> PolygonPointRegion;//多边形点集合                                
+        //public List<PointF> PolygonPointRegionF;//多边形点集合                                
+        public List<PointF> DrawPolygonPointList;//多边形点集合
         public RectangleF MeasureRect;      //测量区域大小
         public RectangleF MeasureRect;      //测量区域大小
     };
     };
 
 

+ 3 - 3
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -606,7 +606,7 @@ namespace OTSMeasureApp
                 //样品测量区域
                 //样品测量区域
                 SampleMeasureArea.MeasureRect =(m_ProjData.GetSampleList())[i].GetMsrArea().GetRectDomain();
                 SampleMeasureArea.MeasureRect =(m_ProjData.GetSampleList())[i].GetMsrArea().GetRectDomain();
                 //多边形点集合
                 //多边形点集合
-                SampleMeasureArea.PolygonPointRegion = (m_ProjData.GetSampleList())[i].GetMsrArea().GetPolygonPoint();
+                //SampleMeasureArea.PolygonPointRegion = (m_ProjData.GetSampleList())[i].GetMsrArea().GetPolygonPoint();
                 List<PointF> PointRegionF = new List<PointF>();
                 List<PointF> PointRegionF = new List<PointF>();
                 List<Point> PolygonPoint = m_ProjData.GetSampleList()[i].GetMsrArea().GetPolygonPoint();
                 List<Point> PolygonPoint = m_ProjData.GetSampleList()[i].GetMsrArea().GetPolygonPoint();
                 if (PolygonPoint != null)
                 if (PolygonPoint != null)
@@ -616,8 +616,8 @@ namespace OTSMeasureApp
                         PointRegionF.Add(new PointF(item.X, item.Y));
                         PointRegionF.Add(new PointF(item.X, item.Y));
                     }
                     }
                 }
                 }
-                SampleMeasureArea.PolygonPointRegionF = PointRegionF;
-                SampleMeasureArea.DrawPolygonPointRegionF = PointRegionF;
+                //SampleMeasureArea.PolygonPointRegionF = PointRegionF;
+                SampleMeasureArea.DrawPolygonPointList = PointRegionF;
                 SampleMeasureAreaList.Add(SampleMeasureArea);
                 SampleMeasureAreaList.Add(SampleMeasureArea);
             }
             }
             return true;
             return true;

Some files were not shown because too many files changed in this diff