#include "StdAfx.h" #include "TemplateMgr.h" #include "Layer.h" #include "Propertie.h" #include "PropertieMgr.h" #include "AuthorityMgr.h" #include "WorkFileLable.h" #include "WorkFileMgr.h" #include "LogMgr.h" #include "GlobalDrawMgr.h" #define MaxTempCnt 200 //可编辑模板的数量 #define NULL_IDX -1//判断无绑定模板的索引值 CTemplateMgr *gTemplateMgr = new CTemplateMgr; CTemplateMgr::CTemplateMgr(void) { m_bUseObjList = false;//是否使用对象列表 } CTemplateMgr::~CTemplateMgr(void) { } #if 1//复写module 的函数 CMFCPropertyGridProperty *CTemplateMgr::CreatGridProperty() { CPropertieMgr &PropertieMgr = gDrawPropertieMgr; CString PropertyName;//属性名称 CString Description;//描述 CString Path = _T("Template");//存储路径 CString Name; //-------------------------------------------------------------------------------// PropertyName = _T("模板设定"); CMFCPropertyGridProperty* pGroup = new CMFCPropertyGridProperty(PropertyName); //-------------------------------------------------------------------------------// { PropertyName = _T("对象列表"); if(gAuthorityMgr->CheckAuthority(_USER)) { //添加属性变量映射 Name = _T("m_bUseObjList");//变量名字 CPropertie *pPropertie = new CPropertie; pPropertie->SetpVal((void*)&m_bUseObjList); pPropertie->SetType(_PROP_TYPE_BOOL); pPropertie->SetpModule(this); pPropertie->SetPath(Path); pPropertie->SetName(Name); pPropertie->WriteRead(true);//读取保存的属性 //添加属性显示 PropertyName = _T("对象列表"); Description = _T("是否使用对象列表,使用后会影响刷新速度"); CMFCPropertyGridProperty* p = new CMFCPropertyGridProperty(PropertyName, (_variant_t)m_bUseObjList, Description); pGroup->AddSubItem(p); PropertieMgr.Insert(p, pPropertie); } } return pGroup; } void CTemplateMgr::ExportPar(ofstream *pFile) { (*pFile)<<"[模块] [CTemplateMgr]------------------------------------------------"<