You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB
C++

#pragma once
#include "GlobalDefine.h"
#include "EnumPropertieType.h"
#include "PropertiesWnd.h"
#include "LabVecRang.h"
//前向声明
class CModule;
/*
1.用于管理所有全局模块类,协调模块之间的关系
2.为全局模块提供一个统一初始化的地方,统一在程序结束时释放资源
3.为全局模块提供属性的读取和保存,并在属性变化时通知对应模块
*/
class CModuleMgr
{
public:
CModuleMgr(void);
virtual ~CModuleMgr(void);
virtual void InsertModuleGridProperty(int CombType,CMFCPropertyGridCtrl &PropertyGrid){};
virtual void CModuleMgr::CreatAllModule(){};
void InitPar();
void Draw(CDC* pDC);
void ExportDevicePar(ofstream *pFile);
void SaveAllModuleProperty();
void SaveWorkFile(vector<CLab> &LabVec);
bool ReadWorkFile(CLabVecRang &LabVecRang);
void OnExitApp();
void OnDeviceInit();
protected:
void DeleteAllModule();
void AllModuleOnAppInitialize();
void PropertiesOnAppInitialize();
void CreatModuleDir();
void InsertPropertiesToWnd(set<MODULE> &Set,CPanePropertiesWnd &Wnd);
void InsertPropertiesToGrid(set<MODULE> &Set,CMFCPropertyGridCtrl &PropertyGrid);
protected:
vector<CModule*> m_ModuleVec;//存储所有mgr 对象的指针
};