MyCADInfo.cpp
上传用户:netltd
上传日期:2013-02-12
资源大小:7234k
文件大小:2k
- // MyCADInfo.cpp : implementation file
- //////////////////////////////////////////////////////////////////////////////////////////////
- // CCADInfo
- #include "stdafx.h"
- #include "MyCADInfo.h"
- //////////////////////////////////////////////////////////////////////////////////////////////
- CCADInfo::CCADInfo()
- {
- char pDir[_MAX_PATH];
- //获取当前路径
- ::GetCurrentDirectory(_MAX_PATH,pDir);
- //省缺的项目文件路径为当前路径
- ProjectPath = pDir;
- //省缺的图纸文件路径为当前路径
- FilePath = pDir;
- IsEmpty = TRUE;
- KindofNew = NEW_NONE;
- BackColor = RGB(255, 255, 255);
- //缺省画笔颜色
- PenColor = RGB(0, 0, 0);
- //缺省画笔线形
- LineStyle = PS_SOLID;
- }
- CCADInfo::~CCADInfo()
- {
- }
- //////////////////////////////////////////////////////////////////////////////////////////////
- //CFileInfo
- IMPLEMENT_SERIAL(CFileInfo, CObject, 1)
- CFileInfo::CFileInfo()
- {
- size.cx = 0;
- size.cy = 0;
- }
- CFileInfo::CFileInfo(const CFileInfo& Info)
- {
- Name = Info.Name;
- FileName = Info.FileName;
- FilePath = Info.FilePath;
- size.cx = Info.size.cx;
- size.cy = Info.size.cy;
- }
- CFileInfo::operator =(const CFileInfo& Info)
- {
- Name = Info.Name;
- FileName = Info.FileName;
- FilePath = Info.FilePath;
- size.cx = Info.size.cx;
- size.cy = Info.size.cy;
- }
- CFileInfo::~CFileInfo()
- {
- }
- void CFileInfo::Serialize(CArchive& ar)
- {
- if(ar.IsStoring())
- {
- ar << Name << FilePath << FileName << size;
- }
- else
- {
- ar >> Name >> FilePath >> FileName >> size;
- }
- }
- //////////////////////////////////////////////////////////////////////////////////////////////
- // CProjectInfo
- IMPLEMENT_SERIAL(CProjectInfo, CObject, 1)
- CProjectInfo::CProjectInfo()
- {
- //初始图纸数目为0
- FileNum = 0;
- }
- CProjectInfo::~CProjectInfo()
- {
- }