|
@@ -842,28 +842,8 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
|
|
|
|
|
|
return allobj;
|
|
|
}
|
|
|
- public List<CRectangleGDIObject> GetAllGDIObjectWithoutHoleNameStr()
|
|
|
- {
|
|
|
- var allobj = new List<CRectangleGDIObject>();
|
|
|
- foreach (CRectangleGDIObject item in m_StageEdgeGDIObjects)
|
|
|
- {
|
|
|
- allobj.Add(item);
|
|
|
- }
|
|
|
-
|
|
|
- foreach (CRectangleGDIObject item in m_SampleHoleGDIObjects)
|
|
|
- {
|
|
|
- allobj.Add(item);
|
|
|
- }
|
|
|
- foreach (CRectangleGDIObject item in m_SpecimenGDIObjects)
|
|
|
- {
|
|
|
- allobj.Add(item);
|
|
|
- }
|
|
|
|
|
|
|
|
|
-
|
|
|
- return allobj;
|
|
|
- }
|
|
|
-
|
|
|
public PointF GetCenterPoint(RectangleF rect)
|
|
|
{
|
|
|
//声明
|
|
@@ -873,29 +853,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
|
|
|
centerPoint.Y = rect.Y + rect.Height / 2;
|
|
|
return centerPoint;
|
|
|
}
|
|
|
- public SampleHolePara GetSampleHoleInfo(CRectangleGDIObject item)
|
|
|
- {
|
|
|
- SampleHolePara sampleHolePara = new SampleHolePara();
|
|
|
-
|
|
|
-
|
|
|
- //设置测量区域
|
|
|
- sampleHolePara.SampleHoleRect = item.GetZoomedRegion;
|
|
|
- //设置测量区域位置与尺寸
|
|
|
- float left = PixelConvertToMicron(item.GetZoomedRegionF().X);
|
|
|
- float Top = PixelConvertToMicron(item.GetZoomedRegionF().Y);
|
|
|
- float Width = PixelConvertToMicron(item.GetZoomedRegionF().Width);
|
|
|
- float Height = PixelConvertToMicron(item.GetZoomedRegionF().Height);
|
|
|
-
|
|
|
- PointF startPoint = new PointF(left, Top);
|
|
|
- SizeF sampleHoleSize = new SizeF(Width, Height);
|
|
|
- sampleHolePara.SampleHoleRect = new Rectangle(new Point((int)startPoint.X, (int)startPoint.Y), new Size((int)sampleHoleSize.Width, (int)sampleHoleSize.Height));
|
|
|
- //设置样品孔名称
|
|
|
- sampleHolePara.sHoleName = item.NameOrHoleName;
|
|
|
- //设置测量区域形状
|
|
|
- sampleHolePara.iShape = item.Shape;
|
|
|
-
|
|
|
- return sampleHolePara;
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
|
|
|
}
|