📄 vapcommandline.cpp
字号:
/*
VaporCD CD-ROM Volume Emulation for Windows NT/2000
Copyright (C) 2000 Brad Johnson
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
http://vaporcd.sourceforge.net/
Brad Johnson
3305 2nd PL #222
Lubbock, TX 79415
*/
// VapCommandLine.cpp : implementation file
//
#include "stdafx.h"
#include "VapCommandLine.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CVapCommandLine
CVapCommandLine::CVapCommandLine()
{
m_iAction = None;
m_sFirst = "";
m_sSecond = "";
m_bPersist = FALSE;
m_bIgnore = FALSE;
}
CVapCommandLine::~CVapCommandLine()
{
}
void CVapCommandLine::ParseParam( LPCTSTR lpszParam, BOOL bFlag, BOOL bLast )
{
CString s = lpszParam;
s.MakeUpper();
// Unmount
if ((s == "U" || s == "UNMOUNT") && bFlag)
{
if (m_iAction != None)
m_iAction = Help;
else
m_iAction = Unmount;
}
if ((s == "M" || s == "MOUNT") && bFlag)
{
if (m_iAction != None)
m_iAction = Help;
else
m_iAction = Mount;
}
if ((s == "N" || s == "NEW") && bFlag)
{
if (m_iAction != None)
m_iAction = Help;
else
m_iAction = New;
}
if ((s == "I" || s == "IGNORE") && bFlag)
{
if (m_iAction != None)
m_iAction = Help;
else
m_bIgnore = TRUE;
}
if ((s == "P" || s == "PERSIST") && bFlag)
{
m_bPersist = TRUE;
}
if ((s == "H" || s == "?" || s == "HELP") && bFlag)
{
m_iAction = Help;
}
if (s == "UNINSTALL" && bFlag)
{
if (m_iAction != None)
m_iAction = Help;
else
m_iAction = Uninstall;
}
if (!bFlag)
{
if (m_sFirst == "")
{
m_sFirst = lpszParam;
}else
{
m_sSecond = lpszParam;
}
}
//CCommandLineInfo::ParseParam( lpszParam, bFlag, bLast );
}
/////////////////////////////////////////////////////////////////////////////
// CVapCommandLine message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -