ProjMgrClr.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #pragma once
  2. #include "OTSProjMgrFile.h"
  3. #include "StageClr.h"
  4. #include "HoleBSEImgClr.h"
  5. #include "OTSSampleClr.h"
  6. #include "OTSImgScanPrmClr.h"
  7. #include "OTSImgProcPrmClr.h"
  8. #include "OTSXRayPrmClr.h"
  9. #include "GenParamClr.h"
  10. #include "SEMStageDataClr.h"
  11. namespace OTSINTERFACE {
  12. using namespace System;
  13. using namespace OTSMODEL;
  14. ref class COTSSampleClr;
  15. typedef System::Collections::Generic::List<COTSSampleClr^> COTSSamplesListClr;
  16. public ref class CProjMgrClr : public Object
  17. {
  18. public:
  19. CProjMgrClr(); // constructor
  20. CProjMgrClr(COTSProjMgrFile*); // copy constructor
  21. CProjMgrClr(COTSProjMgrFilePtr); // copy constructor
  22. ~CProjMgrClr();
  23. !CProjMgrClr();
  24. //get C++ pointer from C#
  25. COTSProjMgrFilePtr GetCProjMgrPtr();
  26. // file
  27. bool NewFile();
  28. bool Load();
  29. bool Save();
  30. bool SaveAs();
  31. bool IsValid();
  32. // SEM stage data
  33. CSEMStageDataClr^ GetSEMStageData();
  34. void SetSEMStageData(CSEMStageDataClr^ a_pSEMStageData);
  35. // stage
  36. CStageClr^ GetStage();
  37. void SetStage(CStageClr^ a_pStage);
  38. // samples list
  39. COTSSamplesListClr^ GetSampleList();
  40. bool SetSampleList(COTSSamplesListClr^ a_listSample, bool a_bClear);
  41. COTSSampleClr^ GetSampleByIndex(int a_nIndex);
  42. COTSSampleClr^ GetSampleByName(String^ a_strSampleName);
  43. COTSSampleClr^ AddSample(String^ a_strHoleName);
  44. bool DeleteSampleByIndex(int a_nIndex);
  45. bool DeleteSampleByName(String^ a_strSampleName);
  46. bool SameNameInList(String^ a_strSampleName, int a_nExclude);
  47. bool ResetSamplesListOrder(System::Collections::Generic::List<String^>^ a_listSampleNames);
  48. bool InsrtSample(COTSSampleClr^ a_pSample, int a_nIndex);
  49. bool ChangeSamplePosition(int a_nIndexFrom, int a_nIndexTo);
  50. bool MoveSamplePosition(COTSSampleClr^ a_pTargetSample, COTSSampleClr^ a_RefpSample, bool a_bBefore);
  51. bool MoveSamplePosition(String^ a_strTargetSampleName,String^ a_strRefSampleName, bool a_bBefore);
  52. // working sample
  53. COTSSampleClr^ GetWorkingSample();
  54. int GetWorkingSampleIndex();
  55. bool SetWorkingSampleByIndex(int a_nIndex);
  56. bool SetWorkingSampleByName(String^ a_pSampleName);
  57. bool DeleteWorkingSample();
  58. // Sample hole BSE image list
  59. CHoleBSEImgsListClr^ GetHoleBESImgList();
  60. bool SetHoleBESImgList(CHoleBSEImgsListClr^ a_listHoleBSEImg, bool a_bClear);
  61. // system std lib
  62. CSTDItemsListClr^ GetSysSTDItemList();
  63. bool SetSTDItemList(CSTDItemsListClr^ a_listSysSTDItem, bool a_bClear);
  64. // get general parameter
  65. CGenParamClr^ GetGenParam();
  66. // set general parameter
  67. void SetGenParam(CGenParamClr^ a_pGenParam);
  68. // get image scan parameter
  69. COTSImgScanPrmClr^ GetImageScanParam();
  70. // set image scan parameter
  71. void SetImageScanParam(COTSImgScanPrmClr^ a_pImageScanParam);
  72. // get image process parameter
  73. COTSImgProcPrmClr^ GetImageProcParam();
  74. // set image process parameter
  75. void SetImageProcParam(COTSImgProcPrmClr^ a_pImageProcParam);
  76. // get XRay parameter
  77. COTSXRayPrmClr^ GetXRayParam();
  78. // set XRay parameter
  79. void SetXRayParam(COTSXRayPrmClr^ a_pXRayParam);
  80. // get modify flag
  81. bool IsModified();
  82. // set modify flag
  83. void SetModify(bool a_bModify);
  84. // set path name
  85. String^ GetPathName();
  86. void SetPathName(String^ a_strPathName);
  87. // get the project file name
  88. String^ GetFileName();
  89. // check if the sName can be used a sample name
  90. bool IsValidSampleName(String^ a_sName);
  91. //get param file name
  92. bool GetParamFileList(int% a_nPos, System::Collections::Generic::List<String^>^% a_listSTDLibName);
  93. // change STD
  94. bool ChangeParamFromList(int a_nPos);
  95. // get STD file list
  96. bool GetSTDFileList(int% a_nPos, System::Collections::Generic::List<String^>^ % a_listSTDLibName);
  97. // change STD
  98. bool ChangeSTDFromList(int a_nPos);
  99. // get measured sample list
  100. bool GetMsredSampleList(COTSSamplesListClr^ % a_listMsredSample);
  101. // calculate measurement area
  102. CDomainClr^ CalculateMsrArea(CHoleClr^ a_pHole);
  103. // remove background
  104. bool RemoveBackGround(CBSEImgClr^ a_pImgIn, COTSImgProcPrmClr^ a_pImgProcessParam, CBSEImgClr^ % a_pImgOut);
  105. bool GetSystemSTDLib(int a_nPacketId);
  106. protected:
  107. COTSProjMgrFilePtr* m_LpProjMgr;
  108. };
  109. }