OTSSampleMeasureInfo.cs 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. using OTSDataType;
  2. using OTSModelSharp.ResourceManage;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Drawing;
  6. using System.Runtime.InteropServices;
  7. namespace OTSMeasureApp
  8. {
  9. ////内存大小
  10. //public enum MEMORY_SIZE
  11. //{
  12. // SAMPLE_NAME_SIZE = 20,
  13. // TIME_SIZE = 50
  14. //};
  15. ////BSE图类型
  16. //public enum BSEIMAGE_TYPE
  17. //{
  18. // BSEIMAGE = 0, //BSE图
  19. // BSEIMAGE_WITHOUT_BG = 1 //去背景BSE图
  20. //};
  21. //消息枚举
  22. //public enum MSG_TYPE
  23. //{
  24. // MTHREADSTATUS = 1001, //测量线程状态
  25. // MSAMPLESTATUS = 1002, //测量样品状态
  26. // MSAMPLERESULT = 1003 //测量结果
  27. //};
  28. // 测量线程状态
  29. //public enum RET_MEASURE_THREAD_STATUS
  30. //{
  31. // READY = 0,
  32. // INPROCESS = 1,
  33. // STOPPED = 2,
  34. // FAILED = 3,
  35. // COMPLETED = 4
  36. //};
  37. ////测量样品的状态
  38. //public enum RET_MEASURE_SAMPLE_STATUS
  39. //{
  40. // UNMEASURED = 0,
  41. // INPROCESS = 1,
  42. // STOPPED = 2,
  43. // FAILED = 3,
  44. // SUCCESSED = 4
  45. //};
  46. //样品测量结果
  47. //public enum MEASURE_SAMPLE_RESULT
  48. //{
  49. // BSE_DATA = 0, //BSE图数据
  50. // FIELD_DATA = 1, //FIELD 数据
  51. // START_MSR_FIELD = 2 //开始测试的幁图
  52. //};
  53. //[StructLayout(LayoutKind.Sequential)]
  54. //public struct STMrsSampleRetThreadMsg
  55. //{
  56. // [StructLayout(LayoutKind.Sequential)]
  57. // public struct STMTRethreadStatus
  58. // {
  59. // public RET_MEASURE_THREAD_STATUS iMThreadStatus;
  60. // [MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)MEMORY_SIZE.TIME_SIZE)]
  61. // public char[] cMsrStartTime; //MSR_START_TIME
  62. // [MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)MEMORY_SIZE.TIME_SIZE)]
  63. // public char[] cMsrEndTime; //MSR_END_TIME
  64. // };
  65. // [StructLayout(LayoutKind.Sequential)]
  66. // public struct STMRetSampleStatus
  67. // {
  68. // public RET_MEASURE_SAMPLE_STATUS iMeasureSampleStatus;
  69. // [MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)MEMORY_SIZE.SAMPLE_NAME_SIZE)]
  70. // public char[] cMsrSName;
  71. // };
  72. // [StructLayout(LayoutKind.Sequential)]
  73. // public struct STMSaResultData
  74. // {
  75. // public MEASURE_SAMPLE_RESULT iRetDataType; //ENUM_MEASURE_SAMPLE_RESULT
  76. // [StructLayout(LayoutKind.Sequential)]
  77. // public struct RETBSEData
  78. // {
  79. // public Point FieldPos;
  80. // public int iBSEDataHeight;
  81. // public int iBSEDataWidth;
  82. // public IntPtr pData;
  83. // };
  84. // [StructLayout(LayoutKind.Sequential)]
  85. // public struct RETFieldData
  86. // {
  87. // public Point FieldPos;
  88. // public int iMeasureFieldTotalCount;
  89. // public int iCompleteFieldCount;
  90. // public int iSParticleCount; // Sample particle count
  91. // };
  92. // [StructLayout(LayoutKind.Sequential)]
  93. // public struct StartToMsrField
  94. // {
  95. // public Point FieldPos;
  96. // };
  97. // public RETBSEData BSEData;
  98. // public RETFieldData SFieldata;
  99. // public StartToMsrField StartMsrField;
  100. // };
  101. // public Byte[] gbseData;//用于实时接收图片数据,以防止异步读取时,图片数据已被析构
  102. // public MSG_TYPE iMsgType;
  103. // public STMTRethreadStatus STMThreadStu;
  104. // public STMRetSampleStatus STMSampleStu;
  105. // public STMSaResultData STMSampleRetData;
  106. //};
  107. //MeasureApp 给 SoluWindow 发送添加样品的样品信息
  108. public class CTreeSampleParam
  109. {
  110. public string sSampleTitleName; //样品树显示的样品标题名称
  111. public string sWorkSampleName; // 工作样品名称
  112. public bool bSwitch; //样品执行开关
  113. public bool bParamLock; //样品测量参数锁
  114. };
  115. //MeasureApp 给SampleWindow窗口发送添加样品的样品孔名,测量区域信息
  116. public struct SampleMeasurePara
  117. {
  118. public string sSampleName;
  119. public string sHoleName;
  120. public int iShape; //测量区域形状
  121. public List<Point> PolygonPointRegion;//多边形点集合
  122. public List<PointF> PolygonPointRegionF;//多边形点集合
  123. public List<PointF> DrawPolygonPointRegionF;//多边形点集合
  124. public Rectangle MeasureRect; //测量区域大小
  125. };
  126. //MeasureApp 给SampleWindow窗口发送添加样品的样品孔名信息
  127. public struct SampleHolePara
  128. {
  129. public string sHoleName;
  130. public int iShape;
  131. //样品孔大小
  132. public Rectangle SampleHoleRect;
  133. };
  134. //样品属性数据
  135. public class SampleData
  136. {
  137. public OTS_SAMPLE_PROP_GRID_ITEMS iSampleId; //样品ID
  138. public String sSCaptionName; //样品标题名
  139. public OTS_ITEM_TYPES iSampleValType; //样品标题名对应值的类型
  140. public Object SampleVal; //样品标题名对应值,全部是string
  141. public List<String> comboDownList=new List<string>();//如果iSampleValType是combobox则在此处存储下拉列表
  142. //public int sampleValueIndex;//属性值对应的枚举列表中的索引值
  143. public bool bReadOnly; //值的类型
  144. public string sDescriptionInfo; //描述信息
  145. }
  146. public class SampleNodeMeaInfo //样品信息
  147. {
  148. public String sSampleName; //样品名称
  149. public bool bSwitch; //样品执行开关
  150. public List<SampleData> SampleDataList; //样品属性数据
  151. };
  152. public class SampleDataGroup //样品信息
  153. {
  154. public OTS_SAMPLE_PROP_GRID_ITEM_GROUPS GroupId;
  155. public String sTitle; //样品名称
  156. public List<SampleData> SampleDataList=new List<SampleData> (); //样品属性数据
  157. };
  158. public class OTSSamplePropertyInfo
  159. {
  160. const String General_Title = "通用参数组";
  161. const String Image_Title = "图像扫描参数组";
  162. const String Image_Process_Title = "图像处理参数组";
  163. const String XRay_Title = "X-Ray参数组";
  164. const String SemData_Title = "SEM数据参数组";
  165. const String MeasureStatu_Title = "测量状态参数组";
  166. const String MeasureRet_Title = "测量结果参数组";
  167. public List<SampleDataGroup> SampleDataGrps;
  168. //构造函数
  169. public OTSSamplePropertyInfo()
  170. {
  171. //st_SNodeMeaInfo = new SampleNodeMeaInfo();
  172. //st_SNodeMeaInfo.SampleDataList = new List<SampleData>();
  173. SMeasurePara = new SampleMeasurePara();
  174. SampleDataList = new List<SampleData>();
  175. TSampleParam = new CTreeSampleParam();
  176. //sGeneral_Title = "";
  177. //sImage_Title = "";
  178. //sImage_Process_Title = "";
  179. //sXRay_Title = "";
  180. //sSemData_Title = "";
  181. //sMeasureStatu_Title = "";
  182. //sMeasureRet_Title = "";
  183. SampleDataGrps = new List<SampleDataGroup>();
  184. }
  185. //样品属性数据
  186. public List<SampleData> SampleDataList;//保持一个所有条目列表,目的为了兼容以前的代码
  187. // public string sWorkSampleName; //当前工作样品名
  188. public void AddASampleDataGrp(SampleDataGroup g)
  189. {
  190. SampleDataGrps.Add(g);
  191. SampleDataList .AddRange(g.SampleDataList);//保持一个所有条目列表目的为了兼容以前的代码
  192. }
  193. public List<SampleDataGroup> GetSampleDataGroups()
  194. {
  195. return SampleDataGrps;
  196. }
  197. public String sSampleSoluName; //样品的标题名 (Treeview的根节点名)
  198. public bool bSwitch; //样品参数锁,默认都是false, 当执行测量完成后,设置为true,则客户不允许修改GRID等数据。
  199. //MeasureApp 给SampleWindow窗口发送添加样品的样品孔名,测量区域信息
  200. public SampleMeasurePara SMeasurePara;
  201. //public SampleNodeMeaInfo st_SNodeMeaInfo;
  202. public CTreeSampleParam TSampleParam;
  203. //Grid的显示组的标题名
  204. //public int iGeneral_Title_ID;
  205. //public String sGeneral_Title;
  206. //public int iImage_Title_ID;
  207. //public String sImage_Title;
  208. //public int iImage_Process_Title_ID;
  209. //public String sImage_Process_Title;
  210. //public int iXRay_Title_ID;
  211. //public String sXRay_Title;
  212. //public int iSemData_Title_ID;
  213. //public String sSemData_Title;
  214. //public int iMeasureStatu_Title_ID;
  215. //public String sMeasureStatu_Title;
  216. //public int iMeasureRet_Title_ID;
  217. //public String sMeasureRet_Title;
  218. };
  219. }