?? conslauncherappui.cpp
字號:
/* Copyright (c) 2003 Symbian Software Ltd. All rights reserved */
#include <uikon.hrh>
#include "ConsLauncherAppUi.h"
#include "ConsLauncherAppView.h"
#include "ConsLauncher.hrh"
#include <ConsLauncher.rsg>
#include <coemain.h>
#include "ConsLauncher.pan"
void CConsLauncherAppUi::ConstructL()
{
BaseConstructL();
iDirFspec = iEikonEnv->AllocReadResourceL(R_CONSLAUNCHER_DIR_FSPEC);
RFs& fs = iCoeEnv->FsSession();
CDir *DirList = NULL;
fs.GetDir(*iDirFspec,KEntryAttNormal,ESortNone,iFileList,DirList);
delete DirList;
iAppView = new(ELeave) CConsLauncherAppView;
iAppView->ConstructL(ClientRect(),iFileList);
AddToStackL(iAppView);
}
CConsLauncherAppUi::CConsLauncherAppUi()
{
// No implementation required
}
CConsLauncherAppUi::~CConsLauncherAppUi()
{
if (iAppView)
{
iEikonEnv->RemoveFromStack(iAppView);
delete iAppView;
iAppView = NULL;
}
delete iDirFspec;
delete iFileList;
}
void CConsLauncherAppUi::HandleCommandL(TInt aCommand)
{
switch(aCommand)
{
case EEikCmdExit:
Exit();
break;
case EConsLauncherCommand1:
{
// Run the selected .exe file
TInt i = iAppView->GetCurrentItem();
if (iFileList && (i<iFileList->Count()))
{
TPtrC name = (*iFileList)[i].iName;
RFs& fs = iCoeEnv->FsSession();
TParse fp;
fs.Parse(name, *iDirFspec,fp);
const TDesC& runExeDesC = fp.FullName();
TInt retval = iProcess.Create(runExeDesC, runExeDesC);
if (retval == KErrNone)
{
iProcess.Resume();
iProcess.Close();
break;
}
}
iEikonEnv->InfoMsg(R_CONSLAUNCHER_TEXT_RUNFAILED);
break;
}
default:
Panic(EConsLauncherUi);
break;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -