亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? taskmgrappview.cpp

?? 基于Symbian s60 2nd 下的任務管理器程序。
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/* Copyright (c) 2003, Nokia. All rights reserved */

#include <e32def.h>
#include <coemain.h>
#include <apaid.h>
#include <apgcli.h>
#include <badesca.h>
#include <gdi.h>
#include <w32std.h>
#include <eikclbd.h>
#include <eikfrlb.h>
#include <aknquerydialog.h>
#include <aknnotewrappers.h>
#include <eikdll.h>
#include <taskmgr.rsg>
#include <hal.h>
#include <hal_data.h>
#include <pathinfo.h>
#include <aknmessagequerydialog.h>
#include <AknCommonDialogs.h>
#include <akntitle.h>

#include <plpvariant.h>
#include <plpvar.h>

#include "taskmgrAppView.h"

const TUid KUidtaskmgrApp = {0x10005B60};

TKeyResponse CtaskmgrAppView::OfferKeyEventL(
                                       const TKeyEvent& aKeyEvent,
                                       TEventCode aType )
{
    if ( aType != EEventKey ){
        return EKeyWasNotConsumed;
    }

    switch ( aKeyEvent.iCode ){
        // Up & Down arrow key's event transfer to list box
        case EKeyUpArrow:
        case EKeyDownArrow:
            if ( iListBox ){
                return iListBox->OfferKeyEventL( aKeyEvent, aType );
            }
            break;
        default:
            break;
     }
   return EKeyWasNotConsumed;
	
}



TInt CtaskmgrAppView::CountComponentControls() const
{
    return 1; // return nbr of controls inside this container
		    // return nbr of controls inside this container
}

// ---------------------------------------------------------
// CSIPBySipUAContainerAddressBook::ComponentControl(TInt aIndex) const
// ---------------------------------------------------------
//
CCoeControl* CtaskmgrAppView::ComponentControl(TInt aIndex) const
{
	   switch ( aIndex ){
			case 0:
				return iListBox;
			default:
				return NULL;
       }
}

CtaskmgrAppView* CtaskmgrAppView::NewL(const TRect& aRect)
{
    CtaskmgrAppView* self = CtaskmgrAppView::NewLC(aRect);
    CleanupStack::Pop(self);
    return self;
}

CtaskmgrAppView* CtaskmgrAppView::NewLC(const TRect& aRect)
{
    CtaskmgrAppView* self = new (ELeave) CtaskmgrAppView;
    CleanupStack::PushL(self);
    self->ConstructL(aRect);
    return self;
}

CtaskmgrAppView::CtaskmgrAppView()
{
	// No implementation required
}

CtaskmgrAppView::~CtaskmgrAppView()
{
   	delete iListBox;
   	if(iAppList){
    	iAppList->Reset();
   		delete iAppList;
   		iAppList = NULL;
   	}
   	if(iProcList){
   		iProcList->Reset();
    	delete iProcList;
    	iProcList = NULL;
    }
	// No implementation required
}

void CtaskmgrAppView::CreateListBoxL(const TRect&/* aRect*/)
{
	//Delete the list box if already exists.
	if ( iListBox ){
		delete iListBox;
		iListBox = NULL;
	}
	
	iListBox = new (ELeave ) CAknDoubleStyleListBox();
	iListBox->ConstructL(this, EAknListBoxSelectionList );
	iListBox->SetContainerWindowL(*this);

	//add scroll bar to the list
	iListBox->CreateScrollBarFrameL(ETrue);
	iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn,
														CEikScrollBarFrame::EAuto);
	
	const TPoint aPoint(0,0);
	const TSize aSize(180,150);
	
	//most important line , else the lst box simply disappears
	iListBox->SetExtent(aPoint,aSize);
	//Fill list box with the data
	InitTaskList();
	
	iListBox->HandleItemAdditionL();
	iListBox->ActivateL();
	iListBox->DrawNow();
}

void CtaskmgrAppView::HandleListBoxEventL(CEikListBox* /*aListBox*/,TListBoxEvent /*aEventType*/ )
{

}



//This fucntion will get the present task list and 
//add it to the UI list
void CtaskmgrAppView::InitTaskList()
{
	CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
	CAknTitlePane* tp=(CAknTitlePane*)sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle));
	tp->SetTextL(_L("Task List")); // Set the text string.

	if(iProcList){
		iProcList->Reset();
		delete iProcList;
		iProcList = NULL;
	}
	_LIT(KItemFormatString,"\t%S\t%S\t");
	RApaLsSession RSession;
	TInt AAppCount = 0;//get the number of applications
	
	RSession.Connect();	
	RSession.AppCount(AAppCount);
	iAppCount = AAppCount;
	
	iAppList = new (ELeave) CDesCArrayFlat(iAppCount);
	RSession.GetAllApps();
	
	iListBox->Reset();
	
	if(AAppCount > 0){
		CDesCArray *itemList  = new (ELeave) CDesCArrayFlat(AAppCount);
		TBuf<200> Item;
		TApaAppInfo AppInfo;
		TApaTaskList aList(CEikonEnv::Static()->WsSession());
		TInt ListCount = 0;
		
		for(TInt i=0;i<AAppCount;i++){
			RSession.GetNextApp(AppInfo);
			TApaTask ATask3 = aList.FindApp(AppInfo.iUid);
			if(ATask3.Exists())
			{
				if(AppInfo.iFullName.Find(_L("Phone.app"))!=KErrNotFound)
				{
					iPhoneIndex = ListCount;
				}
			
				Item.Format(KItemFormatString,&AppInfo.iCaption,&AppInfo.iFullName);
				itemList->AppendL(Item);
				UidArray[ListCount++] = AppInfo.iUid;
			}
		}
		
		//set items and ownership
		iListBox->Model()->SetItemTextArray(itemList);
		iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);	

	}
	else{
		iEikonEnv->InfoMsg(_L("No tasks!!"));
	}
	iListBox->SetCurrentItemIndex(0);
	iListBox->SetFocus(ETrue); 
	RSession.Close();
}

void CtaskmgrAppView::ConstructL(const TRect& aRect)
{
    CreateWindowL();
	CreateListBoxL(aRect);
    SetRect(aRect);
    ActivateL();
}

// Draw this application's view to the screen
void CtaskmgrAppView::Draw(const TRect& /*aRect*/) const
{
/*    // Get the standard graphics context 
    CWindowGc& gc = SystemGc();
    // Gets the control's extent
    TRect rect = Rect();
    // Clears the screen
    gc.Clear(rect);
*/
}

void CtaskmgrAppView::RefreshList()
{
	if(iAppState == ETaskListState){
		InitTaskList();
	}else if (iAppState == EProcessListState){
		InitProcessList();	
	}
	iListBox->HandleItemAdditionL();
	iListBox->ActivateL();
	iListBox->DrawNow();
}

void CtaskmgrAppView::KillApp()
{
	TInt ItemSelected;	
	
	ItemSelected = iListBox->CurrentItemIndex();
	
	TUid KillThisUid = UidArray[ItemSelected];
	TApaTaskList aList(CEikonEnv::Static()->WsSession());
	TApaTask ATask3 = aList.FindApp(KillThisUid);
	
	if(ATask3.Exists())
		ATask3.KillTask();

	RefreshList();
}

void CtaskmgrAppView::NewApp()
{
	CAknTextQueryDialog* dlg;
	TBuf<512> aText;
  	dlg = new(ELeave)CAknTextQueryDialog(aText, CAknQueryDialog::ENoTone);
  	dlg->SetMaxLength(512);
  	TBool answer( dlg->ExecuteLD( R_AKNEXQUERY_ONELINE_DATA_QUERY ) );
  	if(answer){
	  	//now check if thing is app or exe and then 
	  	//launch it accordingly
	  	_LIT(KExe,".exe");
	  	_LIT(KApp,".app");
	  	if(aText.Find(KExe)!=KErrNotFound){
	  		EikDll::StartExeL(aText);
	  	}
	  	else if(aText.Find(KApp)!=KErrNotFound){
		  	CApaCommandLine* commandLine = CApaCommandLine::NewLC();
    	    commandLine->SetLibraryNameL( aText );
        	commandLine->SetCommandL( EApaCommandRun );
	  		EikDll::StartAppL(*commandLine);
	  		CleanupStack::PopAndDestroy(); // commandLine
	  	}
  	}
}

void CtaskmgrAppView::TaskInfo()
{
	/*buf = "
	//ThreadId : %d\n 
	 WindowGroup Id : %d\n
	 Heap Size : %d kb\n
	 Stack Size : %d kb\n
	 Protected : %S\n
	 CPU usage : %d\n mcrsecs";
	 */
	if(iAppState == ETaskListState){
		TInt ItemSelected = iListBox->CurrentItemIndex();
	
		TUid SelectedAppUid = UidArray[ItemSelected];
		TApaTaskList aList(CEikonEnv::Static()->WsSession());
		TApaTask ATask3 = aList.FindApp(SelectedAppUid);
		TInt WinGrpId = ATask3.WgId();
		
		TThreadId AppThreadId = ATask3.ThreadId();
		//now get this thread related info
		RThread AppThread;
		AppThread.Open(AppThreadId);
		TInt HeapSize,StackSize;
		
		AppThread.GetRamSizes(HeapSize,StackSize);
		
		TTimeIntervalMicroSeconds CpuTime;
		AppThread.GetCpuTime(CpuTime);
		
		HBufC *aText = iEikonEnv->AllocReadResourceLC( R_TASK_INFO); 
		HBufC *aText1 = HBufC::NewLC(650);
		
		TBuf<10> IfProtected;
		IfProtected.Copy(AppThread.Protected()?_L("YES"):_L("NO"));
		aText1->Des().Format(aText->Des(),AppThreadId,
						     WinGrpId,
						     (HeapSize/1024),
						     (StackSize/1024),
						     &IfProtected,
						     CpuTime);
		
		ShowInfoDialog(R_TASK_TITLE,*aText1);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区免费播放| 在线亚洲一区观看| 91黄色激情网站| 精品国产三级a在线观看| 亚洲最新视频在线播放| 欧美图区在线视频| 日本一区二区三区高清不卡| 三级欧美韩日大片在线看| 成年人网站91| 日本一区二区三区国色天香| 蜜桃视频免费观看一区| 在线看不卡av| 亚洲美女免费视频| 成人激情免费电影网址| 精品理论电影在线| 蜜桃精品视频在线| 欧美一区二区三区系列电影| 亚洲蜜桃精久久久久久久| 成人国产在线观看| 日日摸夜夜添夜夜添国产精品| 日本视频中文字幕一区二区三区| 不卡大黄网站免费看| 久久亚洲精品国产精品紫薇| 日本中文字幕一区二区有限公司| 在线看国产一区| 一区二区不卡在线播放| 91欧美一区二区| 亚洲欧美另类小说视频| 日本久久精品电影| 亚洲综合精品自拍| 欧美午夜精品理论片a级按摩| 亚洲欧美影音先锋| 99精品视频在线观看免费| 中文字幕不卡一区| 99精品视频在线观看| 樱桃国产成人精品视频| 欧美视频在线播放| 日韩电影在线一区| 精品美女在线观看| 国产成人精品网址| 亚洲欧美中日韩| 欧美日韩成人高清| 老司机精品视频导航| 日韩免费观看2025年上映的电影| 捆绑变态av一区二区三区| 26uuu亚洲综合色欧美| 国产麻豆精品theporn| 中文字幕第一区综合| 99视频国产精品| 亚洲午夜免费电影| 欧美一区午夜精品| 成人黄色小视频在线观看| 亚洲免费毛片网站| 日韩三级.com| av成人免费在线观看| 亚洲一区二区中文在线| 日韩欧美一区二区不卡| 亚洲欧美自拍偷拍色图| 欧美日韩亚洲高清一区二区| 丝袜诱惑制服诱惑色一区在线观看 | 亚洲资源中文字幕| 欧美国产欧美综合| 亚洲h动漫在线| 成人国产精品视频| 欧美午夜电影一区| 国产女人18毛片水真多成人如厕| 综合久久综合久久| 国内精品国产成人| 在线电影欧美成精品| 亚洲精品成人天堂一二三| 亚洲一区二区av电影| 欧美成人性战久久| 一本大道久久a久久精二百| 蜜臀久久99精品久久久久宅男 | 成人午夜激情视频| 亚洲aⅴ怡春院| 久久精品一区蜜桃臀影院| 在线视频观看一区| 成人黄色片在线观看| 青青草国产精品亚洲专区无| 亚洲精品国产视频| 日本一区二区久久| 日韩一级视频免费观看在线| 日本高清视频一区二区| 国产一区二区导航在线播放| 亚洲不卡一区二区三区| 天堂午夜影视日韩欧美一区二区| 久久亚洲二区三区| 91精品国产全国免费观看| 色综合久久久久综合99| 成人深夜在线观看| 玖玖九九国产精品| 午夜伊人狠狠久久| 亚洲欧美日韩久久精品| 亚洲国产激情av| 国产婷婷一区二区| 精品国内片67194| 欧美一区二区三区在线观看| 欧美日韩一区不卡| 色哟哟国产精品| 99这里只有精品| 福利一区福利二区| 国产在线精品一区二区夜色| 美女一区二区久久| 久久99精品久久只有精品| 日韩成人一级大片| 日韩黄色免费电影| 免费在线观看日韩欧美| 男人操女人的视频在线观看欧美| 天天综合日日夜夜精品| 亚洲伊人色欲综合网| 午夜国产不卡在线观看视频| 亚洲国产欧美一区二区三区丁香婷| 亚洲欧美日韩小说| 亚洲一区中文在线| 亚洲aⅴ怡春院| 毛片一区二区三区| 狠狠色丁香久久婷婷综合丁香| 久久成人综合网| 国产综合色产在线精品| 国内偷窥港台综合视频在线播放| 九九精品一区二区| 国产一区在线观看麻豆| 成人午夜免费av| 色婷婷国产精品综合在线观看| 欧洲精品在线观看| 欧美一区二区三区播放老司机| 日韩一区二区三区视频在线| 精品999久久久| 1区2区3区国产精品| 亚洲丝袜另类动漫二区| 亚洲在线观看免费| 久久99精品网久久| va亚洲va日韩不卡在线观看| 欧美丝袜丝交足nylons| 日韩精品一区二区三区在线观看| 精品福利一二区| 国产精品成人免费| 亚洲一区二区高清| 国产麻豆精品95视频| 色综合久久天天综合网| 91麻豆精品国产91| 中文文精品字幕一区二区| 一区二区三区四区高清精品免费观看| 亚洲综合激情小说| 久久99九九99精品| 91麻豆产精品久久久久久| 制服丝袜日韩国产| 日本一区二区电影| 视频一区视频二区中文| 粉嫩嫩av羞羞动漫久久久| 久久精品在线免费观看| 亚洲精品国久久99热| 狠狠色狠狠色综合| 欧美三级电影网站| 欧美激情中文字幕一区二区| 亚洲一区二区三区中文字幕| 国产精品一二三| 欧美日韩精品欧美日韩精品| 亚洲国产精品av| 精东粉嫩av免费一区二区三区| 一本到不卡精品视频在线观看| 日韩美女视频在线| 亚洲午夜在线电影| 粉嫩aⅴ一区二区三区四区| 欧美日本精品一区二区三区| 中文字幕在线观看不卡| 日韩电影在线一区二区三区| 色综合久久99| 国产欧美日韩不卡免费| 久久国产欧美日韩精品| 欧美亚洲免费在线一区| 亚洲欧洲日本在线| 国产麻豆精品视频| 欧美成人精品二区三区99精品| 中文字幕综合网| 国产91在线看| 欧美精品一区二区久久久| 爽爽淫人综合网网站| 91国产免费观看| 国产精品欧美久久久久无广告 | 99精品桃花视频在线观看| 久久久久久久精| 免费av网站大全久久| 欧美日韩国产在线观看| 一区二区视频免费在线观看| 国产91清纯白嫩初高中在线观看| 欧美成人女星排名| 日本欧美大码aⅴ在线播放| 精品1区2区3区| 一区二区三区波多野结衣在线观看| 成人综合婷婷国产精品久久免费| 精品粉嫩aⅴ一区二区三区四区| 日本欧美一区二区在线观看| 欧美疯狂做受xxxx富婆| 午夜欧美大尺度福利影院在线看 | 一本一道久久a久久精品| 国产精品久久一卡二卡| av动漫一区二区| 亚洲欧美偷拍另类a∨色屁股|