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.

38 lines
1.3 KiB
C++

#pragma once
#include "module.h"
#include "Template.h"
#include "LabVecRang.h"
class CTemplateMgr :public CModule
{
public:
CTemplateMgr(void);
~CTemplateMgr(void);
virtual void OnAppInitialize();
virtual MODULE GetModuleType(){return _TEMPLATE_PROP;};
virtual CMFCPropertyGridProperty *CreatGridProperty();
virtual void WriteWorkFileExt(vector<CLab> &LabVec);
virtual void ReadWorkFile(CLabVecRang &LabVecRang);
virtual void Draw(CDC* pDC);
void BindCurTemp();
bool IsUseObjList(){return m_bUseObjList;};
bool IsbClearOldObj(){return m_bClearOldObj;};
void SetbClearOldObj(bool b){m_bClearOldObj = b;};
void EditTemp(int idx);
void SetTempRect(int idx,DbRect &rect,bool bCircle);
void ClearTempNull();
void BindNullTemp();
void CollectWorkData(int idx,vector<vector<Dbxy>> &vec);
CObjContainer &GetTemplateZeroObjContainer();
private:
vector<CTemplate> m_TempVec;//可编辑模板的容器
CTemplate m_TempNull;//一个空的模板
int m_CurTempIdx;//当前编辑模板的索引值(-1表示没有要编辑的模板)
bool m_bUseObjList;//是否使用对象列表
bool m_bClearOldObj;//读取文件时是否清除旧的obj 对象
};
extern CTemplateMgr *gTemplateMgr;