|
@@ -625,7 +625,7 @@ namespace OTSMeasureApp
|
|
|
/// <param name="m_MeasureAppForm"></param>
|
|
|
/// <param name="sampleName"></param>
|
|
|
/// <returns></returns>
|
|
|
- public static SampleMeasurePara GetMeasureInfo(OTSIncAMeasureAppForm m_MeasureAppForm, string sampleName, ARectangleGDIObject item, ARectangleGDIObject m_RectangleGDIObjects, StageDrawingData oTSSampleStageData, int wDomain, int w)
|
|
|
+ public static SampleMeasurePara GetMeasureInfo( string sampleName, ARectangleGDIObject item, int wDomain, int w)
|
|
|
{
|
|
|
SampleMeasurePara sampleMeasurePara = new SampleMeasurePara();
|
|
|
foreach (ARectangleGDIObject measureItem in OTSSamplespaceWindow.m_MeasureGDIObjects)
|
|
@@ -679,7 +679,7 @@ namespace OTSMeasureApp
|
|
|
return sampleMeasurePara;
|
|
|
}
|
|
|
|
|
|
- public static SampleHolePara GetSampleHoleInfo(OTSIncAMeasureAppForm m_MeasureAppForm, string sampleHoleName, ARectangleGDIObject item, ARectangleGDIObject m_RectangleGDIObjects, StageDrawingData oTSSampleStageData, int wDomain, int w)
|
|
|
+ public static SampleHolePara GetSampleHoleInfo(string sampleHoleName, ARectangleGDIObject item, int wDomain, int w)
|
|
|
{
|
|
|
SampleHolePara sampleHolePara = new SampleHolePara();
|
|
|
foreach (ARectangleGDIObject sampleHoleItem in OTSSamplespaceWindow.m_SampleHoleGDIObjects)
|
|
@@ -717,20 +717,20 @@ namespace OTSMeasureApp
|
|
|
/// 获取工作样品的测量区域信息
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
- public static Rectangle GetWorkMeasure(OTSIncAMeasureAppForm m_MeasureAppForm, ARectangleGDIObject m_RectangleGDIObjects, StageDrawingData oTSSampleStageData, int wDomain, int w)
|
|
|
- {
|
|
|
- foreach (ARectangleGDIObject itemMeasure in OTSSamplespaceWindow.m_MeasureGDIObjects)
|
|
|
- {
|
|
|
- if (itemMeasure.IsWorkSample)
|
|
|
- {
|
|
|
- Point startPoint = new Point(itemMeasure.Region.Left, itemMeasure.Region.Top);
|
|
|
- Point endPoint = new Point(itemMeasure.Region.Right, itemMeasure.Region.Bottom);
|
|
|
- SampleMeasurePara rectMaesure = GetMeasureInfo(m_MeasureAppForm, itemMeasure.SampleName, itemMeasure, m_RectangleGDIObjects, oTSSampleStageData, wDomain, w);
|
|
|
- return rectMaesure.MeasureRect;
|
|
|
- }
|
|
|
- }
|
|
|
- return new Rectangle();
|
|
|
- }
|
|
|
+ //public static Rectangle GetWorkMeasure( int wDomain, int w)
|
|
|
+ //{
|
|
|
+ // foreach (ARectangleGDIObject itemMeasure in OTSSamplespaceWindow.m_MeasureGDIObjects)
|
|
|
+ // {
|
|
|
+ // if (itemMeasure.IsWorkSample)
|
|
|
+ // {
|
|
|
+ // Point startPoint = new Point(itemMeasure.Region.Left, itemMeasure.Region.Top);
|
|
|
+ // Point endPoint = new Point(itemMeasure.Region.Right, itemMeasure.Region.Bottom);
|
|
|
+ // SampleMeasurePara rectMaesure = GetMeasureInfo(itemMeasure.SampleName, itemMeasure, wDomain, w);
|
|
|
+ // return rectMaesure.MeasureRect;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // return new Rectangle();
|
|
|
+ //}
|
|
|
#endregion
|
|
|
|
|
|
#region 删除样品弹出提示
|
|
@@ -811,21 +811,21 @@ namespace OTSMeasureApp
|
|
|
#endregion
|
|
|
|
|
|
#region 计算两个点之间的距离 (图形中心与屏幕中心相差的距离)
|
|
|
- public static Point RegionCenterToScreenCenterDist(ARectangleGDIObject regionCneter, Point screenCneter)
|
|
|
- {
|
|
|
- Point differentPoint = new Point();
|
|
|
- //获取图形中心位置
|
|
|
- Rectangle rectangle = new Rectangle();
|
|
|
- rectangle.X = (int)regionCneter.RegionF.X;
|
|
|
- rectangle.Y = (int)regionCneter.RegionF.Y;
|
|
|
- rectangle.Width = (int)regionCneter.RegionF.Width;
|
|
|
- rectangle.Height = (int)regionCneter.RegionF.Height;
|
|
|
- Point m_RegionCenter = OTSSamplespaceGraphicsPanelFun.GetCenterPoint(rectangle);
|
|
|
- //获取图形中心与屏幕中心相差的距离
|
|
|
- differentPoint.X = m_RegionCenter.X - screenCneter.X;
|
|
|
- differentPoint.Y = m_RegionCenter.Y - screenCneter.Y;
|
|
|
- return differentPoint;
|
|
|
- }
|
|
|
+ //public static Point RegionCenterToScreenCenterDist(ARectangleGDIObject regionCneter, Point screenCneter)
|
|
|
+ //{
|
|
|
+ // Point differentPoint = new Point();
|
|
|
+ // //获取图形中心位置
|
|
|
+ // Rectangle rectangle = new Rectangle();
|
|
|
+ // rectangle.X = (int)regionCneter.RegionF.X;
|
|
|
+ // rectangle.Y = (int)regionCneter.RegionF.Y;
|
|
|
+ // rectangle.Width = (int)regionCneter.RegionF.Width;
|
|
|
+ // rectangle.Height = (int)regionCneter.RegionF.Height;
|
|
|
+ // Point m_RegionCenter = OTSSamplespaceGraphicsPanelFun.GetCenterPoint(rectangle);
|
|
|
+ // //获取图形中心与屏幕中心相差的距离
|
|
|
+ // differentPoint.X = m_RegionCenter.X - screenCneter.X;
|
|
|
+ // differentPoint.Y = m_RegionCenter.Y - screenCneter.Y;
|
|
|
+ // return differentPoint;
|
|
|
+ //}
|
|
|
#endregion
|
|
|
|
|
|
#region 清除List中所有信息
|
|
@@ -880,7 +880,7 @@ namespace OTSMeasureApp
|
|
|
if (returnResult)
|
|
|
{
|
|
|
//获取测量区域的OTS位置与尺寸
|
|
|
- sampleMeasureParas = OTSSamplespaceGraphicsPanelFun.GetMeasureInfo(m_MeasureAppForm, MeasureItem.SampleName, MeasureItem, m_RectangleGDIObjects, oTSSampleStageData, wDomain, w);
|
|
|
+ sampleMeasureParas = OTSSamplespaceGraphicsPanelFun.GetMeasureInfo( MeasureItem.SampleName, MeasureItem, wDomain, w);
|
|
|
//获取工作区域位置与尺寸
|
|
|
Rectangle WorkAreaRect = new Rectangle(0, 0, Width, Height);
|
|
|
//获取工作区域 中心点
|
|
@@ -912,12 +912,12 @@ namespace OTSMeasureApp
|
|
|
return sampleMeasureParas;
|
|
|
}
|
|
|
|
|
|
- public static SampleHolePara GetSampleHoleRect(ARectangleGDIObject sampleHoleItem, OTSIncAMeasureAppForm m_MeasureAppForm, StageDrawingData oTSSampleStageData, ARectangleGDIObject m_RectangleGDIObjects, int IsWidth, int Width, int Height, int wDomain)
|
|
|
+ public static SampleHolePara GetSampleHoleRect(ARectangleGDIObject sampleHoleItem, ARectangleGDIObject m_RectangleGDIObjects, int IsWidth, int Width, int Height, int wDomain)
|
|
|
{
|
|
|
int w = (IsWidth == 0 ? Width : Height);
|
|
|
SampleHolePara sampleHoleParas = new SampleHolePara();
|
|
|
//获取样品孔的OTS位置与尺寸
|
|
|
- sampleHoleParas = OTSSamplespaceGraphicsPanelFun.GetSampleHoleInfo(m_MeasureAppForm, sampleHoleItem.Name, sampleHoleItem, m_RectangleGDIObjects, oTSSampleStageData, wDomain, w);
|
|
|
+ sampleHoleParas = OTSSamplespaceGraphicsPanelFun.GetSampleHoleInfo( sampleHoleItem.Name, sampleHoleItem, wDomain, w);
|
|
|
//获取工作区域位置与尺寸
|
|
|
Rectangle WorkAreaRect = new Rectangle(0, 0, Width, Height);
|
|
|
//获取工作区域 中心点
|