|
@@ -23,15 +23,15 @@ namespace OTSMeasureApp
|
|
public StageDrawingData m_OTSSampleStageData = null;
|
|
public StageDrawingData m_OTSSampleStageData = null;
|
|
//样品测量集合对象
|
|
//样品测量集合对象
|
|
public List<SampleMeasurePara> m_SMeasrueAreaList = null;
|
|
public List<SampleMeasurePara> m_SMeasrueAreaList = null;
|
|
- //样品台存在的List集合
|
|
|
|
|
|
+ //样品台存在的List集合 the rectangle on the edge of stage ,usually one.
|
|
public static List<ARectangleGDIObject> m_RectangleGDIObjects;
|
|
public static List<ARectangleGDIObject> m_RectangleGDIObjects;
|
|
- //标样存在的List集合
|
|
|
|
|
|
+ //标样存在的List集合 usually it is a samll circle.
|
|
public static List<ARectangleGDIObject> m_SpecimenGDIObjects;
|
|
public static List<ARectangleGDIObject> m_SpecimenGDIObjects;
|
|
//样品孔的List集合
|
|
//样品孔的List集合
|
|
string m_SampleHoleSelectName = string.Empty;
|
|
string m_SampleHoleSelectName = string.Empty;
|
|
public static string m_SampleSelectName = string.Empty;
|
|
public static string m_SampleSelectName = string.Empty;
|
|
string m_MeasureSelectName = string.Empty;
|
|
string m_MeasureSelectName = string.Empty;
|
|
- public static List<ARectangleGDIObject> m_SampleHoleGDIObjects;
|
|
|
|
|
|
+ public static List<ARectangleGDIObject> m_SampleHoleGDIObjects;// the hole gdi of the stage
|
|
//样品的List集合
|
|
//样品的List集合
|
|
string m_SelectName = string.Empty;
|
|
string m_SelectName = string.Empty;
|
|
public static ARectangleGDIObject selectSampleGDIObjects;
|
|
public static ARectangleGDIObject selectSampleGDIObjects;
|
|
@@ -42,7 +42,7 @@ namespace OTSMeasureApp
|
|
//测量区域
|
|
//测量区域
|
|
public static List<ARectangleGDIObject> m_MeasureGDIObjects;
|
|
public static List<ARectangleGDIObject> m_MeasureGDIObjects;
|
|
//文字内容
|
|
//文字内容
|
|
- public static List<ARectangleGDIObject> m_ContentGDIObjects;
|
|
|
|
|
|
+ public static List<ARectangleGDIObject> m_ContentGDIObjects;//the text that will display in the hole.
|
|
//测量区域
|
|
//测量区域
|
|
public static List<ARectangleGDIObject> m_MeasurePathGDIObjects;
|
|
public static List<ARectangleGDIObject> m_MeasurePathGDIObjects;
|
|
//帧图
|
|
//帧图
|
|
@@ -224,7 +224,7 @@ namespace OTSMeasureApp
|
|
public void Rev_DDrawCircleMeasure_MeasureAppToSampleWindow_Event()
|
|
public void Rev_DDrawCircleMeasure_MeasureAppToSampleWindow_Event()
|
|
{
|
|
{
|
|
//手绘测量区域类型为圆形
|
|
//手绘测量区域类型为圆形
|
|
- m_DrawMeasureType = (int)CreateRectangleType.CirCle;
|
|
|
|
|
|
+ m_DrawMeasureType = (int)CreateRectangleType.Circle;
|
|
m_IsDrawMeasureReady = true;
|
|
m_IsDrawMeasureReady = true;
|
|
m_RectangIsDragging = false;
|
|
m_RectangIsDragging = false;
|
|
this.Cursor = Cursors.Hand;
|
|
this.Cursor = Cursors.Hand;
|
|
@@ -632,11 +632,11 @@ namespace OTSMeasureApp
|
|
{
|
|
{
|
|
GetSampleStageData(SStage, SEMStageData);
|
|
GetSampleStageData(SStage, SEMStageData);
|
|
m_GlobalZoomNum = 1;
|
|
m_GlobalZoomNum = 1;
|
|
- var SData= m_OTSSampleStageData ;
|
|
|
|
|
|
+
|
|
//清除所有绘制的图形信息
|
|
//清除所有绘制的图形信息
|
|
ClearDrawInfo();
|
|
ClearDrawInfo();
|
|
//绘制样品台信息
|
|
//绘制样品台信息
|
|
- DrawSampleStage(SData);
|
|
|
|
|
|
+ DrawSampleStage(m_OTSSampleStageData);
|
|
//标尺初始化
|
|
//标尺初始化
|
|
RulerInit();
|
|
RulerInit();
|
|
//重新绘制
|
|
//重新绘制
|
|
@@ -764,7 +764,7 @@ namespace OTSMeasureApp
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- CreateBourary = OTSSamplespaceGraphicsPanelFun.GetPixRect(widthDomain, xDomain, yDomain, (int)CreateRectangleType.SampleBackGround_CirCle, "", "", IsWidth, m_DefaultW, m_DefaultH);
|
|
|
|
|
|
+ CreateBourary = OTSSamplespaceGraphicsPanelFun.GetPixRect(widthDomain, xDomain, yDomain, (int)CreateRectangleType.SampleBackGround_Circle, "", "", IsWidth, m_DefaultW, m_DefaultH);
|
|
}
|
|
}
|
|
//获取默认尺寸
|
|
//获取默认尺寸
|
|
m_DefaultWidth = CreateBourary.Region.Width;
|
|
m_DefaultWidth = CreateBourary.Region.Width;
|
|
@@ -772,7 +772,7 @@ namespace OTSMeasureApp
|
|
//添加样品台 对象
|
|
//添加样品台 对象
|
|
//设置路径
|
|
//设置路径
|
|
GraphicsPath MeasurePath = new GraphicsPath();
|
|
GraphicsPath MeasurePath = new GraphicsPath();
|
|
- if (StageShape == (int)CreateRectangleType.CirCle)
|
|
|
|
|
|
+ if (StageShape == (int)CreateRectangleType.Circle)
|
|
{
|
|
{
|
|
MeasurePath.AddEllipse(CreateBourary.Region);
|
|
MeasurePath.AddEllipse(CreateBourary.Region);
|
|
}
|
|
}
|
|
@@ -818,14 +818,14 @@ namespace OTSMeasureApp
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- CreateHole = OTSSamplespaceGraphicsPanelFun.GetPixRect(widthDomain, xHole, yHole, (int)CreateRectangleType.CirCle, "", ChloeClrList[i].sSHoleName, IsWidth, m_DefaultW, m_DefaultH);
|
|
|
|
|
|
+ CreateHole = OTSSamplespaceGraphicsPanelFun.GetPixRect(widthDomain, xHole, yHole, (int)CreateRectangleType.Circle, "", ChloeClrList[i].sSHoleName, IsWidth, m_DefaultW, m_DefaultH);
|
|
}
|
|
}
|
|
//获取样品孔默认尺寸
|
|
//获取样品孔默认尺寸
|
|
m_DefaultStageWidth = CreateHole.Region.Width;
|
|
m_DefaultStageWidth = CreateHole.Region.Width;
|
|
m_DefaultStageHeight = CreateHole.Region.Height;
|
|
m_DefaultStageHeight = CreateHole.Region.Height;
|
|
//绘制样品孔路径
|
|
//绘制样品孔路径
|
|
GraphicsPath HolePath = new GraphicsPath();
|
|
GraphicsPath HolePath = new GraphicsPath();
|
|
- if (ChloeClrList[i].iSHoleShape == (int)CreateRectangleType.CirCle)
|
|
|
|
|
|
+ if (ChloeClrList[i].iSHoleShape == (int)CreateRectangleType.Circle)
|
|
{
|
|
{
|
|
HolePath.AddEllipse(CreateHole.Region);
|
|
HolePath.AddEllipse(CreateHole.Region);
|
|
}
|
|
}
|
|
@@ -852,9 +852,9 @@ namespace OTSMeasureApp
|
|
|
|
|
|
//获取矩形
|
|
//获取矩形
|
|
CreateRectangle CreateSTD = OTSSamplespaceGraphicsPanelFun.GetPixRect(widthDomain, xSTD, ySTD, (int)CreateRectangleType.Rectangle, "", "", IsWidth, m_DefaultW, m_DefaultH);
|
|
CreateRectangle CreateSTD = OTSSamplespaceGraphicsPanelFun.GetPixRect(widthDomain, xSTD, ySTD, (int)CreateRectangleType.Rectangle, "", "", IsWidth, m_DefaultW, m_DefaultH);
|
|
- if (StageShapes == (int)CreateRectangleType.CirCle)
|
|
|
|
|
|
+ if (StageShapes == (int)CreateRectangleType.Circle)
|
|
{
|
|
{
|
|
- CreateSTD = OTSSamplespaceGraphicsPanelFun.GetPixRect(widthDomain, xSTD, ySTD, (int)CreateRectangleType.SpecimenCirCle, "", "", IsWidth, m_DefaultW, m_DefaultH);
|
|
|
|
|
|
+ CreateSTD = OTSSamplespaceGraphicsPanelFun.GetPixRect(widthDomain, xSTD, ySTD, (int)CreateRectangleType.SpecimenCircle, "", "", IsWidth, m_DefaultW, m_DefaultH);
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -864,7 +864,7 @@ namespace OTSMeasureApp
|
|
m_DefaultSampleHeight = CreateSTD.Region.Height;
|
|
m_DefaultSampleHeight = CreateSTD.Region.Height;
|
|
//绘制标样路径
|
|
//绘制标样路径
|
|
GraphicsPath STDPath = new GraphicsPath();
|
|
GraphicsPath STDPath = new GraphicsPath();
|
|
- if (StageShapes == (int)CreateRectangleType.CirCle)
|
|
|
|
|
|
+ if (StageShapes == (int)CreateRectangleType.Circle)
|
|
{
|
|
{
|
|
STDPath.AddEllipse(CreateSTD.Region);
|
|
STDPath.AddEllipse(CreateSTD.Region);
|
|
}
|
|
}
|
|
@@ -1173,7 +1173,7 @@ namespace OTSMeasureApp
|
|
{
|
|
{
|
|
isSelMeasure = true;
|
|
isSelMeasure = true;
|
|
Rectangle rect = new Rectangle(e.Location, new Size(WH, WH));
|
|
Rectangle rect = new Rectangle(e.Location, new Size(WH, WH));
|
|
- int CheckShape = (int)CreateRectangleType.CirCle;
|
|
|
|
|
|
+ int CheckShape = (int)CreateRectangleType.Circle;
|
|
if (m_MeasureGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
if (m_MeasureGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
{
|
|
{
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
@@ -1251,7 +1251,7 @@ namespace OTSMeasureApp
|
|
}
|
|
}
|
|
Rectangle rect = new Rectangle(e.Location, new Size(WH, WH));
|
|
Rectangle rect = new Rectangle(e.Location, new Size(WH, WH));
|
|
//判断样品形状
|
|
//判断样品形状
|
|
- int CheckShape = (int)CreateRectangleType.CirCle;
|
|
|
|
|
|
+ int CheckShape = (int)CreateRectangleType.Circle;
|
|
if (m_MeasureGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
if (m_MeasureGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
{
|
|
{
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
@@ -1300,7 +1300,7 @@ namespace OTSMeasureApp
|
|
if (item.Region.Contains(e.Location))
|
|
if (item.Region.Contains(e.Location))
|
|
{
|
|
{
|
|
Rectangle rect = new Rectangle(e.Location, new Size(WH, WH));
|
|
Rectangle rect = new Rectangle(e.Location, new Size(WH, WH));
|
|
- int CheckShape = (int)CreateRectangleType.CirCle;
|
|
|
|
|
|
+ int CheckShape = (int)CreateRectangleType.Circle;
|
|
if (item.Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
if (item.Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
{
|
|
{
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
@@ -1636,7 +1636,7 @@ namespace OTSMeasureApp
|
|
switch (enumMouse)
|
|
switch (enumMouse)
|
|
{
|
|
{
|
|
case OTSSamplespaceGraphicsPanelFun.EnumMousePointPosition.MouseSizeTopLeft:
|
|
case OTSSamplespaceGraphicsPanelFun.EnumMousePointPosition.MouseSizeTopLeft:
|
|
- if (m_DrawMeasureType == (int)CreateRectangleType.CirCle)
|
|
|
|
|
|
+ if (m_DrawMeasureType == (int)CreateRectangleType.Circle)
|
|
{
|
|
{
|
|
LTPoint.X = m_MouseDownPoint.X - tmp;
|
|
LTPoint.X = m_MouseDownPoint.X - tmp;
|
|
LTPoint.Y = m_MouseDownPoint.Y - tmp;
|
|
LTPoint.Y = m_MouseDownPoint.Y - tmp;
|
|
@@ -1654,7 +1654,7 @@ namespace OTSMeasureApp
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case OTSSamplespaceGraphicsPanelFun.EnumMousePointPosition.MouseSizeTopRight:
|
|
case OTSSamplespaceGraphicsPanelFun.EnumMousePointPosition.MouseSizeTopRight:
|
|
- if (m_DrawMeasureType == (int)CreateRectangleType.CirCle)
|
|
|
|
|
|
+ if (m_DrawMeasureType == (int)CreateRectangleType.Circle)
|
|
{
|
|
{
|
|
LTPoint.X = m_MouseDownPoint.X;
|
|
LTPoint.X = m_MouseDownPoint.X;
|
|
LTPoint.Y = m_MouseDownPoint.Y - tmp;
|
|
LTPoint.Y = m_MouseDownPoint.Y - tmp;
|
|
@@ -1672,7 +1672,7 @@ namespace OTSMeasureApp
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case OTSSamplespaceGraphicsPanelFun.EnumMousePointPosition.MouseSizeBottomLeft:
|
|
case OTSSamplespaceGraphicsPanelFun.EnumMousePointPosition.MouseSizeBottomLeft:
|
|
- if (m_DrawMeasureType == (int)CreateRectangleType.CirCle)
|
|
|
|
|
|
+ if (m_DrawMeasureType == (int)CreateRectangleType.Circle)
|
|
{
|
|
{
|
|
LTPoint.X = m_MouseDownPoint.X - tmp;
|
|
LTPoint.X = m_MouseDownPoint.X - tmp;
|
|
LTPoint.Y = m_MouseDownPoint.Y;
|
|
LTPoint.Y = m_MouseDownPoint.Y;
|
|
@@ -1690,7 +1690,7 @@ namespace OTSMeasureApp
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case OTSSamplespaceGraphicsPanelFun.EnumMousePointPosition.MouseSizeBottomRight:
|
|
case OTSSamplespaceGraphicsPanelFun.EnumMousePointPosition.MouseSizeBottomRight:
|
|
- if (m_DrawMeasureType == (int)CreateRectangleType.CirCle)
|
|
|
|
|
|
+ if (m_DrawMeasureType == (int)CreateRectangleType.Circle)
|
|
{
|
|
{
|
|
LTPoint.X = m_MouseDownPoint.X;
|
|
LTPoint.X = m_MouseDownPoint.X;
|
|
LTPoint.Y = m_MouseDownPoint.Y;
|
|
LTPoint.Y = m_MouseDownPoint.Y;
|
|
@@ -1766,7 +1766,7 @@ namespace OTSMeasureApp
|
|
Rectangle rectTemp = item.Region;
|
|
Rectangle rectTemp = item.Region;
|
|
rectTemp.X = item.Region.Left + e.X - item.DraggingPoint.X;
|
|
rectTemp.X = item.Region.Left + e.X - item.DraggingPoint.X;
|
|
rectTemp.Y = item.Region.Top + e.Y - item.DraggingPoint.Y;
|
|
rectTemp.Y = item.Region.Top + e.Y - item.DraggingPoint.Y;
|
|
- int CheckShape = (int)CreateRectangleType.CirCle;
|
|
|
|
|
|
+ int CheckShape = (int)CreateRectangleType.Circle;
|
|
if (m_RectangleGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
if (m_RectangleGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
{
|
|
{
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
@@ -1808,7 +1808,7 @@ namespace OTSMeasureApp
|
|
Rectangle rectTemp = item.Region;
|
|
Rectangle rectTemp = item.Region;
|
|
rectTemp.X = item.Region.Left + e.X - item.DraggingPoint.X;
|
|
rectTemp.X = item.Region.Left + e.X - item.DraggingPoint.X;
|
|
rectTemp.Y = item.Region.Top + e.Y - item.DraggingPoint.Y;
|
|
rectTemp.Y = item.Region.Top + e.Y - item.DraggingPoint.Y;
|
|
- int CheckShape = (int)CreateRectangleType.CirCle;
|
|
|
|
|
|
+ int CheckShape = (int)CreateRectangleType.Circle;
|
|
if (m_RectangleGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
if (m_RectangleGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
{
|
|
{
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
@@ -1886,7 +1886,7 @@ namespace OTSMeasureApp
|
|
//获取鼠标坐标
|
|
//获取鼠标坐标
|
|
Point xy2 = e.Location;
|
|
Point xy2 = e.Location;
|
|
Rectangle rectTemp = new Rectangle();
|
|
Rectangle rectTemp = new Rectangle();
|
|
- int CheckShape = (int)CreateRectangleType.CirCle;
|
|
|
|
|
|
+ int CheckShape = (int)CreateRectangleType.Circle;
|
|
if (item.CreateType == (int)CreateRectangleType.Polygon)
|
|
if (item.CreateType == (int)CreateRectangleType.Polygon)
|
|
{
|
|
{
|
|
if (m_IsSelPolygonPoint)
|
|
if (m_IsSelPolygonPoint)
|
|
@@ -2771,7 +2771,7 @@ namespace OTSMeasureApp
|
|
Rectangle rectTemp = item.Region;
|
|
Rectangle rectTemp = item.Region;
|
|
rectTemp.X = item.Region.Left + e.X - item.DraggingPoint.X;
|
|
rectTemp.X = item.Region.Left + e.X - item.DraggingPoint.X;
|
|
rectTemp.Y = item.Region.Top + e.Y - item.DraggingPoint.Y;
|
|
rectTemp.Y = item.Region.Top + e.Y - item.DraggingPoint.Y;
|
|
- int CheckShape = (int)CreateRectangleType.CirCle;
|
|
|
|
|
|
+ int CheckShape = (int)CreateRectangleType.Circle;
|
|
if (m_RectangleGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
if (m_RectangleGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
{
|
|
{
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
@@ -2808,7 +2808,7 @@ namespace OTSMeasureApp
|
|
if (item.Shape == (int)CreateRectangleType.Polygon)
|
|
if (item.Shape == (int)CreateRectangleType.Polygon)
|
|
{
|
|
{
|
|
//判断样品台形状
|
|
//判断样品台形状
|
|
- int CheckShape = (int)CreateRectangleType.CirCle;
|
|
|
|
|
|
+ int CheckShape = (int)CreateRectangleType.Circle;
|
|
if (m_RectangleGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
if (m_RectangleGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
{
|
|
{
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
@@ -2885,7 +2885,7 @@ namespace OTSMeasureApp
|
|
rectTemp.Y = m_StageCenterPoint.Y - semLocation.Y;// - rectTemp.Height/ 2;
|
|
rectTemp.Y = m_StageCenterPoint.Y - semLocation.Y;// - rectTemp.Height/ 2;
|
|
rectTemp.Width = 2;
|
|
rectTemp.Width = 2;
|
|
rectTemp.Height = 2;
|
|
rectTemp.Height = 2;
|
|
- int CheckShape = (int)CreateRectangleType.CirCle;
|
|
|
|
|
|
+ int CheckShape = (int)CreateRectangleType.Circle;
|
|
if (m_RectangleGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
if (m_RectangleGDIObjects[0].Shape == (int)CreateRectangleType.SampleBackGround_Rectangle)
|
|
{
|
|
{
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
CheckShape = (int)CreateRectangleType.SampleBackGround_Rectangle;
|
|
@@ -4527,7 +4527,7 @@ namespace OTSMeasureApp
|
|
{
|
|
{
|
|
if (m_MeasureGDIObjects[i].IsWorkSample)
|
|
if (m_MeasureGDIObjects[i].IsWorkSample)
|
|
{
|
|
{
|
|
- ARectangleGDIObject m_ResetMeasureGDIobjects = CStageManage.ResetMeasure((int)CreateRectangleType.CirCle, itemSample, m_MeasureGDIObject, m_GlobalZoomNum);
|
|
|
|
|
|
+ ARectangleGDIObject m_ResetMeasureGDIobjects = CStageManage.ResetMeasure((int)CreateRectangleType.Circle, itemSample, m_MeasureGDIObject, m_GlobalZoomNum);
|
|
m_MeasureGDIObjects[i].Region = m_ResetMeasureGDIobjects.Region;
|
|
m_MeasureGDIObjects[i].Region = m_ResetMeasureGDIobjects.Region;
|
|
m_MeasureGDIObjects[i].RegionF = m_ResetMeasureGDIobjects.RegionF;
|
|
m_MeasureGDIObjects[i].RegionF = m_ResetMeasureGDIobjects.RegionF;
|
|
m_MeasureGDIObjects[i].DrawRegionF = m_ResetMeasureGDIobjects.DrawRegionF;
|
|
m_MeasureGDIObjects[i].DrawRegionF = m_ResetMeasureGDIobjects.DrawRegionF;
|