#pragma once #include "MsrParamsClr.h" #include "DomainClr.h" #include "SEMDataMsrClr.h" #include "MsrSampleStatusClr.h" #include "MsrResultsClr.h" #include "OTSSample.h" #include "PropItemClr.h" #include //#include "ProjMgrClr.h" namespace OTSCLRINTERFACE { using namespace System; using namespace OTSMODEL; //using namespace Newtonsoft::Json::Linq; ref class CProjMgrClr; typedef System::Collections::Generic::List CStringListClr; public ref class COTSSampleClr : public Object { public: COTSSampleClr(); // constructor COTSSampleClr(COTSSamplePtr); // copy constructor ~COTSSampleClr(); !COTSSampleClr(); //JObject^ GetJSONProperty(); COTSSamplePtr GetSamplePtr(); // name String^ GetName() { return gcnew String(theSample->get()->GetName()); } void SetName(String^ a_strName) { theSample->get()->SetName(CString(a_strName)); } // sample hole String^ GetSampleHoleName() { return gcnew String(theSample->get()->GetSampleHoleName ()); } void SetSampleHoleName(String^ a_strHoleName) { theSample->get()->SetSampleHoleName (CString(a_strHoleName)); } // param lock bool GetParamLock() { return theSample->get()->GetParamLock (); } void SetParamLock(bool a_bParamLock) { theSample->get()->SetParamLock (a_bParamLock); } // switch bool GetSwitch() { return theSample->get()->GetSwitch (); } void SetSwitch(bool a_bSwitch) { theSample->get()->SetSwitch (a_bSwitch); } // measurement parameter CMsrParamsClr^ GetMsrParams() { return gcnew CMsrParamsClr(theSample->get()->GetMsrParams()); } void SetMsrParams(CMsrParamsClr^ a_poMsrParams) { theSample->get()->SetMsrParams(a_poMsrParams->GetMsrParamsPtr()); } // measurement area CDomainClr^ GetMsrArea() { return gcnew CDomainClr(theSample->get()->GetMsrArea()); } void SetMsrArea(CDomainClr^ a_poMsrArea) { theSample->get()->SetMsrArea(a_poMsrArea->GetDomainPtr()); } // SEM data (measurement) CSEMDataMsrClr^ GetSEMDataMsr() { return gcnew CSEMDataMsrClr(theSample->get()->GetSEMDataMsr ()); } void SetSEMDataMsr(CSEMDataMsrClr^ a_poSEMDataMsr) { theSample->get()->SetSEMDataMsr(a_poSEMDataMsr->GetSEMDataMsrPtr()); } // measure status CMsrSampleStatusClr^ GetMsrStatus() { return gcnew CMsrSampleStatusClr(theSample->get()->GetMsrStatus()); } void SetMsrStatus(CMsrSampleStatusClr^ a_poMsrStatus) { theSample->get()->SetMsrStatus(a_poMsrStatus->GetMsrSampleStatusPtr()); } // measure results CMsrResultsClr^ GetMsrResults() { return gcnew CMsrResultsClr(theSample->get()->GetMsrResults()) ; } void SetMsrResults(CMsrResultsClr^ a_poMsrResults) { theSample->get()->SetMsrResults(a_poMsrResults->GetMsrResultsPtr()); } // has measure results test bool HasMeasureResult(); //设置属性组 // 输入:无 // 输出:设置结果,bool, true:设置成功,false:设置失败 //bool SetPropItemGrps(); //根据索引获取属性组 // 输入:int 索引值 // 输出:CPropItemGrpClr 返回属性组 //CPropItemGrpClr^ GetPropItemGrpByIndex(int a_nIndex); // ////根据属性组Id获取属性组 //// 输入:int, id值 //// 输出:CPropItemGrpClr 返回属性组 //CPropItemGrpClr^ GetPropItemGrpById(int a_nId); // ////更新相关联属性组 //// 输入:int, nId属性组id //// 输出:CPropItemGrpClr^ 返回属性组 //CPropItemGrpClr^ UpdatePropItemGrp(int a_nId); ////根据属性Id获取属性 //// 输入:int, 属性id //// 输出:CPropItemClr^ 返回的属性 //CPropItemClr^ GetPropItemById(int a_nId); // BOOL data (1) //获取bool类型的数值 // 输入:int :属性在属性组内id bool 返回的获取值 // 输出: 获取结果, bool, true:成功,false:失败 //bool GetPropBOOLData(int a_nId, bool% a_bValue); // ////设定属性值 //// 输入:int,属性id ;bool,需要设定的值 //// 输出:bool,设定结果,true,成功,false, 失败 //bool SetPropBOOLData(int a_nId, bool a_bValue); //// int data (16) ////获取int类型的数值 //// 输入:int :属性在属性组内id int 返回的获取值 //// 输出: 获取结果, bool, true:成功,false:失败 //bool GetPropIntData(int a_nId, int% a_nValue); // ////设定属性值 //// 输入:int,属性id ;int,需要设定的值 //// 输出:bool,设定结果,true,成功,false, 失败 //bool SetPropIntData(int a_nId, int a_nValue); //// double data (4) ////获取double类型的数值 //// 输入:int :属性在属性组内id double 返回的获取值 //// 输出: 获取结果, bool, true:成功,false:失败 //bool GetPropDoubleData(int a_nId, double% a_dValue); // ////设定属性值 //// 输入:int,属性id ;double,需要设定的值 //// 输出:bool,设定结果,true,成功,false, 失败 //bool SetPropDoubleData(int a_nId, double a_dValue); //// string data (7) ////获取string类型的数值 //// 输入:int :属性在属性组内id string 返回的获取值 //// 输出: 获取结果, bool, true:成功,false:失败 //bool GetPropStringData(int a_nId, String^% a_strValue); // ////设定属性值 //// 输入:int,属性id ;string,需要设定的值 //// 输出:bool,设定结果,true,成功,false, 失败 //bool SetPropStringData(int a_nId, String^ a_strValue); //// combo data (7) ////获取Combo类型的数值 //// 输入:int :属性在属性组内id Combo 返回的获取值 //// 输出: 获取结果, bool, true:成功,false:失败 //bool GetPropComboData(int a_nId, int% a_nValue); ////设定属性值 //// 输入:int,属性id ;string,需要设定的值 //// 输出:bool,设定结果,true,成功,false, 失败 //bool SetPropComboData(int a_nId, int a_nValue); // ////获取Combo字符串类型 //// 输入:int,属性id,List 返回的字符串 //// 输出:bool,设定结果,true,成功,false, 失败 //bool GetPropComboStrings(int a_nId, CStringListClr^% a_listComboStrings); //// time data (2) ////获取Time类型的数值 //// 输入:int :属性在属性组内id Time 返回的获取值 //// 输出: 获取结果, bool, true:成功,false:失败 //bool GetPropTimeData(int a_nId, DateTime^% a_oValue); ////设定属性值 //// 输入:int,属性id, DateTime,返回值 //// 输出:bool,设定结果,true,成功,false,失败 //bool SetPropTimeData(int a_nId, DateTime^ a_oValue); //// time span data (1) ////获取TimeSpan类型的数值 //// 输入:int :属性在属性组内id TimeSpan 返回的获取值 //// 输出: 获取结果, bool, true:成功,false:失败 //bool GetPropTimeSpanData(int a_nId, TimeSpan^% a_oValue); ////设定属性值 //// 输入:int,属性id, TimeSpan,返回值 //// 输出:bool,设定结果,true,成功,false,失败 //bool SetPropTimeSpanData(int a_nId, TimeSpan^ a_oValue); //// file list data (2) //bool GetPropFileListData(int a_nId, String^% a_strFileName); //bool SetPropFileListData(int a_nId, String^ a_strFileName); ////获取相关属性值 //// 输入:int,属性id, int,返回相关属性值 //// 输出:bool,设定结果,true,成功,false,失败 //// get related property item //bool GetRelatedPropItem(int a_nId, int% a_nRelatedPropId); ////获取相关属性组 //// 输入:int,属性id, int,返回相关属性组 //// 输出:bool,设定结果,true,成功,false,失败 //// get related property item group //bool GetRelatedPropItemGrp(int a_nId, int% a_nRelatedPropGrpId); bool GetBSESize(int% a_nWidth, int% a_nHeight); private: COTSSamplePtr* theSample; }; typedef System::Collections::Generic::List COTSSamplesListClr; }