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.

59 lines
2.0 KiB
C++

#include "StdAfx.h"
#include "WorkDataMgr.h"
#include "GlobalFunction.h"
#include "MsgBox.h"
#include "Propertie.h"
#include "PropertieMgr.h"
#include "AuthorityMgr.h"
#include "PenParMgr.h"
CWorkDataMgr *gWorkDataMgr = new CWorkDataMgr;
CWorkDataMgr::CWorkDataMgr(void)
{
m_bTempMode = false;//模板模式,在这个模式下圆的数据为圆心,通过笔参数来查找模板
}
CWorkDataMgr::~CWorkDataMgr(void)
{
}
CMFCPropertyGridProperty *CWorkDataMgr::CreatGridProperty()
{
CString PropertyName;//属性名称
CString Description;//描述
CString Path = _T("WorkDataMgr");//存储路径
CString Name;
//-------------------------------------------------------------------------------//
PropertyName = _T("加工数据");
CMFCPropertyGridProperty* pGroup = new CMFCPropertyGridProperty(PropertyName);
//-------------------------------------------------------------------------------//
if(gAuthorityMgr->CheckAuthority(_Authority_Factory))
{
{
//添加属性变量映射
Name = _T("m_bTempMode");//变量名字
CPropertie *pPropertie = new CPropertie;
pPropertie->SetpVal((void*)&m_bTempMode);
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_bTempMode, Description);
pGroup->AddSubItem(p);
gDevicePropertieMgr.Insert(p, pPropertie);
}
}
//-------------------------------------------------------------------------------//
return pGroup;
}
//通过笔号来获取元件模板的数据
void CWorkDataMgr::GetTempDataByPenNum(vector<vector<Dbxy>> &DataVec,int PenNum)
{
}