|
|
@@ -65,22 +65,24 @@ namespace OTSMeasureApp
|
|
|
|
|
|
public enum DrawMeasureAreaActionType
|
|
|
{
|
|
|
- NoAction=1,
|
|
|
+ NoAction = 1,
|
|
|
//圆形
|
|
|
Circle = 2,
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
Rectangle = 3,
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//多边形
|
|
|
Polygon = 4,
|
|
|
-
|
|
|
+
|
|
|
//圆形三点法
|
|
|
- CircleByThreePoints = 5
|
|
|
+ CircleByThreePoints = 5,
|
|
|
+
|
|
|
+ InverseSelection = 6
|
|
|
+
|
|
|
|
|
|
-
|
|
|
}
|
|
|
public partial class OTSSamplespaceWindow : DockContent
|
|
|
{
|
|
|
@@ -234,11 +236,14 @@ namespace OTSMeasureApp
|
|
|
case "SetSemData":
|
|
|
double SemMag = 0;
|
|
|
double dDistance = 0;
|
|
|
- if (m_MeasureAppForm.m_ProjParam.GetMagAndDistance(ref SemMag, ref dDistance))
|
|
|
+ double bri = 0;
|
|
|
+ double contra = 0;
|
|
|
+ double kv = 0;
|
|
|
+ if (m_MeasureAppForm.m_ProjParam.GetWorkingSampleSEMData(ref dDistance, ref SemMag, ref bri, ref contra, ref kv))
|
|
|
{
|
|
|
//设置SEM数据
|
|
|
|
|
|
- if (!SetSEMDATAMParameter(SemMag, dDistance))
|
|
|
+ if (!SetSEMDATAMParameter(SemMag, dDistance, bri, contra))
|
|
|
{
|
|
|
log.Error("Failed SetSemData:--Mag:" + SemMag + "--Distance:" + dDistance + "--");
|
|
|
}
|
|
|
@@ -347,7 +352,7 @@ namespace OTSMeasureApp
|
|
|
m_DrawMeasureType = DrawMeasureAreaActionType.Polygon;
|
|
|
m_IsDrawMeasure = true;
|
|
|
//m_DrawMeasureGDIObject = null;
|
|
|
- m_DrawMeasureGDIObject = new CMeasureArea(new List<PointF>(), ShapeType.POLYGON, "", "", Color.Red);
|
|
|
+ m_DrawMeasureGDIObject = new CMeasureArea(new List<PointF>(), ShapeType.POLYGON, "", "", Color.Red);
|
|
|
|
|
|
this.Cursor = Cursors.Hand;
|
|
|
}
|
|
|
@@ -487,7 +492,7 @@ namespace OTSMeasureApp
|
|
|
|
|
|
}
|
|
|
|
|
|
- CMeasureArea polygonGdi = new CMeasureArea(ps, ShapeType.POLYGON, SMeasrueArea.sampleHoleName, SMeasrueArea.sSampleName, Color.Red);
|
|
|
+ CMeasureArea polygonGdi = new CMeasureArea(ps, ShapeType.POLYGON, SMeasrueArea.sampleHoleName, SMeasrueArea.sSampleName, Color.Red);
|
|
|
|
|
|
|
|
|
sam.SetMeasureGDIObject(polygonGdi);
|
|
|
@@ -541,13 +546,13 @@ namespace OTSMeasureApp
|
|
|
}
|
|
|
|
|
|
sam.GetMeasureGDIObject().SubItems().Clear();
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
foreach (var r in visualfieldRects)
|
|
|
{
|
|
|
-
|
|
|
- sam.AddFieldGDIObject(r);
|
|
|
-
|
|
|
+
|
|
|
+ sam.AddFieldGDIObject(r);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
COTSMsrPrjResultData cProjMgr = m_MeasureAppForm.m_ProjParam.GetResultData();
|
|
|
@@ -1148,8 +1153,8 @@ namespace OTSMeasureApp
|
|
|
//判断当前是否手绘
|
|
|
if (m_IsDrawMeasure && !runflag)
|
|
|
{
|
|
|
- var measureArea = new Rectangle(this.m_MouseDownPoint, new Size(2, 2));
|
|
|
- if (m_visualStage.CheckMeasureAreaIsBeyondStageArea(measureArea))
|
|
|
+ var measurepoint = new Rectangle(this.m_MouseDownPoint, new Size(2, 2));
|
|
|
+ if (m_visualStage.CheckMeasureAreaIsBeyondStageArea(measurepoint))
|
|
|
{
|
|
|
m_IsDrawMeasure = true;
|
|
|
}
|
|
|
@@ -1184,7 +1189,7 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
Point startPoint = new Point((int)(polygonPoints[0].X), (int)(polygonPoints[0].Y));//the last point is the first point too.we get the first point as the last point.
|
|
|
polygonPoints.Add(startPoint);
|
|
|
- CMeasureArea polygonGdi = new CMeasureArea(polygonPoints, ShapeType.POLYGON, sampleHoleName, sampleName, Color.Red);
|
|
|
+ CMeasureArea polygonGdi = new CMeasureArea(polygonPoints, ShapeType.POLYGON, sampleHoleName, sampleName, Color.Red);
|
|
|
|
|
|
|
|
|
polygonGdi.SetZoomNumber(m_visualStage.GetZoomNum());
|
|
|
@@ -1246,14 +1251,14 @@ namespace OTSMeasureApp
|
|
|
var m_ThreePointCirclePoints = m_DrawMeasureGDIObject.GetPolygonPointFList();
|
|
|
|
|
|
m_ThreePointCirclePoints.Add(m_MouseDownPoint);
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
if (m_ThreePointCirclePoints.Count == 3)//three point can make a circle .
|
|
|
{
|
|
|
|
|
|
-
|
|
|
+
|
|
|
float r;
|
|
|
PointF Centerpoint;
|
|
|
GetTriangleExcenterRadius(m_ThreePointCirclePoints[0], m_ThreePointCirclePoints[1], m_ThreePointCirclePoints[2], out r, out Centerpoint);
|
|
|
@@ -1271,7 +1276,7 @@ namespace OTSMeasureApp
|
|
|
return;
|
|
|
}
|
|
|
Color MeasureColor = Color.Red;
|
|
|
- CMeasureArea CRectangleGDI = new CMeasureArea(rectangleThree, ShapeType.CIRCLE, sampleHoleName, sampleName, MeasureColor);
|
|
|
+ CMeasureArea CRectangleGDI = new CMeasureArea(rectangleThree, ShapeType.CIRCLE, sampleHoleName, sampleName, MeasureColor);
|
|
|
|
|
|
|
|
|
m_DrawMeasureGDIObject = CRectangleGDI;
|
|
|
@@ -1301,18 +1306,18 @@ namespace OTSMeasureApp
|
|
|
Invalidate();
|
|
|
return;
|
|
|
}
|
|
|
- else if(m_DrawMeasureType == DrawMeasureAreaActionType.Rectangle)
|
|
|
+ else if (m_DrawMeasureType == DrawMeasureAreaActionType.Rectangle)
|
|
|
{
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
int sizeWH = 5;
|
|
|
Size size = new Size(sizeWH, sizeWH);
|
|
|
Rectangle rectangle = new Rectangle(m_MouseDownPoint, size);
|
|
|
Color MeasureColor = Color.Red;
|
|
|
- CMeasureArea newGDI;
|
|
|
+ CMeasureArea newGDI;
|
|
|
|
|
|
- newGDI = new CMeasureArea(rectangle, ShapeType.RECTANGLE, sampleName, sampleName, MeasureColor);
|
|
|
+ newGDI = new CMeasureArea(rectangle, ShapeType.RECTANGLE, sampleName, sampleName, MeasureColor);
|
|
|
|
|
|
newGDI.SetZoomNumber(m_visualStage.GetZoomNum());
|
|
|
newGDI.SetDisplayRefPoint(m_visualStage.GetDisplayRefPoint());
|
|
|
@@ -1341,6 +1346,27 @@ namespace OTSMeasureApp
|
|
|
m_DrawMeasureGDIObject = newGDI;
|
|
|
|
|
|
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else if (m_DrawMeasureType == DrawMeasureAreaActionType.InverseSelection)
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ int sizeWH = 5;
|
|
|
+ Size size = new Size(sizeWH, sizeWH);
|
|
|
+ Rectangle rectangle = new Rectangle(m_MouseDownPoint, size);
|
|
|
+ Color MeasureColor = Color.Red;
|
|
|
+ CMeasureArea newGDI;
|
|
|
+
|
|
|
+ newGDI = new CMeasureArea(rectangle, ShapeType.RECTANGLE, sampleName, sampleName, MeasureColor);
|
|
|
+
|
|
|
+ newGDI.SetZoomNumber(m_visualStage.GetZoomNum());
|
|
|
+ newGDI.SetDisplayRefPoint(m_visualStage.GetDisplayRefPoint());
|
|
|
+
|
|
|
+ m_DrawMeasureGDIObject = newGDI;
|
|
|
+
|
|
|
+
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
@@ -1740,7 +1766,7 @@ namespace OTSMeasureApp
|
|
|
switch (enumMouse)
|
|
|
{
|
|
|
case EnumMousePointPosition.MouseSizeTopLeft:
|
|
|
- if (m_DrawMeasureType == (int)GDIType.StageBoundary_Circle)
|
|
|
+ if (m_DrawMeasureType == DrawMeasureAreaActionType.Circle)
|
|
|
{
|
|
|
LTPoint.X = m_MouseDownPoint.X - tmp;
|
|
|
LTPoint.Y = m_MouseDownPoint.Y - tmp;
|
|
|
@@ -1758,7 +1784,7 @@ namespace OTSMeasureApp
|
|
|
}
|
|
|
break;
|
|
|
case EnumMousePointPosition.MouseSizeTopRight:
|
|
|
- if (m_DrawMeasureType == (int)GDIType.StageBoundary_Circle)
|
|
|
+ if (m_DrawMeasureType == DrawMeasureAreaActionType.Circle)
|
|
|
{
|
|
|
LTPoint.X = m_MouseDownPoint.X;
|
|
|
LTPoint.Y = m_MouseDownPoint.Y - tmp;
|
|
|
@@ -1776,7 +1802,7 @@ namespace OTSMeasureApp
|
|
|
}
|
|
|
break;
|
|
|
case EnumMousePointPosition.MouseSizeBottomLeft:
|
|
|
- if (m_DrawMeasureType == (int)GDIType.StageBoundary_Circle)
|
|
|
+ if (m_DrawMeasureType == DrawMeasureAreaActionType.Circle)
|
|
|
{
|
|
|
LTPoint.X = m_MouseDownPoint.X - tmp;
|
|
|
LTPoint.Y = m_MouseDownPoint.Y;
|
|
|
@@ -1794,7 +1820,7 @@ namespace OTSMeasureApp
|
|
|
}
|
|
|
break;
|
|
|
case EnumMousePointPosition.MouseSizeBottomRight:
|
|
|
- if (m_DrawMeasureType == (int)GDIType.StageBoundary_Circle)
|
|
|
+ if (m_DrawMeasureType == DrawMeasureAreaActionType.Circle)
|
|
|
{
|
|
|
LTPoint.X = m_MouseDownPoint.X;
|
|
|
LTPoint.Y = m_MouseDownPoint.Y;
|
|
|
@@ -2025,37 +2051,64 @@ namespace OTSMeasureApp
|
|
|
if (m_IsDrawMeasure && !runflag)
|
|
|
{
|
|
|
|
|
|
-
|
|
|
- if (m_DrawMeasureType != DrawMeasureAreaActionType.Polygon && m_DrawMeasureType != DrawMeasureAreaActionType.CircleByThreePoints)
|
|
|
- {
|
|
|
|
|
|
- var item = m_DrawMeasureGDIObject;
|
|
|
+ if (m_DrawMeasureType == DrawMeasureAreaActionType.InverseSelection)
|
|
|
+ {
|
|
|
+ var workspl = m_MeasureAppForm.m_ProjParam.GetWorkSample();
|
|
|
+ foreach (var gdi in sam.GetMeasureFieldGDIObjects())
|
|
|
+ {
|
|
|
+ if (m_DrawMeasureGDIObject.IfContains(new Point((int)gdi.GetCenterPoint().X, (int)gdi.GetCenterPoint().Y)))
|
|
|
+ {
|
|
|
+ gdi.Enable=!gdi.Enable;
|
|
|
+
|
|
|
+ workspl.SetFieldEnable(new Point(gdi.OTSX,gdi.OTSY),gdi.Enable);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ m_DrawMeasureGDIObject = null;
|
|
|
+
|
|
|
+ this.Cursor = Cursors.Default;
|
|
|
+ //设置手绘标识
|
|
|
|
|
|
+ m_IsDrawMeasure = false;
|
|
|
|
|
|
- item.NameOrHoleName = sam.GetMeasureGDIObject().NameOrHoleName;
|
|
|
+ }
|
|
|
+ else if(m_DrawMeasureType == DrawMeasureAreaActionType.Rectangle || m_DrawMeasureType == DrawMeasureAreaActionType.Circle)
|
|
|
+ {
|
|
|
+ var item = m_DrawMeasureGDIObject;
|
|
|
|
|
|
- item.IsWorkSample = sam.GetMeasureGDIObject().IsWorkSample;
|
|
|
|
|
|
- sam.GetMeasureFieldGDIObjects().Clear();
|
|
|
- sam.SetMeasureGDIObject(item);
|
|
|
+ item.NameOrHoleName = sam.GetMeasureGDIObject().NameOrHoleName;
|
|
|
|
|
|
- var para = m_visualStage.GetSampleMeasurePara(item);
|
|
|
+ item.IsWorkSample = sam.GetMeasureGDIObject().IsWorkSample;
|
|
|
|
|
|
- m_MeasureAppForm.m_ProjParam.SetWorkSampleHoleAndMeasureArea(para);
|
|
|
+ sam.GetMeasureFieldGDIObjects().Clear();
|
|
|
+ sam.SetMeasureGDIObject(item);
|
|
|
|
|
|
+ var para = m_visualStage.GetSampleMeasurePara(item);
|
|
|
|
|
|
- m_MeasureAppForm.SetRunType(MSR_RUN_TYPE.RUNMEASURE);
|
|
|
+ m_MeasureAppForm.m_ProjParam.SetWorkSampleHoleAndMeasureArea(para);
|
|
|
|
|
|
- PrepareMeasureField(sam, MSR_RUN_TYPE.RUNMEASURE);
|
|
|
|
|
|
+ m_MeasureAppForm.SetRunType(MSR_RUN_TYPE.RUNMEASURE);
|
|
|
|
|
|
- m_DrawMeasureGDIObject = null;
|
|
|
+ PrepareMeasureField(sam, MSR_RUN_TYPE.RUNMEASURE);
|
|
|
|
|
|
- this.Cursor = Cursors.Default;
|
|
|
- //设置手绘标识
|
|
|
|
|
|
- m_IsDrawMeasure = false;
|
|
|
- }
|
|
|
+ m_DrawMeasureGDIObject = null;
|
|
|
+
|
|
|
+ this.Cursor = Cursors.Default;
|
|
|
+ //设置手绘标识
|
|
|
+
|
|
|
+ m_IsDrawMeasure = false;
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -2085,7 +2138,7 @@ namespace OTSMeasureApp
|
|
|
measureItem.IsAltering = false;
|
|
|
measureItem.IsDragging = false;
|
|
|
Invalidate();
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
//only moving the whole stage
|
|
|
@@ -2126,7 +2179,7 @@ namespace OTSMeasureApp
|
|
|
e.Graphics.DrawImage(sampleHoleImageBuffer.BSEImage, sampleHoleImageBuffer.GetZoomedRegionF());
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
@@ -2601,7 +2654,7 @@ namespace OTSMeasureApp
|
|
|
CDisplayGDIObject gdi = m_visualStage.GetCtrlCoordRect(xHole, yHole, (GDIType)SMeasrueArea.iShape, "", "");
|
|
|
gdi.SampleName = SMeasrueArea.sSampleName;
|
|
|
gdi.NameOrHoleName = SMeasrueArea.sampleHoleName;
|
|
|
- //gdi.Shape = SMeasrueArea.iShape;
|
|
|
+
|
|
|
CMeasureArea measureGdi;
|
|
|
if (m_visualStage.GetMeasureGdiObjectFromSampleGdi(gdi, out measureGdi))
|
|
|
{
|
|
|
@@ -2645,14 +2698,17 @@ namespace OTSMeasureApp
|
|
|
//判断是否连接电镜
|
|
|
if (m_SEMDATAFieldManage.InitAndConnection())
|
|
|
{
|
|
|
- //获取电镜参数 放大倍数与工作距离 [Magnification]:放大倍数 [WorkingDistance]工作距离
|
|
|
+ //获取电镜参数 放大倍数与工作距离 等参数
|
|
|
semParameters = m_SEMDATAFieldManage.GetSEMMagAndWDParameter();
|
|
|
double mag = semParameters[0];
|
|
|
double wd = semParameters[1];
|
|
|
+ double bri = semParameters[2];
|
|
|
+ double contra = semParameters[3];
|
|
|
+ double kv = semParameters[4];
|
|
|
if (mag != 0 && wd != 0)
|
|
|
{
|
|
|
//设置样品文件中的电镜参数
|
|
|
- m_MeasureAppForm.m_ProjParam.SetWorkingSampleSEMData(wd, mag);
|
|
|
+ m_MeasureAppForm.m_ProjParam.SetWorkingSampleSEMData(wd, mag, bri, contra, kv);
|
|
|
|
|
|
//将右键SEM数据菜单设置为可编辑状态
|
|
|
CMStrip.Items[(int)MenuIndex.SetSemData].Enabled = true;
|
|
|
@@ -2823,14 +2879,14 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
|
|
|
visualsam.GetMeasureGDIObject().SubItems().Clear();
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
for (int i = 0; i < visualfieldRects.Count; i++)
|
|
|
{
|
|
|
|
|
|
|
|
|
visualsam.AddFieldGDIObject(visualfieldRects[i]);
|
|
|
-
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -2873,7 +2929,7 @@ namespace OTSMeasureApp
|
|
|
#endregion
|
|
|
|
|
|
#region 设置SEM数据
|
|
|
- public bool SetSEMDATAMParameter(double magnification, double semWorkingDistance)
|
|
|
+ public bool SetSEMDATAMParameter(double magnification, double semWorkingDistance, double bri, double contra)
|
|
|
{
|
|
|
#region 获取电镜参数
|
|
|
|
|
|
@@ -2891,8 +2947,15 @@ namespace OTSMeasureApp
|
|
|
bool wFlag;
|
|
|
|
|
|
mFlag = m_SEMDATAFieldManage.SetGMagnification(magnification);
|
|
|
+
|
|
|
+ log.Warn("Set Magnification:" + magnification.ToString("F2"));
|
|
|
wFlag = m_SEMDATAFieldManage.SetSemWorkingDistance(semWorkingDistance);
|
|
|
- if (mFlag || wFlag)
|
|
|
+ log.Warn("Set WD:" + semWorkingDistance.ToString("F2"));
|
|
|
+ bool c = m_SEMDATAFieldManage.SetSembrightness(bri);
|
|
|
+ log.Warn("Set Brightness:" + bri.ToString("F2"));
|
|
|
+ bool d = m_SEMDATAFieldManage.SetSemContrast(contra);
|
|
|
+ log.Warn("Set Contrast:" + contra.ToString("F2"));
|
|
|
+ if (mFlag && wFlag && c && d)
|
|
|
{
|
|
|
return true;
|
|
|
}
|
|
|
@@ -2902,28 +2965,7 @@ namespace OTSMeasureApp
|
|
|
#endregion
|
|
|
}
|
|
|
|
|
|
- public bool GetSEMDATAMParameter(ref double magnification, ref double WorkingDistance)
|
|
|
- {
|
|
|
- #region 获取电镜参数
|
|
|
- //获取Field操作类对象
|
|
|
- if (m_SEMDATAFieldManage == null)
|
|
|
- {
|
|
|
- m_SEMDATAFieldManage = new SEMDATAFieldManage(m_MeasureAppForm.m_ProjParam);
|
|
|
- }
|
|
|
- //判断是否连接电镜
|
|
|
- if (m_SEMDATAFieldManage.InitAndConnection())
|
|
|
- {
|
|
|
- //获取电镜参数
|
|
|
- List<double> semParameters = m_SEMDATAFieldManage.GetSEMMagAndWDParameter();
|
|
|
- //放大倍数
|
|
|
- magnification = semParameters[0];
|
|
|
- WorkingDistance = semParameters[1];
|
|
|
|
|
|
- return true;
|
|
|
- }
|
|
|
- return false;
|
|
|
- #endregion
|
|
|
- }
|
|
|
#endregion
|
|
|
|
|
|
#region 驱动到SEM当前位置
|
|
|
@@ -3178,32 +3220,36 @@ namespace OTSMeasureApp
|
|
|
return MeasureGDIObjects;
|
|
|
|
|
|
}
|
|
|
- public void ResetWorkSampleMeasure()
|
|
|
+ public void InverseSelectWorkSampleMeasure()
|
|
|
{
|
|
|
- COTSSample WSample = m_MeasureAppForm.m_ProjParam.GetWorkSample();
|
|
|
- var stype = m_MeasureAppForm.m_ProjParam.GetDefaultParam().GetSysType();
|
|
|
- OTSSampleVisualPropertyInfo MeasureInfo = new OTSSampleVisualPropertyInfo(WSample, stype);
|
|
|
+ //COTSSample WSample = m_MeasureAppForm.m_ProjParam.GetWorkSample();
|
|
|
+ //var stype = m_MeasureAppForm.m_ProjParam.GetDefaultParam().GetSysType();
|
|
|
+ //OTSSampleVisualPropertyInfo MeasureInfo = new OTSSampleVisualPropertyInfo(WSample, stype);
|
|
|
|
|
|
- RectangleF measureSize = m_MeasureAppForm.m_ProjParam.CalculateMsrArea(MeasureInfo.SMeasurePara.sampleHoleName);
|
|
|
- //获取位置与尺寸
|
|
|
- MeasureInfo.SMeasurePara.MeasureRect.Location = measureSize.Location;
|
|
|
- MeasureInfo.SMeasurePara.MeasureRect.Size = measureSize.Size;
|
|
|
- //获取样品信息
|
|
|
- PointF xHole = new PointF(MeasureInfo.SMeasurePara.MeasureRect.Left, MeasureInfo.SMeasurePara.MeasureRect.Top);
|
|
|
- PointF yHole = new PointF(MeasureInfo.SMeasurePara.MeasureRect.Right, MeasureInfo.SMeasurePara.MeasureRect.Bottom);
|
|
|
+ //RectangleF measureSize = m_MeasureAppForm.m_ProjParam.CalculateMsrArea(MeasureInfo.SMeasurePara.sampleHoleName);
|
|
|
+ ////获取位置与尺寸
|
|
|
+ //MeasureInfo.SMeasurePara.MeasureRect.Location = measureSize.Location;
|
|
|
+ //MeasureInfo.SMeasurePara.MeasureRect.Size = measureSize.Size;
|
|
|
+ ////获取样品信息
|
|
|
+ //PointF xHole = new PointF(MeasureInfo.SMeasurePara.MeasureRect.Left, MeasureInfo.SMeasurePara.MeasureRect.Top);
|
|
|
+ //PointF yHole = new PointF(MeasureInfo.SMeasurePara.MeasureRect.Right, MeasureInfo.SMeasurePara.MeasureRect.Bottom);
|
|
|
|
|
|
|
|
|
- //定义测量区域
|
|
|
- RectangleF SampleRectangleF = m_visualStage.GetCtrlCoordRectF(xHole, yHole);
|
|
|
- CDisplayGDIObject m_MeasureGDIObject = m_visualStage.GetCtrlCoordRect(xHole, yHole, (GDIType)MeasureInfo.SMeasurePara.iShape, "", "");
|
|
|
- m_MeasureGDIObject.SetInitRegionF(SampleRectangleF);
|
|
|
+ ////定义测量区域
|
|
|
+ //RectangleF SampleRectangleF = m_visualStage.GetCtrlCoordRectF(xHole, yHole);
|
|
|
+ //CDisplayGDIObject m_MeasureGDIObject = m_visualStage.GetCtrlCoordRect(xHole, yHole, (GDIType)MeasureInfo.SMeasurePara.iShape, "", "");
|
|
|
+ //m_MeasureGDIObject.SetInitRegionF(SampleRectangleF);
|
|
|
|
|
|
- var sam = GetWorkingVisualSample();
|
|
|
- var mea = sam.GetMeasureGDIObject();
|
|
|
+ //var sam = GetWorkingVisualSample();
|
|
|
+ //var mea = sam.GetMeasureGDIObject();
|
|
|
//CMeasureArea m_ResetMeasureGDIobjects = ResetMeasure(sam.GetSampleGDIObject(), m_MeasureGDIObject);
|
|
|
//mea.SetInitRegionF(m_ResetMeasureGDIobjects.GetOrigionalDrawRegionF());
|
|
|
//mea.Shape = m_ResetMeasureGDIobjects.Shape;
|
|
|
- Invalidate();
|
|
|
+ m_DrawMeasureType = DrawMeasureAreaActionType.InverseSelection;
|
|
|
+ m_IsDrawMeasure = true;
|
|
|
+ m_DrawMeasureGDIObject = null;
|
|
|
+ this.Cursor = Cursors.Hand;
|
|
|
+ //Invalidate();
|
|
|
|
|
|
}
|
|
|
|