本文整理汇总了C++中CAknMessageQueryDialog::RunLD方法的典型用法代码示例。如果您正苦于以下问题:C++ CAknMessageQueryDialog::RunLD方法的具体用法?C++ CAknMessageQueryDialog::RunLD怎么用?C++ CAknMessageQueryDialog::RunLD使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAknMessageQueryDialog
的用法示例。
在下文中一共展示了CAknMessageQueryDialog::RunLD方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleCommandL
//.........这里部分代码省略.........
#ifndef __S60V3__
// FIXME3RD
#ifndef __WINS__
# ifndef __S60V2__
auto_ptr<CDorisBrowserInterface> ido(CDorisBrowserInterface::NewL());
ido->AppendL(CDorisBrowserInterface::EOpenURL_STRING, url);
ido->ExecuteL();
# else
HBufC8* addr8=HBufC8::NewLC(url.Length());
TPtr8 addrp=addr8->Des();
CC()->ConvertFromUnicode(addrp, url);
TUid KUidOperaBrowserUid = {0x101F4DED};
TUid KUidOperaRenderViewUid = {0};
TVwsViewId viewId(KUidOperaBrowserUid, KUidOperaRenderViewUid);
CVwsSessionWrapper* vws;
vws=CVwsSessionWrapper::NewLC();
vws->ActivateView(viewId, KUidOperaRenderViewUid, *addr8);
CleanupStack::PopAndDestroy(2);
# endif
#endif
#endif
break;
}
case EContextContactsCmdDelete:
{
//note: this isn't the behaviour of original contact app
TInt idx = iContainer->get_current_item_idx();
TInt id = iItem->PbkFieldAt(idx).PbkFieldId();
TPbkContactItemField * field = iItem->FindField(id, idx);
TInt length = field->Label().Length() + field->Text().Length() + 10;
HBufC * header = CEikonEnv::Static()->AllocReadResourceL(R_DELETE);
CleanupStack::PushL(header);
HBufC * message= HBufC::NewL(length);
CleanupStack::PushL(message);
message->Des().Append(field->Label());
message->Des().Append(_L(" ("));
message->Des().Append(field->Text());
message->Des().Append(_L(") ?"));
CAknMessageQueryDialog * dlg = CAknMessageQueryDialog::NewL(*message);
CleanupStack::PushL(dlg);
dlg->PrepareLC(R_CONFIRMATION_QUERY);
dlg->QueryHeading()->SetTextL(*header);
CleanupStack::Pop(dlg);
if ( dlg->RunLD() )
{
CPbkContactItem * temp_item = pbkengine->OpenContactLCX(iViewState->FocusedContactId());
temp_item->RemoveField(iContainer->get_current_item_idx());
pbkengine->CommitContactL(*temp_item);
CleanupStack::PopAndDestroy(2);
}
CleanupStack::PopAndDestroy(2); //header, message
Refresh();
break;
}
#ifdef __S60V3__
case EContextContactsMenuMsgCurrent:
case EContextContactsMenuMsg:
{
HandleCreateMessageL();
}
break;
#endif
default:
{
#ifndef __S60V3__
//FIXME3RD
if (!iSendAppUi->CommandIsValidL(aCommand, TSendingCapabilities(0, 0, TSendingCapabilities::EAllMTMs)))
#endif
{
AppUi()->HandleCommandL( aCommand );
}
#ifndef __S60V3__
else
{
TUid mtm = iSendAppUi->MtmForCommand(aCommand);
CArrayFixFlat<TInt> * c = new CArrayFixFlat<TInt>(1);
CleanupStack::PushL(c);
c->AppendL(iViewState->FocusedContactId());
aPhoneHelper.send_as( mtm, c);
CleanupStack::PopAndDestroy(1); // c
}
#endif
break;
}
}
}
示例2: EditItemL
void CTTGPSLoggerPositioningMethod::EditItemL(TBool aCalledFromMenu) // edit text
{
CDesC16ArrayFlat *itemArray = new (ELeave) CDesC16ArrayFlat(20);
CDesC16ArrayFlat *itemArrayDetails = new (ELeave) CDesC16ArrayFlat(20);
CleanupStack::PushL(itemArray); // in case the appends leave
CleanupStack::PushL(itemArrayDetails); // in case the appends leave
RPositionServer iPositionServer;
RPositioner iPositioner;
User::LeaveIfError(iPositionServer.Connect());
User::LeaveIfError(iPositioner.Open(iPositionServer));
itemArray->AppendL(_L("(Info on all modules)"));
itemArray->AppendL(_L("(Default)"));
TUint aModules = 0;
TInt defaultModule=-1;
// Get the available numbers of modules
User::LeaveIfError(iPositionServer.GetNumModules(aModules));
TPositionModuleInfo info;
TPositionModuleId aModuleId;
iPositionServer.GetDefaultModuleId(aModuleId);
// Prepare itemArray and itemArrayDetails
for(TUint i = 0; i < aModules; i++)
{
if ((iPositionServer.GetModuleInfoByIndex(i,info) == KErrNone) && (info.IsAvailable()))
{
TBuf<200> smallBuffer;
smallBuffer.Zero();
info.GetModuleName(smallBuffer);
itemArray->AppendL(smallBuffer);
TBuf<200> buffer;
buffer.Zero();
info.GetModuleName(buffer);
buffer.Append(_L(" ("));
if (info.DeviceLocation() & TPositionModuleInfo::EDeviceExternal)
buffer.Append(_L("External "));
if (info.DeviceLocation() & TPositionModuleInfo::EDeviceInternal)
buffer.Append(_L("Internal "));
if (info.DeviceLocation() & TPositionModuleInfo::EDeviceUnknown)
buffer.Append(_L("Unknown "));
if (info.TechnologyType()& TPositionModuleInfo::ETechnologyAssisted)
buffer.Append(_L("Assisted "));
if (info.TechnologyType()& TPositionModuleInfo::ETechnologyTerminal)
buffer.Append(_L("GPS, "));
if (info.TechnologyType()& TPositionModuleInfo::ETechnologyNetwork)
buffer.Append(_L("Network, "));
if (info.TechnologyType()& TPositionModuleInfo::ETechnologyUnknown)
buffer.Append(_L("Unknown tech, "));
if (buffer.Mid(buffer.Length()-2, 2).Compare( _L(", ")) == KErrNone)
buffer.Replace(buffer.Length()-2, 2, _L(")"));
if (buffer.Mid(buffer.Length()-1, 1).Compare( _L(" ")) == KErrNone)
buffer.Replace(buffer.Length()-1, 1, _L(")"));
if ( info.ModuleId() == aModuleId)
{
buffer.Append(_L(" [Default]"));
defaultModule=i;
}
itemArrayDetails->AppendL(buffer);
}
}
iPositioner.Close();
iPositionServer.Close();
// Present list of positioning methods
TInt selectIndex;
selectIndex=iPosMethod+1;
HBufC* title = NULL;
title = CEikonEnv::Static()->AllocReadResourceLC(R_TTGP_TBUF32_DIALOG_POSITIONING_TITLE); // Select positioning method:
CAknListQueryDialog* dialog = new (ELeave) CAknListQueryDialog(&selectIndex);
dialog->PrepareLC(R_TTGP_DIALOG_LISTQUERY);
dialog->QueryHeading()->SetTextL(*title);
dialog->SetItemTextArray(itemArray);
dialog->SetOwnershipType(ELbmDoesNotOwnItemArray);
TInt answer = dialog->RunLD();
CleanupStack::PopAndDestroy(); // title
// Check answer
if (answer)
{
if (selectIndex==0) // (Info on all modules)
{
TBuf<1000> aText;
aText.Zero();
for (TInt i=0;i<itemArrayDetails->Count();i++)
{
aText.AppendFormat(_L("%d. "), i+1);
aText.Append(itemArrayDetails->MdcaPoint(i));
if (i<itemArrayDetails->Count()-1)
aText.Append(_L("\n"));
}
HBufC* title = CEikonEnv::Static()->AllocReadResourceLC(R_TTGP_TBUF32_AVAILABLEPOSITIONING_TITLE); // Available modules:
CAknMessageQueryDialog* dialog = new (ELeave) CAknMessageQueryDialog();
CleanupStack::PushL(dialog);
dialog->PrepareLC(R_TTGP_DIALOG_MESSAGEQUERY_OK);
dialog->QueryHeading()->SetTextL(*title);
dialog->SetMessageTextL(aText);
CleanupStack::Pop(); // dialog
dialog->RunLD();
CleanupStack::PopAndDestroy(); // title
}
//.........这里部分代码省略.........
示例3: HandleCommandL
void CTraceContainer::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case EAppHelpBack:
{
delete iMyHelpContainer;
iMyHelpContainer = NULL;
}
SetMenuL();
DrawNow();
break;
case EAppHelp:
{
delete iMyHelpContainer;
iMyHelpContainer = NULL;
iMyHelpContainer = CMyHelpContainer::NewL();
}
SetMenuL();
DrawNow();
break;
case EItemInfo:
{
/* RExampleServerClient CrashClient;
CrashClient.Connect();
TExampleItem ItemBuffer;
TFileName Bufferrr;
TInt ItemCount(0);
CrashClient.GetItemCount(ItemCount);
for(TInt i=0; i < ItemCount; i++)
{
ItemBuffer.iIndex = i;
CrashClient.GetItemL(ItemBuffer);
AddItemListL(ItemBuffer);
}
if(!iServerIsOn)
{
CrashClient.ShutServerDownNow();
}
CrashClient.Close();*/
}
/* if(iSelectionBox)
{
TInt CurrInd = iSelectionBox->CurrentItemIndex();
if(CurrInd >= 0 && CurrInd <= iArray.Count())
{
if(iArray[CurrInd])
{
HBufC* Informmm = HBufC::NewLC(3000);
TPtr Pointter(Informmm->Des());
GetInfoBufferL(*iArray[CurrInd],Pointter);
TPtr NewPointter(Informmm->Des());
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(NewPointter);
dlg->PrepareLC(R_ABOUT_HEADING_PANE);
dlg->SetHeaderTextL(KTraceApplicationName);
dlg->RunLD();
CleanupStack::PopAndDestroy(Informmm);
}
}
}*/
break;
case ESettingsMe:
{
iProfileSettings = new(ELeave)CProfileSettings();
iProfileSettings->ConstructL();
}
SetMenuL();
DrawNow();
break;
case ESettingsOk:
{
if(iProfileSettings)
{
iProfileSettings->SaveValuesL();
// if(iServerIsOn)
{
RExampleServerClient CrashClient;
CrashClient.Connect();
CrashClient.ReReadSettings();
CrashClient.Close();
}
}
delete iProfileSettings;
iProfileSettings = NULL;
}
SetMenuL();
DrawNow();
break;
//.........这里部分代码省略.........
示例4: HandleCommandL
// ----------------------------------------------------
// CMobileOfficeAppUi::HandleCommandL(TInt aCommand)
// takes care of command handling
// ----------------------------------------------------
//
void CMobileOfficeAppUi::HandleCommandL(TInt aCommand)
{
CheckDemo();
switch ( aCommand )
{
case EAknSoftkeyExit:
case EEikCmdExit:
{
if (iDoorObserver)
iDoorObserver->NotifyExit( MApaEmbeddedDocObserver::ENoChanges );
#ifndef FREEVERSION
licMan.End();
#endif
Exit();
break;
}
case EMobileOfficeCmdAppAbout:
{
HBufC* messageText = StringLoader::LoadLC( R_MOBILESEARCH_ABOUT );
/*
TBuf<500> nein;
nein.Copy(*messageText);
nein.Append(_L("\r\n"));
nein.Append(_L("\r\n"));
nein.Append(_L("Application: 1.1"));
nein.Append(_L("\r\n"));
*/
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( *messageText );
dlg->PrepareLC(R_MESSAGE_QUERY);
HBufC* aboutTitleText = StringLoader::LoadLC( R_MOBILESEARCH_ABOUTTITLE );
dlg->QueryHeading()->SetTextL( *aboutTitleText );
CleanupStack::PopAndDestroy( aboutTitleText );
dlg->RunLD();
CleanupStack::PopAndDestroy( messageText );
break;
}
case EMobileOfficeCmdOpen:
{
TUid viewID = KEditorViewViewId;
ActivateLocalViewL(viewID);
//SendFileL(iOpenDocument->Filename());
break;
}
case EMobileOfficeCmdList:
{
TUid viewID = KViewId;
ActivateLocalViewL(viewID);
break;
}
case EMobileOfficeCmdProp:
{
TUid viewID = KView2Id;
ActivateLocalViewL(viewID);
break;
}
#ifndef FREEVERSION
case EMobileOfficeCmdRegister:
{
Register();
break;
}
#endif
case EMobileOfficeCmdPicture:
{
TUid viewID = KViewImageViewId;
ActivateLocalViewL(viewID);
break;
}
case EMobileOfficeCmdNewText:
{
TUid viewID = KEditorViewViewId;
OpenDocument()->SetNextViewID(viewID);
OpenDocument()->SetEditable(ETrue);
ActivateLocalViewL(viewID);
break;
}
case EMobileOfficeCmdBack:
{
ActivateLocalViewL(OpenDocument()->NextViewID());
break;
}
case EMobileOfficeCmdHelp:
//.........这里部分代码省略.........
示例5: HandleCommandL
// ----------------------------------------------------------------------------
// CSetupWizardListView::HandleCommandL( TInt )
// Handles the commands.
// ----------------------------------------------------------------------------
//
void CSetupWizardListView::HandleCommandL( TInt aCommand )
{
TInt temp;
TInt iCurrentPos;
TInt err;
switch ( aCommand ) // Command is...
{
case EAknSoftkeyBack:
{
// save settings
iListBox->StoreSettingsL();
iListBox->SaveSettingsToDB();
if(iPhotosAppUi->RegFileExists())
//if(1)
{
switch(iPhotosAppUi->iSettingsScreenValue)
{
case 0:
AppUi()->HandleCommandL(EMainView);
break;
case 1:
//iPhotosAppUi->ShowSetupWizard(1);
iPhotosAppUi->CallSetupWizardStep5();
break;
case 2:
//iPhotosAppUi->ShowSetupWizard(2);
//iPhotosAppUi->ShowMessage(2);
iPhotosAppUi->CallSetupWizardStep11();
break;
case 3:
//iPhotosAppUi->ShowMessage();
//AppUi()->HandleCommandL(EMainView);
//iPhotosAppUi->ShowSetupWizard(3);
//iPhotosAppUi->ShowMessage(3);
iPhotosAppUi->CallSetupWizardStep17();
break;
default:
break;
}
}
else
AppUi()->HandleCommandL(EUnRegView);
iPhotosAppUi->iRipplePhotos = 2;
break;
}
case ESave:
iCurrentPos = iListBox->ListBox()->CurrentItemIndex();
switch(iPhotosAppUi->iSettingsScreenValue)
{
case 0:
if(iCurrentPos == 0)// || iCurrentPos == 1 || iCurrentPos == 2)
{
iListBox->PopUp();
iListBox->StoreSettingsL();
}
else if(iCurrentPos == 1)//3)
{
//iListBox->SelectAccess();
iPhotosAppUi->AccessPointSettings();
iListBox->LoadSettingsL();
//iPhotosAppUi->BringToForeground();
}
break;
case 1:
if(iCurrentPos == 0)
{
temp=iData->iContactsRoam;
iListBox->PopUp();
iListBox->StoreSettingsL();
if(iData->iContactsRoam == 1)
{
//TBuf<150> msg;
//msg.Copy(_L("Contacts will be uploaded even while Roaming."));
//msg.Copy(*(iEikonEnv->AllocReadResourceL(R_CONTACTS_MESSAGE1)));
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(*(iEikonEnv->AllocReadResourceL(R_CONTACTS_MESSAGE1)));
dlg->PrepareLC(R_ROAMING_MESSAGE);
err = dlg->RunLD() ;
if (err == 0)
{
iData->iContactsRoam = temp;
iListBox->LoadSettingsL();
}
else
{
iListBox->LoadSettingsL();
}
}
else {
//.........这里部分代码省略.........
示例6: inputFileStream
// -----------------------------------------------------------------------------
// CHelloS60AppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CHelloS60AppUi::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case ECommand1:
{
// Load a string from the resource file and display it
HBufC* textResource = StringLoader::LoadLC(R_COMMAND1_TEXT);
CAknInformationNote* informationNote;
informationNote = new (ELeave) CAknInformationNote;
// Show the information Note with
// textResource loaded with StringLoader.
informationNote->ExecuteLD(*textResource);
// Pop HBuf from CleanUpStack and Destroy it.
CleanupStack::PopAndDestroy(textResource);
}
break;
case ECommand2:
{
RFile rFile;
//Open file where the stream text is
User::LeaveIfError(rFile.Open(CCoeEnv::Static()->FsSession(),
KFileName, EFileStreamText));//EFileShareReadersOnly));// EFileStreamText));
CleanupClosePushL(rFile);
// copy stream from file to RFileStream object
RFileReadStream inputFileStream(rFile);
CleanupClosePushL(inputFileStream);
// HBufC descriptor is created from the RFileStream object.
HBufC* fileData = HBufC::NewLC(inputFileStream, 32);
CAknInformationNote* informationNote;
informationNote = new (ELeave) CAknInformationNote;
// Show the information Note
informationNote->ExecuteLD(*fileData);
// Pop loaded resources from the cleanup stack
CleanupStack::PopAndDestroy(3); // filedata, inputFileStream, rFile
}
break;
case EHelp:
{
CArrayFix<TCoeHelpContext>* buf = CCoeAppUi::AppHelpContextL();
HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), buf);
}
break;
case EAbout:
{
CAknMessageQueryDialog* dlg = new (ELeave) CAknMessageQueryDialog();
dlg->PrepareLC(R_ABOUT_QUERY_DIALOG);
HBufC* title = iEikonEnv->AllocReadResourceLC(R_ABOUT_DIALOG_TITLE);
dlg->QueryHeading()->SetTextL(*title);
CleanupStack::PopAndDestroy(); //title
HBufC* msg = iEikonEnv->AllocReadResourceLC(R_ABOUT_DIALOG_TEXT);
dlg->SetMessageTextL(*msg);
CleanupStack::PopAndDestroy(); //msg
dlg->RunLD();
}
break;
default:
Panic( EHelloS60Ui);
break;
}
}
示例7: HandleCommandL
//.........这里部分代码省略.........
{
if (iBrCtlInterface)
{
iBrCtlInterface->HandleCommandL(iCommandBase + TBrCtlDefs::ECommandForward);
}
break;
}
case ECmdAppHome:
{
if (iBrCtlInterface)
{
iBrCtlInterface->LoadUrlL(iStartPage);
}
break;
}
case EOptions:
{
if (iBrCtlInterface)
{
iBrCtlInterface->LoadUrlL(iOptionsPage);
//iBrCtlInterface->ClearCache();
}
break;
}
case ECmdTakePicture:
{
iRhoCamera->StopViewFinder();
iRhoCamera->StartViewFinderL();
break;
}
case ECmdChoosePicture:
{
ChoosePicture();
break;
}
case ELoggingOptions:
{
iBrCtlInterface->SetDimmed( ETrue);
iBrCtlInterface->MakeVisible( EFalse );
iBrCtlInterface->DrawNow();
CLogOptionsDialog::RunDlgLD();
iBrCtlInterface->SetDimmed( EFalse );
iBrCtlInterface->MakeVisible( ETrue );
iBrCtlInterface->DrawNow();
break;
}
case ELogView:
{
rho::String strText;
LOGCONF().getLogText(strText);
TPtrC8 ptr8((TUint8*)strText.c_str());
HBufC *msg = HBufC::NewLC(ptr8.Length());
msg->Des().Copy(ptr8);
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(*msg);
dlg->PrepareLC(R_STAT_QUERY_DIALOG);
HBufC* title = iEikonEnv->AllocReadResourceLC(R_LOG_VIEW_DIALOG_TITLE);
dlg->QueryHeading()->SetTextL(*title);
CleanupStack::PopAndDestroy(); //title
dlg->SetExtentToWholeScreen();
dlg->RunLD();
CleanupStack::PopAndDestroy(msg);
break;
}
/*case EAknSoftkeyCancel:
{
CEikButtonGroupContainer* current = CEikButtonGroupContainer::Current();
if ( current )
{
current->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK );
current->SetFocus(EFalse, EDrawNow);
}
break;
}*/
default:
if (aCommand >= iCommandBase &&
aCommand < iCommandBase + TBrCtlDefs::ECommandIdWMLBase &&
iBrCtlInterface)
{
iBrCtlInterface->HandleCommandL(aCommand);
}
if (aCommand >= iCommandBase + TBrCtlDefs::ECommandIdWMLBase &&
aCommand < iCommandBase + TBrCtlDefs::ECommandIdRange &&
iBrCtlInterface)
{
iBrCtlInterface->HandleCommandL(aCommand);
}
break;
}
}
示例8: OfferKeyEventL
TKeyResponse CSymellaSearchContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
{
if (aType == EEventKey)
{
switch (aKeyEvent.iCode)
{
case EKeyUpArrow:
case EKeyDownArrow:
return iListBox->OfferKeyEventL(aKeyEvent, aType);
case EKeyDevice3: //EKeyOk
{
if (CurrentItemIndex() >= 0)
{
HBufC* info = CTR->DlManager()->CreateHitInfoL(CurrentItemIndex());
CleanupStack::PushL(info);
/*CAknNoteDialog* note = new (ELeave) CAknNoteDialog;
CleanupStack::PushL(note);
note->SetTextL(*info);
CleanupStack::Pop();
note->PrepareLC(R_HIT_INFO_NOTE);
note->RunLD();*/
CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
dlg->PrepareLC( R_MESSAGE_QUERY );
dlg->SetMessageTextL(info->Des());
dlg->QueryHeading()->SetTextL(_L("Hit info"));
dlg->RunLD();
CleanupStack::PopAndDestroy();
}
}
break;
case EKeyLeftArrow:
case EKeyRightArrow:
{
// Empty FindBox Search Text
_LIT(KBlank, "");
FindBox()->SetSearchTextL(KBlank);
// Press Backspace on Empty FindBox to Close it
TBool refresh = false;
TKeyEvent key;
key.iCode = 8;
key.iScanCode = 1;
key.iRepeats = 1;
key.iModifiers = 0;
AknFind::HandleFindOfferKeyEventL(key, EEventKey, this, ListBox(), FindBox(), ETrue, refresh);
}
break;
default:
{
if (iFindBox)
{
TBool needRefresh( EFalse );
TBool flagsOfPopup( EFalse );
if ( AknFind::HandleFindOfferKeyEventL( aKeyEvent, aType, this,
iListBox, iFindBox,
ETrue,
needRefresh ) ==
EKeyWasConsumed )
{
if ( needRefresh )
{
SizeChanged();
DrawNow();
}
return EKeyWasConsumed;
}
}
}
break;
}
}
return EKeyWasNotConsumed;
}
示例9: HandleCommandL
// -----------------------------------------------------------------------------
// CRhodesAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CRhodesAppUi::HandleCommandL(TInt aCommand)
{
switch (aCommand)
{
case EEikCmdExit:
case EAknSoftkeyExit:
if ( iSyncEngineWrap )
iSyncEngineWrap->TerminateThread();
Exit();
break;
case EHelp:
{
CArrayFix<TCoeHelpContext>* buf = CCoeAppUi::AppHelpContextL();
HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), buf);
}
break;
case EAbout:
{
CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
dlg->PrepareLC(R_ABOUT_QUERY_DIALOG);
HBufC* title = iEikonEnv->AllocReadResourceLC(R_ABOUT_DIALOG_TITLE);
dlg->QueryHeading()->SetTextL(*title);
CleanupStack::PopAndDestroy(); //title
HBufC* msg = iEikonEnv->AllocReadResourceLC(R_ABOUT_DIALOG_TEXT);
dlg->SetMessageTextL(*msg);
CleanupStack::PopAndDestroy(); //msg
dlg->RunLD();
}
break;
#ifdef ENABLE_RUBY_VM_STAT
case EStat:
{
CAknMessageQueryDialog* dlg = new (ELeave)CAknMessageQueryDialog();
dlg->PrepareLC(R_STAT_QUERY_DIALOG);
HBufC* title = iEikonEnv->AllocReadResourceLC(R_STAT_DIALOG_TITLE);
dlg->QueryHeading()->SetTextL(*title);
CleanupStack::PopAndDestroy(); //title
char buf[500] = {0};
sprintf( buf, "stat:\n___________________\n"
"iceq stat:\n "
"iseq binread: %u%s\n"
"iseq marshal: %u%s\n"
"require_compiled: %u%s\n"
"httpd thread loaded: %d\n"
"sync thread loaded: %d\n",
g_iseq_binread_msec, "msec",
g_iseq_marshal_load_msec, "msec",
g_require_compiled_msec, "msec",
g_httpd_thread_loaded,
g_sync_thread_loaded);
TPtrC8 ptr8((TUint8*)buf);
HBufC *msg = HBufC::NewLC(ptr8.Length());
msg->Des().Copy(ptr8);
dlg->SetMessageTextL(*msg);
CleanupStack::PopAndDestroy(msg);
dlg->RunLD();
}
break;
#endif
default:
iAppView->HandleCommandL(aCommand);
break;
}
}
示例10: ShowDisclaimerL
/*
-----------------------------------------------------------------------
-----------------------------------------------------------------------
*/
TBool CMovingBallAppUi::ShowDisclaimerL(void)
{
TBool OkToContinue(EFalse);
TFindFile AppFile(CCoeEnv::Static()->FsSession());
if(KErrNone != AppFile.FindByDir(KtxDisclaimerFileName, KNullDesC))
{
HBufC* Abbout = KtxDisclaimer().AllocLC();
TPtr Pointter(Abbout->Des());
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(Pointter);
dlg->PrepareLC(R_DDD_HEADING_PANE);
dlg->SetHeaderTextL(KtxDisclaimerTitle);
if(dlg->RunLD())
{
TFileName ShortFil;
#ifdef __SERIES60_3X__
if(KErrNone ==CCoeEnv::Static()->FsSession().PrivatePath(ShortFil))
{
TFindFile privFile(CCoeEnv::Static()->FsSession());
if(KErrNone == privFile.FindByDir(ShortFil, KNullDesC))
{
TParsePtrC hjelp(privFile.File());
ShortFil.Copy(hjelp.Drive());
ShortFil.Append(KtxDisclaimerFileName);
}
}
#else
TFindFile privFile(CCoeEnv::Static()->FsSession());
if(KErrNone == privFile.FindByDir(KtxApplicationFileName, KNullDesC))
{
TParsePtrC hjelp(privFile.File());
ShortFil.Copy(hjelp.Drive());
ShortFil.Append(KtxDisclaimerFileName);
}
#endif
BaflUtils::EnsurePathExistsL(CCoeEnv::Static()->FsSession(),ShortFil);
RFile MyFile;
if(KErrNone == MyFile.Create(CCoeEnv::Static()->FsSession(),ShortFil,EFileWrite))
{
TTime NowTime;
NowTime.HomeTime();
TBuf8<255> InfoLine;
InfoLine.Copy(_L8("Accepted on Date\t"));
InfoLine.AppendNum(NowTime.DateTime().Day() + 1);
InfoLine.Append(_L8("."));
InfoLine.AppendNum((NowTime.DateTime().Month() + 1));
InfoLine.Append(_L8("."));
InfoLine.AppendNum(NowTime.DateTime().Year());
InfoLine.Append(_L8(" "));
InfoLine.Append(_L8("--"));
InfoLine.AppendNum(NowTime.DateTime().Hour());
InfoLine.Append(_L8(":"));
TInt HelperInt = NowTime.DateTime().Minute();
if(HelperInt < 10)
InfoLine.AppendNum(0);
InfoLine.AppendNum(HelperInt);
InfoLine.Append(_L8(":"));
HelperInt = NowTime.DateTime().Second();
if(HelperInt < 10)
InfoLine.AppendNum(0);
InfoLine.AppendNum(HelperInt);
InfoLine.Append(_L8(" "));
MyFile.Write(InfoLine);
MyFile.Close();
}
OkToContinue = ETrue;
}
CleanupStack::PopAndDestroy(Abbout);
}
else
{
OkToContinue = ETrue;
}
return OkToContinue;
}
示例11: HandleCommandL
void CPhotoListView::HandleCommandL(TInt aCommand)
{
TInt path;
TInt count;
switch ( aCommand )
{
case EMarkSel:
{
TInt count;
if( iPhotosAppUi->ImageFolderPath() == 0 || iPhotosAppUi->ImageFolderPath() == 2)
count = iContainer->iPhoneCount;
else
count = iContainer->iMmcCount;
if(count > 0)
iContainer->MarkUnMarkSelectedItem();
}
break;
case EMarkAll:
{
TInt count;
if( iPhotosAppUi->ImageFolderPath() == 0 || iPhotosAppUi->ImageFolderPath() == 2)
count = iContainer->iPhoneCount;
else
count = iContainer->iMmcCount;
if(count > 0)
iContainer->MarkAllItems();
}
break;
case EUnMarkAll:
{
TInt count;
if( iPhotosAppUi->ImageFolderPath() == 0 || iPhotosAppUi->ImageFolderPath() == 2)
count = iContainer->iPhoneCount;
else
count = iContainer->iMmcCount;
if(count > 0)
iContainer->UnMarkAllItems();
}
break;
//case EAknSoftkeyDone:
case ESendSel:
{
TInt count;
if( iPhotosAppUi->ImageFolderPath() == 0 || iPhotosAppUi->ImageFolderPath() == 2)
count = iContainer->iPhoneCount;
else
count = iContainer->iMmcCount;
if(count > 0)
iContainer->MarkSelectedItem();
iPhotoSendMode = iContainer->IsImageSelected();
if(iPhotoSendMode == 1)
{
TBuf<150> msg;
TInt path=0;
count = GetPhotoCount();
msg.Copy(_L(""));
msg.AppendNum(count);
path = iPhotosAppUi->ImageFolderPath();
if(path == 0 || path == 1)
//msg.Append(_L(" Photos"));
msg.Append(*(iEikonEnv->AllocReadResourceL(R_IMAGES_CONFIRM_PHOTOS)));
else if(path == 2 || path == 3)
//msg.Append(_L(" Videos"));
msg.Append(*(iEikonEnv->AllocReadResourceL(R_IMAGES_CONFIRM_VIDEOS)));
//msg.Append(_L(" will be sent to your Ripple Vault. Confirm?"));
msg.Append(*(iEikonEnv->AllocReadResourceL(R_IMAGES_CONFIRM)));
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(msg);
dlg->PrepareLC(R_UPLOAD_ALLPHOTOS);
if(dlg->RunLD())
{
SendPhotoToServer();
iPhotosAppUi->ActivateView(KViewIdStatusScreen);
/*
TInt8 choice;
iPhotosAppUi->GetChoice(choice);
if(choice){
//iPhotosAppUi->ActivateView(KViewIdSubScreen);
iPhotosAppUi->ActivateView(KViewIdEmptyScreen);
iPhotosAppUi->ActivateView(KViewIdStatusScreen);
}
else
{
if(iPhotosAppUi->iStoragePath==PHOTOS_PHONEMEMORY || iPhotosAppUi->iStoragePath==PHOTOS_MMC){
iPhotosAppUi->iStoragePath = VIDEOS_PHONEMEMORY;
iPhotosAppUi->ActivateView(KViewIdEmptyScreen );
iPhotosAppUi->ActivateView(KViewIdPhotoList );
//.........这里部分代码省略.........