|
@@ -71,27 +71,59 @@ namespace OTSMeasureApp
|
|
|
|
|
|
/// <summary></summary>
|
|
|
/// <remarks>创建</remarks>
|
|
|
- public COTSMsrPrjResultData m_ResultData;
|
|
|
+ private COTSMsrPrjResultData resultData;
|
|
|
|
|
|
|
|
|
|
|
|
//参数文件
|
|
|
- public COTSDefaultParam m_DefaultParam = null;
|
|
|
+ private COTSDefaultParam defaultParam = null;
|
|
|
//样品台文件(读取样品台数据等)
|
|
|
- public CStageParam m_StageParam = null;
|
|
|
- public CSpecialGrayRangeParam m_specialRanges=null;
|
|
|
-
|
|
|
+ private CStageParam stageParam = null;
|
|
|
+ private CSpecialGrayRangeParam specialRanges = null;
|
|
|
+
|
|
|
//测量样品链表
|
|
|
List<COTSSample> m_MeasureSampleList = new List<COTSSample>();
|
|
|
|
|
|
NLog.Logger log ;
|
|
|
|
|
|
+ public CSpecialGrayRangeParam SpecialRanges { get => specialRanges; set => specialRanges = value; }
|
|
|
+
|
|
|
+ public CStageParam GetStageParam()
|
|
|
+ {
|
|
|
+ return stageParam;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetStageParam(CStageParam value)
|
|
|
+ {
|
|
|
+ stageParam = value;
|
|
|
+ }
|
|
|
+
|
|
|
+ public COTSDefaultParam GetDefaultParam()
|
|
|
+ {
|
|
|
+ return defaultParam;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetDefaultParam(COTSDefaultParam value)
|
|
|
+ {
|
|
|
+ defaultParam = value;
|
|
|
+ }
|
|
|
+
|
|
|
+ public COTSMsrPrjResultData GetResultData()
|
|
|
+ {
|
|
|
+ return resultData;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void SetResultData(COTSMsrPrjResultData value)
|
|
|
+ {
|
|
|
+ resultData = value;
|
|
|
+ }
|
|
|
+
|
|
|
public COTSMeasureParam(OTSIncAMeasureAppForm MeasureApp)
|
|
|
{
|
|
|
log = NLog.LogManager.GetCurrentClassLogger();
|
|
|
m_MeasureAppFrom = MeasureApp;
|
|
|
-
|
|
|
- m_ResultData = new COTSMsrPrjResultData();
|
|
|
+
|
|
|
+ SetResultData(new COTSMsrPrjResultData());
|
|
|
|
|
|
|
|
|
}
|
|
@@ -104,9 +136,9 @@ namespace OTSMeasureApp
|
|
|
public bool LoadParamFile()
|
|
|
{
|
|
|
//加载样品参数文件: \Config\SysData\OTSProgMgrParam.pmf
|
|
|
- m_DefaultParam = new COTSDefaultParam();
|
|
|
- m_DefaultParam.LoadInfoFromProgMgrFile();
|
|
|
- if (null == m_DefaultParam)
|
|
|
+ SetDefaultParam(new COTSDefaultParam());
|
|
|
+ GetDefaultParam().LoadInfoFromProgMgrFile();
|
|
|
+ if (null == GetDefaultParam())
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
@@ -118,9 +150,9 @@ namespace OTSMeasureApp
|
|
|
//检查参数样品台文件是否存在
|
|
|
public bool LoadStageParamFile()
|
|
|
{
|
|
|
- m_StageParam = new CStageParam();
|
|
|
+ SetStageParam(new CStageParam());
|
|
|
// 加载样品台文件; \Config\SysData\OTSStage.stg
|
|
|
- if (!m_StageParam.Load(true, false))
|
|
|
+ if (!GetStageParam().Load(true, false))
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
@@ -131,9 +163,9 @@ namespace OTSMeasureApp
|
|
|
|
|
|
public bool LoadSpecialGrayRangeParamFile()
|
|
|
{
|
|
|
- m_specialRanges = new CSpecialGrayRangeParam();
|
|
|
+ SpecialRanges = new CSpecialGrayRangeParam();
|
|
|
|
|
|
- if (!m_specialRanges.LoadParam());
|
|
|
+ if (!SpecialRanges.LoadParam());
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
@@ -150,39 +182,39 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
|
|
|
//设置样品台参数
|
|
|
- CStage Stage = m_StageParam.GetWorkingStage();
|
|
|
+ CStage Stage = GetStageParam().GetWorkingStage();
|
|
|
if (null == Stage)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- m_ResultData.SetStage(Stage);
|
|
|
+ GetResultData().SetStage(Stage);
|
|
|
|
|
|
|
|
|
// 设置 SEM stage data
|
|
|
- CSEMStageData SEMData = m_DefaultParam.GetStageDataParam();
|
|
|
+ CSEMStageData SEMData = GetDefaultParam().GetStageDataParam();
|
|
|
if (null == SEMData)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- m_ResultData.SetSEMStageData(SEMData);
|
|
|
+ GetResultData().SetSEMStageData(SEMData);
|
|
|
}
|
|
|
|
|
|
//设置 general parameter
|
|
|
- COTSGeneralParam GenParam = m_DefaultParam.GetGenParam();
|
|
|
+ COTSGeneralParam GenParam = GetDefaultParam().GetGenParam();
|
|
|
if (null == GenParam)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- m_ResultData.SetGenParam(GenParam);
|
|
|
+ GetResultData().SetGenParam(GenParam);
|
|
|
|
|
|
|
|
|
|
|
|
- if (m_ResultData.GetPathName()=="")
|
|
|
+ if (GetResultData().GetPathName()=="")
|
|
|
{
|
|
|
- m_ResultData.SetPathName("Untitled");
|
|
|
+ GetResultData().SetPathName("Untitled");
|
|
|
}
|
|
|
|
|
|
- m_ResultData.m_nPackId = m_DefaultParam.m_nPackId;
|
|
|
+ GetResultData().m_nPackId = GetDefaultParam().m_nPackId;
|
|
|
|
|
|
|
|
|
return true;
|
|
@@ -193,12 +225,12 @@ namespace OTSMeasureApp
|
|
|
//新建样品工作文件 0:报错 1:正常 2:取消
|
|
|
public int CreateNewFile()
|
|
|
{
|
|
|
- if (m_ResultData.IsModified()) // 文件被修改
|
|
|
+ if (GetResultData().IsModified()) // 文件被修改
|
|
|
{
|
|
|
int iRev = m_MeasureAppFrom.ShowSaveInfoMsgBox();
|
|
|
if ((int)MessageBoxRev.DIALOG_YES == iRev)
|
|
|
{
|
|
|
- if (!m_ResultData.Save())
|
|
|
+ if (!GetResultData().Save())
|
|
|
{
|
|
|
|
|
|
return 0;
|
|
@@ -213,10 +245,10 @@ namespace OTSMeasureApp
|
|
|
//新建新的工作文件
|
|
|
//重新生成一个工作文件对象
|
|
|
COTSMsrPrjResultData ProjDataMgr = new COTSMsrPrjResultData();
|
|
|
- m_ResultData.SetPathName("Untitled");
|
|
|
-
|
|
|
+ GetResultData().SetPathName("Untitled");
|
|
|
+
|
|
|
|
|
|
- m_ResultData = ProjDataMgr;
|
|
|
+ SetResultData(ProjDataMgr);
|
|
|
this.LoadStageParamFile();
|
|
|
|
|
|
if (!this.InitResultData())
|
|
@@ -236,7 +268,7 @@ namespace OTSMeasureApp
|
|
|
public Point ChangeOTSToSemCoord(Point POTSCoord)
|
|
|
{
|
|
|
System.Drawing.Point VSemCoord = new System.Drawing.Point();
|
|
|
- m_DefaultParam.GetStageDataParam().ConverOTSToSEMPoint(POTSCoord, ref VSemCoord);
|
|
|
+ GetDefaultParam().GetStageDataParam().ConverOTSToSEMPoint(POTSCoord, ref VSemCoord);
|
|
|
return (Point)VSemCoord;
|
|
|
}
|
|
|
|
|
@@ -244,7 +276,7 @@ namespace OTSMeasureApp
|
|
|
public Point ConverSEMToOTSPoint(Point PSEMCoord)
|
|
|
{
|
|
|
System.Drawing.Point VOTSCoord = new System.Drawing.Point();
|
|
|
- m_DefaultParam.GetStageDataParam().ConverSEMToOTSPoint(PSEMCoord, ref VOTSCoord);
|
|
|
+ GetDefaultParam().GetStageDataParam().ConverSEMToOTSPoint(PSEMCoord, ref VOTSCoord);
|
|
|
return (Point)VOTSCoord;
|
|
|
}
|
|
|
|
|
@@ -258,7 +290,7 @@ namespace OTSMeasureApp
|
|
|
SetSampleDefaultPara(ref NewSample, a_strHoleName);
|
|
|
//NewSample.
|
|
|
//添加样品
|
|
|
- m_ResultData.AddSample(NewSample);
|
|
|
+ GetResultData().AddSample(NewSample);
|
|
|
|
|
|
|
|
|
// 获取样品的属性值
|
|
@@ -293,17 +325,17 @@ namespace OTSMeasureApp
|
|
|
CDomain pMsrArea = CalculateDefaultArea(pHole);
|
|
|
// measure data parameters containing particle analysis std, image scan parameter, image process parameter and x-ray parameter
|
|
|
CSampleParam poMsrParams = new CSampleParam();
|
|
|
- poMsrParams.m_nPackId = m_DefaultParam.m_nPackId;
|
|
|
- poMsrParams.m_runmode = m_DefaultParam.m_runmode;
|
|
|
- var m_pParam = m_DefaultParam.GetGenParam();
|
|
|
+ poMsrParams.m_nPackId = GetDefaultParam().m_nPackId;
|
|
|
+ poMsrParams.m_runmode = GetDefaultParam().m_runmode;
|
|
|
+ var m_pParam = GetDefaultParam().GetGenParam();
|
|
|
MEMBRANE_TYPE a_nVal = (MEMBRANE_TYPE)m_pParam.GetMembraneType();
|
|
|
- poMsrParams.SetImageScanParam(m_DefaultParam.GetImageScanParam ());
|
|
|
- poMsrParams.SetImageProcessParam(m_DefaultParam.GetImageProcParam());
|
|
|
- poMsrParams.SetXRayParam(m_DefaultParam.GetXRayParam());
|
|
|
+ poMsrParams.SetImageScanParam(GetDefaultParam().GetImageScanParam ());
|
|
|
+ poMsrParams.SetImageProcessParam(GetDefaultParam().GetImageProcParam());
|
|
|
+ poMsrParams.SetXRayParam(GetDefaultParam().GetXRayParam());
|
|
|
String sSTDName = m_pParam.GetSTDSelect();
|
|
|
poMsrParams.SetSTDName(sSTDName);
|
|
|
poMsrParams.SetSteelTechnology((STEEL_TECHNOLOGY)m_pParam.GetSteelTechnology());
|
|
|
- poMsrParams.SetSpecialGrayRangeParam(m_specialRanges);
|
|
|
+ poMsrParams.SetSpecialGrayRangeParam(SpecialRanges);
|
|
|
// set sample parameters
|
|
|
pSample.SetName(strNewSampleName);
|
|
|
pSample.SetSampleHoleName(pHole.GetName());
|
|
@@ -313,7 +345,7 @@ namespace OTSMeasureApp
|
|
|
pSample.SetMembraneType(a_nVal);
|
|
|
pSample.SetMsrParams(poMsrParams);
|
|
|
CSEMDataMsr semData = new CSEMDataMsr();
|
|
|
- var m_pSEMStageData = m_DefaultParam.GetStageDataParam();
|
|
|
+ var m_pSEMStageData = GetDefaultParam().GetStageDataParam();
|
|
|
semData.SetScanFieldSize100(m_pSEMStageData.GetScanFieldSize100());
|
|
|
pSample.SetSEMDataMsr(semData);
|
|
|
|
|
@@ -325,7 +357,7 @@ namespace OTSMeasureApp
|
|
|
String strNewSmplName = "";
|
|
|
|
|
|
// safety check
|
|
|
- var m_pParam = m_DefaultParam.GetGenParam();
|
|
|
+ var m_pParam = GetDefaultParam().GetGenParam();
|
|
|
if (m_pParam == null)
|
|
|
{
|
|
|
// shouldn't happen, invalid general parameter pointer.
|
|
@@ -362,7 +394,7 @@ namespace OTSMeasureApp
|
|
|
|
|
|
// go through sample list
|
|
|
int nIndex = 0;
|
|
|
- var m_listSamples = m_ResultData.GetSampleList();
|
|
|
+ var m_listSamples = GetResultData().GetSampleList();
|
|
|
foreach (var pSample in m_listSamples)
|
|
|
{
|
|
|
// return TRUE if this is not an exclude sample and its name is same with input
|
|
@@ -384,7 +416,7 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
|
|
|
// get holes list of the stage
|
|
|
- var m_pStage = m_StageParam.GetWorkingStage();
|
|
|
+ var m_pStage = GetStageParam().GetWorkingStage();
|
|
|
List<CHole> listHoles = m_pStage.GetHoleList();
|
|
|
//返回样品孔对象
|
|
|
CHole cReHole = new CHole();
|
|
@@ -429,7 +461,7 @@ namespace OTSMeasureApp
|
|
|
// has this hole any sample in it?
|
|
|
String strHoleName = pHole.GetName();
|
|
|
bool IsChanged = false;
|
|
|
- var m_listSamples = m_ResultData.GetSampleList();
|
|
|
+ var m_listSamples = GetResultData().GetSampleList();
|
|
|
foreach (COTSSample sampleItem in m_listSamples)
|
|
|
{
|
|
|
if (strHoleName == sampleItem.GetSampleHoleName())
|
|
@@ -451,7 +483,7 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
Rectangle rectHole = a_pHole.GetDomainRect();
|
|
|
System.Drawing.Point ptCenter = new System.Drawing.Point((rectHole.Left + rectHole.Right) / 2, (rectHole.Top + rectHole.Bottom) / 2);
|
|
|
- var m_pParam = m_DefaultParam.GetGenParam();
|
|
|
+ var m_pParam = GetDefaultParam().GetGenParam();
|
|
|
DOMAIN_SHAPE nShape = m_pParam.GetShape();
|
|
|
|
|
|
double dArea = m_pParam.GetArea() * 1000000;
|
|
@@ -490,13 +522,13 @@ namespace OTSMeasureApp
|
|
|
public bool SetSampleParamVal(OTS_SAMPLE_PROP_GRID_ITEMS ItemId, OTS_ITEM_TYPES ValType, object objVal)
|
|
|
{
|
|
|
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
|
|
|
bool bSetFalg = false;
|
|
|
//判断样品名是否有效
|
|
|
if (ItemId == OTS_SAMPLE_PROP_GRID_ITEMS.SAMPLE_NAME)
|
|
|
{
|
|
|
- if (!m_ResultData.IsValidSampleName((string)objVal))
|
|
|
+ if (!GetResultData().IsValidSampleName((string)objVal))
|
|
|
{
|
|
|
bSetFalg = false;
|
|
|
return false;
|
|
@@ -506,7 +538,7 @@ namespace OTSMeasureApp
|
|
|
|
|
|
if (bSetFalg)
|
|
|
{
|
|
|
- m_ResultData.SetModify(true);
|
|
|
+ GetResultData().SetModify(true);
|
|
|
}
|
|
|
return bSetFalg;
|
|
|
}
|
|
@@ -515,7 +547,7 @@ namespace OTSMeasureApp
|
|
|
public string GetWorkSampleName()
|
|
|
{
|
|
|
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return "";
|
|
@@ -538,7 +570,7 @@ namespace OTSMeasureApp
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- if (!m_ResultData.SetWorkingSampleByName(sNewWorkSampleName))
|
|
|
+ if (!GetResultData().SetWorkingSampleByName(sNewWorkSampleName))
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
@@ -550,7 +582,7 @@ namespace OTSMeasureApp
|
|
|
public COTSSample GetWorkSample()
|
|
|
{
|
|
|
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
|
|
@@ -563,32 +595,32 @@ namespace OTSMeasureApp
|
|
|
//string sWorkSampleName : 删除工作样品名称
|
|
|
public bool DeleteWorkSample(string sWorkSampleName)
|
|
|
{
|
|
|
- return m_ResultData.DeleteSampleByName(sWorkSampleName);
|
|
|
+ return GetResultData().DeleteSampleByName(sWorkSampleName);
|
|
|
}
|
|
|
|
|
|
// 获取样品总数
|
|
|
//返回样品总数
|
|
|
public int GetSampleCount()
|
|
|
{
|
|
|
- return m_ResultData.GetSampleList().Count();
|
|
|
+ return GetResultData().GetSampleList().Count();
|
|
|
}
|
|
|
|
|
|
//改变工作样品名称
|
|
|
//String sWSampleNewName
|
|
|
public bool ChangeWorkSampleName(String sWSampleNewName)
|
|
|
{
|
|
|
- if (!m_ResultData.IsValidSampleName(sWSampleNewName))
|
|
|
+ if (!GetResultData().IsValidSampleName(sWSampleNewName))
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- COTSSample WorkSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WorkSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WorkSample)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
WorkSample.SetName(sWSampleNewName);
|
|
|
- m_ResultData.SetModify(true);
|
|
|
+ GetResultData().SetModify(true);
|
|
|
return true;
|
|
|
|
|
|
}
|
|
@@ -598,7 +630,7 @@ namespace OTSMeasureApp
|
|
|
public SampleMeasurePara SetWorkSampleHoleNameAndMeasureArea(SampleMeasurePara SMeasurePara)
|
|
|
{
|
|
|
SampleMeasurePara SMPara = new SampleMeasurePara();
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return SMPara;
|
|
@@ -644,7 +676,7 @@ namespace OTSMeasureApp
|
|
|
public void SetMeasureAreaShape(int iShape)
|
|
|
{
|
|
|
// SampleMeasurePara SMPara = new SampleMeasurePara();
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return;
|
|
@@ -660,7 +692,7 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
OTS_SAMPLE_PROP_GRID_ITEM_GROUPS GroupID = OTS_SAMPLE_PROP_GRID_ITEM_GROUPS.INVALID;
|
|
|
OTS_SAMPLE_PROP_GRID_ITEMS iItemID = OTS_SAMPLE_PROP_GRID_ITEMS.INVALID;
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return;
|
|
@@ -678,13 +710,13 @@ namespace OTSMeasureApp
|
|
|
//bool ParaLockFlag : 样品参数锁
|
|
|
public bool SetWorkSampleParamLock(bool ParaLockFlag)
|
|
|
{
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
WSample.SetParamLock(ParaLockFlag);
|
|
|
- m_ResultData.SetModify(true);
|
|
|
+ GetResultData().SetModify(true);
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -692,7 +724,7 @@ namespace OTSMeasureApp
|
|
|
//ref bool ParamLockFlag : 获取的工作样品参数锁
|
|
|
public bool GetWSampleParaLock(ref bool ParamLockFlag)
|
|
|
{
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
@@ -704,7 +736,7 @@ namespace OTSMeasureApp
|
|
|
//获取工作样品测量锁
|
|
|
public bool GetWSampleParaLock(ref OTSSamplePropertyInfo SMInfo)
|
|
|
{
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
@@ -721,13 +753,13 @@ namespace OTSMeasureApp
|
|
|
//重新设置样品在样品列表中的位置(当拖动TREEVIEW的样品顺序后执行 )
|
|
|
public bool SortSamplePosition(List<string> SNameList)
|
|
|
{
|
|
|
- if (!m_ResultData.ResetSamplesListOrder(SNameList))
|
|
|
+ if (!GetResultData().ResetSamplesListOrder(SNameList))
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
List<COTSSample> SampleList = new List<COTSSample>();
|
|
|
- SampleList = m_ResultData.GetSampleList();
|
|
|
+ SampleList = GetResultData().GetSampleList();
|
|
|
|
|
|
return true;
|
|
|
}
|
|
@@ -738,7 +770,7 @@ namespace OTSMeasureApp
|
|
|
m_MeasureSampleList.Clear();
|
|
|
List<COTSSample> MSampleList = new List<COTSSample>();
|
|
|
|
|
|
- if (!CheckMeasureParam(m_ResultData, ref MSampleList, bCheckFlag))
|
|
|
+ if (!CheckMeasureParam(GetResultData(), ref MSampleList, bCheckFlag))
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
@@ -1070,7 +1102,7 @@ namespace OTSMeasureApp
|
|
|
//List<string> MParamFileNameList: 测量参数文件链表
|
|
|
public bool GetMeasureParamFileName(ref int iNamePos, ref List<string> MParamFileNameList)
|
|
|
{
|
|
|
- if (!m_ResultData.GetParamFileList(ref iNamePos, ref MParamFileNameList))
|
|
|
+ if (!GetResultData().GetParamFileList(ref iNamePos, ref MParamFileNameList))
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
@@ -1080,7 +1112,7 @@ namespace OTSMeasureApp
|
|
|
//int iNamePos: 文件名在链表中的位置
|
|
|
public bool SetMeasrueParamFileName(int iNamePos)
|
|
|
{
|
|
|
- if (!m_ResultData.ChangeParamFromList(iNamePos))
|
|
|
+ if (!GetResultData().ChangeParamFromList(iNamePos))
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
@@ -1092,7 +1124,7 @@ namespace OTSMeasureApp
|
|
|
//List<string> STDFileNameList: STD文件链表
|
|
|
public bool GetSTDFileName(ref int iNamePos, ref List<string> STDFileNameList)
|
|
|
{
|
|
|
- if (!m_ResultData.GetSTDFileList(ref iNamePos, ref STDFileNameList))
|
|
|
+ if (!GetResultData().GetSTDFileList(ref iNamePos, ref STDFileNameList))
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
@@ -1101,7 +1133,7 @@ namespace OTSMeasureApp
|
|
|
//设置STD 标准库文件名称
|
|
|
public bool SetSTDFileName(int iNamePos)
|
|
|
{
|
|
|
- if (!m_ResultData.ChangeSTDFromList(iNamePos))
|
|
|
+ if (!GetResultData().ChangeSTDFromList(iNamePos))
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
@@ -1112,7 +1144,7 @@ namespace OTSMeasureApp
|
|
|
public bool SaveWorkMeasureFile()
|
|
|
{
|
|
|
CSampleParamMgr SMeasureParamData = new CSampleParamMgr();
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
@@ -1158,7 +1190,7 @@ namespace OTSMeasureApp
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
@@ -1181,7 +1213,7 @@ namespace OTSMeasureApp
|
|
|
//判断是否允许修改样品名
|
|
|
public bool CheckSampleNameIsValid(string sNewName)
|
|
|
{
|
|
|
- return m_ResultData.IsValidSampleName(sNewName);
|
|
|
+ return GetResultData().IsValidSampleName(sNewName);
|
|
|
}
|
|
|
|
|
|
//设置电镜参数
|
|
@@ -1192,8 +1224,8 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- m_ResultData.GetWorkingSample().GetSEMDataMsr().SetWorkingDistance(iWDistance);
|
|
|
- m_ResultData.GetWorkingSample().GetSEMDataMsr().SetMagnification(dMagni);
|
|
|
+ GetResultData().GetWorkingSample().GetSEMDataMsr().SetWorkingDistance(iWDistance);
|
|
|
+ GetResultData().GetWorkingSample().GetSEMDataMsr().SetMagnification(dMagni);
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|
|
@@ -1201,7 +1233,7 @@ namespace OTSMeasureApp
|
|
|
}
|
|
|
public void SetFliedsCount(int FliedsCount)
|
|
|
{
|
|
|
- m_ResultData.GetWorkingSample().GetSEMDataMsr().SetTotalFields(FliedsCount);
|
|
|
+ GetResultData().GetWorkingSample().GetSEMDataMsr().SetTotalFields(FliedsCount);
|
|
|
}
|
|
|
//获取电镜参数
|
|
|
//int iScanFieldSize: Field扫描参数
|
|
@@ -1209,13 +1241,13 @@ namespace OTSMeasureApp
|
|
|
//double dMagni: 放大倍数
|
|
|
public void GetWorkingSampleSEMData(ref double iWDistance, ref double dMagni)
|
|
|
{
|
|
|
- iWDistance = m_ResultData.GetWorkingSample().GetSEMDataMsr().GetWorkingDistance();
|
|
|
- dMagni = m_ResultData.GetWorkingSample().GetSEMDataMsr().GetMagnification();
|
|
|
+ iWDistance = GetResultData().GetWorkingSample().GetSEMDataMsr().GetWorkingDistance();
|
|
|
+ dMagni = GetResultData().GetWorkingSample().GetSEMDataMsr().GetMagnification();
|
|
|
}
|
|
|
|
|
|
public int GetTotalFieldsCount()
|
|
|
{
|
|
|
- int icount = m_ResultData.GetWorkingSample().GetSEMDataMsr().GetTotalFields();
|
|
|
+ int icount = GetResultData().GetWorkingSample().GetSEMDataMsr().GetTotalFields();
|
|
|
return icount;
|
|
|
}
|
|
|
|
|
@@ -1224,7 +1256,7 @@ namespace OTSMeasureApp
|
|
|
//Rectangle Srect: 测量区域大小
|
|
|
public bool GetWSampleMrsArea(ref int iShape, ref Rectangle Srect)
|
|
|
{
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
@@ -1252,13 +1284,13 @@ namespace OTSMeasureApp
|
|
|
//当Samplelist中的链表有sample 的checkbox状态是选中状态,则返回TRUE. 说明可以测量
|
|
|
public bool GetSampleCheckBoxStatus()
|
|
|
{
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
List<COTSSample> SampleList = new List<COTSSample>();
|
|
|
- SampleList = m_ResultData.GetSampleList();
|
|
|
+ SampleList = GetResultData().GetSampleList();
|
|
|
int iCount = SampleList.Count();
|
|
|
if (0 == iCount)
|
|
|
{
|
|
@@ -1279,7 +1311,7 @@ namespace OTSMeasureApp
|
|
|
//获取BSE图像数据
|
|
|
public bool GetBSEImageSize(ref int iHeight, ref int iWidth)
|
|
|
{
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
@@ -1301,7 +1333,7 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return "";
|
|
@@ -1335,7 +1367,7 @@ namespace OTSMeasureApp
|
|
|
public bool GetMagAndDistance(ref double SemMag, ref double dDistance)
|
|
|
{
|
|
|
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
@@ -1362,10 +1394,10 @@ namespace OTSMeasureApp
|
|
|
|
|
|
|
|
|
//样品的标题名 (Treeview的根节点名)
|
|
|
- SMeasureInfo.sSampleSoluName = m_ResultData.GetFileName();
|
|
|
+ SMeasureInfo.sSampleSoluName = GetResultData().GetFileName();
|
|
|
|
|
|
// Treeview 的样品信息
|
|
|
- SMeasureInfo.TSampleParam.sSampleTitleName = m_ResultData.GetFileName();
|
|
|
+ SMeasureInfo.TSampleParam.sSampleTitleName = GetResultData().GetFileName();
|
|
|
|
|
|
//获得 样品属性值
|
|
|
|
|
@@ -1527,7 +1559,7 @@ namespace OTSMeasureApp
|
|
|
public bool SaveMeasureSampleInfo()
|
|
|
{
|
|
|
|
|
|
- if (!m_ResultData.Save())
|
|
|
+ if (!GetResultData().Save())
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
@@ -1537,7 +1569,7 @@ namespace OTSMeasureApp
|
|
|
//获取测量Sample的开始时间
|
|
|
public bool GetMsrSampleStartTime(ref DateTime MsrFieldStartTime)
|
|
|
{
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
@@ -1549,7 +1581,7 @@ namespace OTSMeasureApp
|
|
|
//获取测量已用时间
|
|
|
public bool GetMsrSampleUsedTime(ref TimeSpan TUsedTime)
|
|
|
{
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
@@ -1563,7 +1595,7 @@ namespace OTSMeasureApp
|
|
|
// 获取测量样品中之前已经测量完成Field帧图,(上一次未测量完成继续测试)
|
|
|
public bool GetBeforeCompleteField(ref string MsrSampleName, ref List<Point> FieldList)
|
|
|
{
|
|
|
- COTSSample WSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample WSample = GetResultData().GetWorkingSample();
|
|
|
if (null == WSample)
|
|
|
{
|
|
|
return false;
|
|
@@ -1585,14 +1617,14 @@ namespace OTSMeasureApp
|
|
|
public Rectangle CalculateMsrArea(string cHoleName)
|
|
|
{
|
|
|
CHole cHoleClr = null;
|
|
|
- foreach (CHole item in m_ResultData.GetStage().GetHoleList())
|
|
|
+ foreach (CHole item in GetResultData().GetStage().GetHoleList())
|
|
|
{
|
|
|
if (item.GetName() == cHoleName)
|
|
|
{
|
|
|
cHoleClr = item;
|
|
|
}
|
|
|
}
|
|
|
- CDomain CDomain = m_ResultData.CalculateMsrArea(cHoleClr);
|
|
|
+ CDomain CDomain = GetResultData().CalculateMsrArea(cHoleClr);
|
|
|
return (Rectangle)CDomain.GetRectDomain();
|
|
|
}
|
|
|
|
|
@@ -1604,9 +1636,9 @@ namespace OTSMeasureApp
|
|
|
public bool GetCompletedMeasureFileName(ref List<string> mrFilePathList)
|
|
|
{
|
|
|
//测量文件路径
|
|
|
- string proFilePath = m_ResultData.GetPathName();
|
|
|
+ string proFilePath = GetResultData().GetPathName();
|
|
|
//样品列表
|
|
|
- List<COTSSample> sampleList = m_ResultData.GetSampleList();
|
|
|
+ List<COTSSample> sampleList = GetResultData().GetSampleList();
|
|
|
//获取样品数量
|
|
|
int sampleCount = sampleList.Count;
|
|
|
string mrSuffix = ".rst";
|
|
@@ -1660,7 +1692,7 @@ namespace OTSMeasureApp
|
|
|
public bool GetWorkSampleMeasureStatus()
|
|
|
{
|
|
|
bool reuslt = false;
|
|
|
- COTSSample COTSSample = m_ResultData.GetWorkingSample();
|
|
|
+ COTSSample COTSSample = GetResultData().GetWorkingSample();
|
|
|
int sampleStatus = COTSSample.GetMsrStatus().GetCompletedFields();
|
|
|
if (sampleStatus > 0)
|
|
|
{
|