123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- using OTSDataType;
- using OTSModelSharp.ResourceManage;
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Runtime.InteropServices;
- namespace OTSMeasureApp
- {
- ////内存大小
- //public enum MEMORY_SIZE
- //{
- // SAMPLE_NAME_SIZE = 20,
- // TIME_SIZE = 50
- //};
- ////BSE图类型
- //public enum BSEIMAGE_TYPE
- //{
- // BSEIMAGE = 0, //BSE图
- // BSEIMAGE_WITHOUT_BG = 1 //去背景BSE图
- //};
- //消息枚举
- //public enum MSG_TYPE
- //{
- // MTHREADSTATUS = 1001, //测量线程状态
- // MSAMPLESTATUS = 1002, //测量样品状态
- // MSAMPLERESULT = 1003 //测量结果
- //};
- // 测量线程状态
- //public enum RET_MEASURE_THREAD_STATUS
- //{
- // READY = 0,
- // INPROCESS = 1,
- // STOPPED = 2,
- // FAILED = 3,
- // COMPLETED = 4
- //};
- ////测量样品的状态
- //public enum RET_MEASURE_SAMPLE_STATUS
- //{
- // UNMEASURED = 0,
- // INPROCESS = 1,
- // STOPPED = 2,
- // FAILED = 3,
- // SUCCESSED = 4
- //};
- //样品测量结果
- //public enum MEASURE_SAMPLE_RESULT
- //{
- // BSE_DATA = 0, //BSE图数据
- // FIELD_DATA = 1, //FIELD 数据
- // START_MSR_FIELD = 2 //开始测试的幁图
- //};
- //[StructLayout(LayoutKind.Sequential)]
- //public struct STMrsSampleRetThreadMsg
- //{
-
- // [StructLayout(LayoutKind.Sequential)]
- // public struct STMTRethreadStatus
- // {
- // public RET_MEASURE_THREAD_STATUS iMThreadStatus;
- // [MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)MEMORY_SIZE.TIME_SIZE)]
- // public char[] cMsrStartTime; //MSR_START_TIME
- // [MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)MEMORY_SIZE.TIME_SIZE)]
- // public char[] cMsrEndTime; //MSR_END_TIME
- // };
- // [StructLayout(LayoutKind.Sequential)]
- // public struct STMRetSampleStatus
- // {
- // public RET_MEASURE_SAMPLE_STATUS iMeasureSampleStatus;
- // [MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)MEMORY_SIZE.SAMPLE_NAME_SIZE)]
- // public char[] cMsrSName;
- // };
- // [StructLayout(LayoutKind.Sequential)]
- // public struct STMSaResultData
- // {
- // public MEASURE_SAMPLE_RESULT iRetDataType; //ENUM_MEASURE_SAMPLE_RESULT
- // [StructLayout(LayoutKind.Sequential)]
- // public struct RETBSEData
- // {
- // public Point FieldPos;
- // public int iBSEDataHeight;
- // public int iBSEDataWidth;
- // public IntPtr pData;
- // };
- // [StructLayout(LayoutKind.Sequential)]
- // public struct RETFieldData
- // {
- // public Point FieldPos;
- // public int iMeasureFieldTotalCount;
- // public int iCompleteFieldCount;
- // public int iSParticleCount; // Sample particle count
- // };
- // [StructLayout(LayoutKind.Sequential)]
- // public struct StartToMsrField
- // {
- // public Point FieldPos;
- // };
- // public RETBSEData BSEData;
- // public RETFieldData SFieldata;
- // public StartToMsrField StartMsrField;
- // };
- // public Byte[] gbseData;//用于实时接收图片数据,以防止异步读取时,图片数据已被析构
- // public MSG_TYPE iMsgType;
- // public STMTRethreadStatus STMThreadStu;
- // public STMRetSampleStatus STMSampleStu;
- // public STMSaResultData STMSampleRetData;
- //};
- //MeasureApp 给 SoluWindow 发送添加样品的样品信息
- public class CTreeSampleParam
- {
- public string sSampleTitleName; //样品树显示的样品标题名称
- public string sWorkSampleName; // 工作样品名称
- public bool bSwitch; //样品执行开关
- public bool bParamLock; //样品测量参数锁
- };
- //MeasureApp 给SampleWindow窗口发送添加样品的样品孔名,测量区域信息
- public struct SampleMeasurePara
- {
- public string sSampleName;
- public string sHoleName;
- public int iShape; //测量区域形状
- public List<Point> PolygonPointRegion;//多边形点集合
- public List<PointF> PolygonPointRegionF;//多边形点集合
- public List<PointF> DrawPolygonPointRegionF;//多边形点集合
- public Rectangle MeasureRect; //测量区域大小
- };
- //MeasureApp 给SampleWindow窗口发送添加样品的样品孔名信息
- public struct SampleHolePara
- {
- public string sHoleName;
- public int iShape;
- //样品孔大小
- public Rectangle SampleHoleRect;
- };
- //样品属性数据
- public class SampleData
- {
- public OTS_SAMPLE_PROP_GRID_ITEMS iSampleId; //样品ID
- public String sSCaptionName; //样品标题名
- public OTS_ITEM_TYPES iSampleValType; //样品标题名对应值的类型
- public Object SampleVal; //样品标题名对应值,全部是string
- public List<String> comboDownList=new List<string>();//如果iSampleValType是combobox则在此处存储下拉列表
- //public int sampleValueIndex;//属性值对应的枚举列表中的索引值
- public bool bReadOnly; //值的类型
- public string sDescriptionInfo; //描述信息
- }
- public class SampleNodeMeaInfo //样品信息
- {
-
- public String sSampleName; //样品名称
- public bool bSwitch; //样品执行开关
- public List<SampleData> SampleDataList; //样品属性数据
- };
- public class SampleDataGroup //样品信息
- {
- public OTS_SAMPLE_PROP_GRID_ITEM_GROUPS GroupId;
- public String sTitle; //样品名称
-
- public List<SampleData> SampleDataList=new List<SampleData> (); //样品属性数据
- };
- public class OTSSamplePropertyInfo
- {
- const String General_Title = "通用参数组";
- const String Image_Title = "图像扫描参数组";
- const String Image_Process_Title = "图像处理参数组";
- const String XRay_Title = "X-Ray参数组";
- const String SemData_Title = "SEM数据参数组";
- const String MeasureStatu_Title = "测量状态参数组";
- const String MeasureRet_Title = "测量结果参数组";
- public List<SampleDataGroup> SampleDataGrps;
- //构造函数
- public OTSSamplePropertyInfo()
- {
- //st_SNodeMeaInfo = new SampleNodeMeaInfo();
- //st_SNodeMeaInfo.SampleDataList = new List<SampleData>();
- SMeasurePara = new SampleMeasurePara();
- SampleDataList = new List<SampleData>();
- TSampleParam = new CTreeSampleParam();
- //sGeneral_Title = "";
- //sImage_Title = "";
- //sImage_Process_Title = "";
- //sXRay_Title = "";
- //sSemData_Title = "";
- //sMeasureStatu_Title = "";
- //sMeasureRet_Title = "";
- SampleDataGrps = new List<SampleDataGroup>();
- }
- //样品属性数据
- public List<SampleData> SampleDataList;//保持一个所有条目列表,目的为了兼容以前的代码
- // public string sWorkSampleName; //当前工作样品名
-
- public void AddASampleDataGrp(SampleDataGroup g)
- {
- SampleDataGrps.Add(g);
- SampleDataList .AddRange(g.SampleDataList);//保持一个所有条目列表目的为了兼容以前的代码
- }
- public List<SampleDataGroup> GetSampleDataGroups()
- {
- return SampleDataGrps;
- }
- public String sSampleSoluName; //样品的标题名 (Treeview的根节点名)
- public bool bSwitch; //样品参数锁,默认都是false, 当执行测量完成后,设置为true,则客户不允许修改GRID等数据。
- //MeasureApp 给SampleWindow窗口发送添加样品的样品孔名,测量区域信息
- public SampleMeasurePara SMeasurePara;
- //public SampleNodeMeaInfo st_SNodeMeaInfo;
- public CTreeSampleParam TSampleParam;
- //Grid的显示组的标题名
- //public int iGeneral_Title_ID;
- //public String sGeneral_Title;
- //public int iImage_Title_ID;
- //public String sImage_Title;
- //public int iImage_Process_Title_ID;
- //public String sImage_Process_Title;
- //public int iXRay_Title_ID;
- //public String sXRay_Title;
- //public int iSemData_Title_ID;
- //public String sSemData_Title;
- //public int iMeasureStatu_Title_ID;
- //public String sMeasureStatu_Title;
- //public int iMeasureRet_Title_ID;
- //public String sMeasureRet_Title;
- };
- }
|