| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 | #pragma oncenamespace OTSMODEL {	typedef enum class __declspec(dllexport) OTS_SAMPLE_PROP_GRID_ITEMS	{// we prepare 10 items for every group.so the first group starts from 0,the second starts from 10,and so on.	 //the item's value is contrast to the position exactly when it's display in the property grid.and the caption string is read from the resource file by the value too.		INVALID = -1,		MIN = 0,		GENERAL_GRP_MIN = 0,		SAMPLE_NAME = 0,		SAMPLE_HOLE_NAME = 1,		SWITCH = 2,		MEASURE_PARAM_FILE_NAME = 3,		STD_FILE_NAME = 4,		STEEL_TECHNOLOGY = 5,		ROCK_TYPE = 6,		GENERAL_GRP_MAX = 6,		IMAGE_GRP_MIN = 10,				START_MODE = 10,		STOP_MODE = 11,		STOP_PARAM_PARTICLE = 12,		STOP_PARAM_FIELD = 13,		STOP_PARAM_TIME = 14,		SCAN_SPEED = 15,		IMAGE_RESOLUTION = 16,		OVER_LAP = 17,		IMAGE_GRP_MAX = 17,		IMAGE_PROC_MIN = 20,		PARTICLE_AREA_MIN = 20,		PARTICLE_AREA_MAX = 21,		BG_GRAY_MIN = 22,		BG_GRAY_MAX = 23,		PARTICLE_GRAY_MIN = 24,		PARTICLE_GRAY_MAX = 25,		IMAGE_PROC_MAX = 26,		XRAY_MIN = 30,		SEARCH_RESOLUTION = 30,		LOW_COUNTS = 31,		ANALYSIS_RESOLUTION = 32,		SCAN_MODE = 33,		ANALYSIS_COUNTS = 34,		XRAY_STEP = 35,		XRAY_MAX = 35,		SEM_DATA_MIN = 40,		MAGNIFICATION = 40,		PIXEL_SIZE = 41,		WORKING_DISTANCE = 42,		TOTAL_FIELDS = 43,		TOTAL_TO_MEASURE_AREA = 44,		SEM_DATA_MAX = 44,		MEASURE_STATAU_MIN = 50,		MEASURE_STATAU = 50,		START_TIME = 51,		USED_TIME = 52,		FINISH_TIME = 53,		COMPLETED_FIELDS = 54,		MEASURE_STATAU_MAX = 55,		MEASURE_RESULT_MIM = 60,		RADIO = 60,		TOTAL_AREA = 61,		TOTAL_PARTICLE = 62,		TOTAL_PARTICLE_AREA = 63,		MEASURE_RESULT_MAX = 63,				MAX = 63	} OTS_SAMPLE_PROP_GRID_ITEMS;	typedef enum class __declspec(dllexport) OTS_RETORT_PROP_GRID_ITEMS	{		INVALID = -1,		MIN = 0,		DATA_SOURCE = 0,		DATA_SOURCE_TYPE = 1,		IMAGE_TYPE = 2,		IMAGE_DISPLAY_TYPE = 3,		MEASURE_DATA_TYPE = 4, 		CALCULATE_TABLE_TYPE = 5,		CALCULATE_CHART_TYPE = 6,		PARTICLE_TYPE = 7,		STD_ID = 8,		GRAIN_SIZE_CLASS_TABLE = 9,		GRAIN_SIZE_CLASS = 10,		GRAIN_SIZE_MIN = 11,		GRAIN_SIZE_MAX = 12,		SIZE_CAL_METHOD_TYPE = 13,		SIZE_GRID_CAL_METHOD_TYPE = 14,		TRIO_CHART_TYPE = 15,		ANALY_PARTICLE_TYPE = 16,		MAX = 16	}OTS_RETORT_PROP_GRID_ITEMS;	typedef enum class __declspec(dllexport) OTS_SAMPLE_PROP_GRID_ITEM_GROUPS	{		INVALID = -1,		MIN = 0,		GENERAL = 0,		IMAGE = 1,		IMAGE_PROCESS = 2,		XRAY = 3,		SEM = 4,		MEASURE_STATUS = 5,		MEASURE_RESULTS = 6,		MAX = 6	} OTS_SAMPLE_PROP_GRID_ITEM_GROUPS;	typedef enum class __declspec(dllexport) OTS_ITEM_TYPES	{		INVALID = -1,		MIN = 0,		BOOL = 0,		INT = 1,		DOUBLE = 2,		STRING = 3,		COMBO = 4,		TIME = 5,		TIME_SPAN = 6,		FILE_LIST = 7,		MAX = 7	} OTS_ITEM_TYPES;	class  __declspec(dllexport) CPropItem	{	public:		CPropItem();								// constructor		CPropItem(const CPropItem&);				// copy constructor		CPropItem(CPropItem*);						// copy constructor		CPropItem& operator=(const CPropItem&);		// =operator		virtual ~CPropItem();						// destructor		// set sample parameters		void SetSmplParameter(OTS_SAMPLE_PROP_GRID_ITEMS a_nSmplId, OTS_ITEM_TYPES a_nType, BOOL a_bReadOnly, BOOL a_bShow);		// set report parameter		void SetReportParameter(OTS_RETORT_PROP_GRID_ITEMS a_nId, OTS_ITEM_TYPES a_nType, BOOL a_bReadOnly);		// name		CString GetName() { return m_strName; }		void SetName(CString a_strName) { m_strName = a_strName; }		// description 		CString GetDescription() { return m_strDescription; }		void SetDescription(CString a_strDescription) { m_strDescription = a_strDescription; }		// sample item Id		OTS_SAMPLE_PROP_GRID_ITEMS GetSmplItemId() { return m_nSmplId; }		void SetSmplItemId(OTS_SAMPLE_PROP_GRID_ITEMS a_nSmplId) { m_nSmplId = a_nSmplId; }		// report item Id		OTS_RETORT_PROP_GRID_ITEMS GetReportItemId() { return m_nReportId; }		void SetReportItemId(OTS_RETORT_PROP_GRID_ITEMS a_nReportId) { m_nReportId = a_nReportId; }		CString GetItemValueStr();		// item type		OTS_ITEM_TYPES GetTypeId() { return m_nType; }		void SetTypeId(OTS_ITEM_TYPES a_nType) { m_nType = a_nType; }		// read only flag		BOOL IsReadOnly() { return m_bReadOnly; }		void SetReadOnly(BOOL a_bReadOnly) { m_bReadOnly = a_bReadOnly; }	protected:		// cleanup 		void Cleanup();		// initialization		void Init();		// duplication		void Duplicate(const CPropItem& a_oSource);		// name		CString m_strName;		// description 		CString m_strDescription;		// sample item Id		OTS_SAMPLE_PROP_GRID_ITEMS m_nSmplId;		// report item Id		OTS_RETORT_PROP_GRID_ITEMS m_nReportId;		// item type		OTS_ITEM_TYPES m_nType;		// read only flag		BOOL m_bReadOnly;		// show flag, this is used for interface to sure if this propetry should be show, it is controlled by C++ now.		BOOL m_bShow;	};	typedef std::shared_ptr<CPropItem>  __declspec(dllexport) CPropItemPtr;	typedef std::vector<CPropItemPtr>  __declspec(dllexport) CPropItemsList;	class  __declspec(dllexport) CPropItemGrp	{	public:		CPropItemGrp();											// constructor		CPropItemGrp(const CPropItemGrp&);						// copy constructor		CPropItemGrp(CPropItemGrp*);							// copy constructor		CPropItemGrp& operator=(const CPropItemGrp&);			// =operator		virtual ~CPropItemGrp();								// destructor		// group name 		CString GetName() { return m_strName; }		void SetName(CString a_strName) { m_strName = a_strName; }		// items group Id		OTS_SAMPLE_PROP_GRID_ITEM_GROUPS GetGroupId() { return m_nId; }		void SetGroupId(OTS_SAMPLE_PROP_GRID_ITEM_GROUPS a_nId) { m_nId = a_nId; }		// items list		CPropItemsList& GetItemsList() { return m_listPropItems; }		void SetItemsList(CPropItemsList& a_listPropItems);		void GetItemsIdRange(OTS_SAMPLE_PROP_GRID_ITEMS& a_nItemIdMin, OTS_SAMPLE_PROP_GRID_ITEMS& a_nItemIdMax);	protected:		// cleanup 		void Cleanup();		// initialization		void Init();		// duplication		void Duplicate(const CPropItemGrp& a_oSource);		// group name 		CString m_strName;		// group id		OTS_SAMPLE_PROP_GRID_ITEM_GROUPS m_nId;		// items list		CPropItemsList m_listPropItems;	};	typedef std::shared_ptr<CPropItemGrp>  __declspec(dllexport) CPropItemGrpPtr;	typedef std::vector<CPropItemGrpPtr>  __declspec(dllexport) CPropItemGrpsList;}
 |