📄 projectzip6.cpp
字号:
// ProjectZip6.cpp: implementation of the CProjectZip6 class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ProjectZip6.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
enum { PZIP_OK, PZIP_CREATEFILE, PZIP_CANCELLED };
CProjectZip6::CProjectZip6(LPCTSTR szProjectFilePath, HWND hwndParent)
: CProjectZipBase(szProjectFilePath, hwndParent)
{
AddWorkspaceExtension("dsw");
AddProjectExtension("dsp");
AddOtherProjFileExtension("clw");
AddOtherProjFileExtension("ncb");
AddOtherProjFileExtension("opt");
}
CProjectZip6::~CProjectZip6()
{
}
BOOL CProjectZip6::GetNextFile(CStdioFile& fileProject, CString& sFilePath)
{
CString sLine;
sFilePath.Empty();
// read to start of next source
while (fileProject.ReadString(sLine) && sLine.Find("# Begin Source File") == -1);
// then read to actual file
while (fileProject.ReadString(sLine) && sLine.Find("SOURCE=") == -1);
// extract path to right of 'SOURCE='
int nFind = sLine.Find("SOURCE=");
if (nFind != -1)
{
sFilePath = sLine.Mid(nFind + lstrlen("SOURCE="));
// cleanup
sFilePath.Replace('\"', ' ');
sFilePath.TrimLeft();
sFilePath.TrimRight();
TRACE ("%s\n", sFilePath);
}
return !sFilePath.IsEmpty();
}
BOOL CProjectZip6::GetNextProjectFile(CStdioFile& fileWorkspace, CString& sFilePath)
{
CString sLine;
sFilePath.Empty();
// read to start of next source
while (fileWorkspace.ReadString(sLine) && sLine.Find("Project:") == -1);
// extract path to right of '"='
int nFind = sLine.Find("\"=");
if (nFind != -1)
{
sFilePath = sLine.Mid(nFind + lstrlen("\"="));
nFind = sFilePath.Find("- Package Owner");
if (nFind != -1)
sFilePath = sFilePath.Left(nFind - 1);
// cleanup
sFilePath.Replace('\"', ' ');
sFilePath.TrimLeft();
sFilePath.TrimRight();
TRACE ("%s\n", sFilePath);
}
return !sFilePath.IsEmpty();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -