📄 assistantappui.cpp
字号:
/* Copyright (c) 2008, Nokia. All rights reserved */
#include <f32file.h>
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include <ASSISTANT.mbg>
#include "ASSISTANT.pan"
#include "ASSISTANTAppUi.h"
#include "ASSISTANT.hrh"
#include "MainView.h"
#include "HelpView.h"
#include "LoginView.h"
#include "ServerManager.h"
#include "HTTPEngine.h"
#include "ProgressNoteTASAO.h"
#include "ASSISTANTApplication.h"
void CASSISTANTAppUi::ConstructL()
{
BaseConstructL(EAknEnableSkin);
m_pServerManager = CServerManager::NewL();
m_pLoginview = CLoginView::NewL();
AddViewL(m_pLoginview);
m_pMainview = CMainView::NewL();
m_pMainview->m_pServerManager = m_pServerManager;
AddViewL(m_pMainview);
m_pHelpview = CHelpView::NewL();
AddViewL(m_pHelpview);
m_pLoginview->SetLoginNotifyPointer(m_pServerManager);
m_pServerManager->SetServerReNotifyPointer(m_pLoginview);
}
CASSISTANTAppUi::CASSISTANTAppUi()
{
// add any construction that cannot leave here
}
CASSISTANTAppUi::~CASSISTANTAppUi()
{
MEMORY_FREE(m_pServerManager);
/* if (iAppView)
{
iEikonEnv->RemoveFromStack(iAppView);
delete iAppView;
iAppView = NULL;
}*/
}
void CASSISTANTAppUi::HandleCommandL(TInt aCommand)
{
switch(aCommand)
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case EASSISTANTCommand1:
{
_LIT(message,"Command 1");
CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
informationNote->ExecuteLD(message);
}
break;
default:
Panic(EASSISTANTBasicUi);
break;
}
}
CGulIcon* CASSISTANTAppUi::LoadGraphicsL(TInt aType)
{
TBuf<KMaxPath> pathAppMbm;
#ifdef __WINS__
pathAppMbm.Copy(_L("z:\\system\\apps\\ASSISTANT\\ASSISTANT.MBM"));
#else
this->GetPath(pathAppMbm);
pathAppMbm.Append(_L("ASSISTANT.MBM"));
#endif
switch(aType)
{
case 0:
return iEikonEnv->CreateIconL(pathAppMbm, EMbmAssistantAssistant_tick_i,EMbmAssistantAssistant_tick_m);
case 1:
return iEikonEnv->CreateIconL(pathAppMbm, EMbmAssistantAssistant_name_i, EMbmAssistantAssistant_name_m);
case 2:
return iEikonEnv->CreateIconL(pathAppMbm, EMbmAssistantAssistant_2player_i,EMbmAssistantAssistant_2player_m);
default:
return NULL;
}
}
void CASSISTANTAppUi::GetPath(TDes& aPath)
{
TFileName appFullName;
appFullName = Application()->AppFullName();
TParsePtr parse(appFullName);
aPath.Copy(parse.DriveAndPath());
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -