mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.5 KiB
79 lines
1.5 KiB
#include "stdafx.h"
|
|
#include "scripmap.h"
|
|
|
|
CScriptMap::CScriptMap ( LPCTSTR pchFileExtension, LPCTSTR pchScriptMap, BOOL bExistingEntry)
|
|
{
|
|
|
|
m_strScriptMap = pchScriptMap;
|
|
|
|
if (bExistingEntry) {
|
|
m_strPrevFileExtension = pchFileExtension;
|
|
m_strFileExtension = pchFileExtension;
|
|
}
|
|
else {
|
|
m_strPrevFileExtension= _T("");
|
|
SetFileExtension(pchFileExtension);
|
|
}
|
|
|
|
}
|
|
|
|
CScriptMap::~CScriptMap()
|
|
{
|
|
}
|
|
|
|
void CScriptMap::SetScriptMap(LPCTSTR pchScriptMap)
|
|
{
|
|
m_strScriptMap = pchScriptMap;
|
|
}
|
|
|
|
LPCTSTR CScriptMap::GetScriptMap()
|
|
{
|
|
return (m_strScriptMap);
|
|
}
|
|
|
|
void CScriptMap::SetFileExtension(LPCTSTR pchFileExtension)
|
|
{
|
|
CString strTempFileExtension = pchFileExtension;
|
|
CheckDot(strTempFileExtension);
|
|
m_strFileExtension = strTempFileExtension;
|
|
}
|
|
|
|
LPCTSTR CScriptMap::GetFileExtension()
|
|
{
|
|
return(m_strFileExtension);
|
|
}
|
|
|
|
LPCTSTR CScriptMap::GetPrevFileExtension()
|
|
{
|
|
return(m_strPrevFileExtension);
|
|
}
|
|
|
|
void CScriptMap::SetPrevFileExtension()
|
|
{
|
|
m_strPrevFileExtension = m_strFileExtension;
|
|
}
|
|
|
|
BOOL CScriptMap::PrevScriptMapExists()
|
|
{
|
|
return (m_strPrevFileExtension != _T(""));
|
|
}
|
|
|
|
LPCTSTR CScriptMap::GetDisplayString()
|
|
{
|
|
m_strDisplayString = m_strFileExtension;
|
|
m_strDisplayString += _T("\t");
|
|
m_strDisplayString += m_strScriptMap;
|
|
return (m_strDisplayString);
|
|
}
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
// Private functions
|
|
|
|
void CScriptMap::CheckDot(CString &strFileExtension)
|
|
{
|
|
if (strFileExtension.Left(1) != _T(".")) {
|
|
CString strTemp = _T(".") + strFileExtension;
|
|
strFileExtension = strTemp;
|
|
}
|
|
}
|