亚洲欧美第一页_禁久久精品乱码_粉嫩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);
	
		CleanupStack::PopAndDestroy( aText1 ); 	
		CleanupStack::PopAndDestroy( aText ); 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区日韩精品中文字幕| 免费观看在线综合| 男人操女人的视频在线观看欧美| 国产suv精品一区二区883| 欧美精选一区二区| 亚洲精选在线视频| 色哟哟欧美精品| 久久久精品tv| 另类小说综合欧美亚洲| 91福利视频在线| 亚洲视频资源在线| 丁香啪啪综合成人亚洲小说| 6080午夜不卡| 亚洲国产乱码最新视频 | 久久精品国产亚洲一区二区三区| 91麻豆蜜桃一区二区三区| 久久精品欧美一区二区三区不卡| 五月天网站亚洲| 在线免费观看日本欧美| 中文字幕国产精品一区二区| 精品一区二区免费视频| 91精品国产乱码| 日韩精品电影一区亚洲| 色狠狠综合天天综合综合| 国产精品久久久久久久久免费樱桃 | 免费成人在线影院| 国产精品资源网站| 91美女在线观看| 51精品国自产在线| 国产精品色噜噜| 婷婷六月综合亚洲| 国产成人av网站| 精品视频1区2区| 久久久久久久久久久久久久久99 | 成人美女在线观看| 欧美色手机在线观看| 精品国产一二三| 亚洲人成网站色在线观看| 奇米一区二区三区av| 国产aⅴ综合色| 欧美精品乱人伦久久久久久| 国产欧美视频在线观看| 午夜精品在线看| 国产白丝精品91爽爽久久| 欧美日韩高清一区二区三区| 日本一区二区三区高清不卡| 午夜精品免费在线观看| 91色九色蝌蚪| 国产欧美日韩视频一区二区 | 久久久久久久av麻豆果冻| 一区二区三区免费网站| 国产91精品一区二区麻豆网站| 欧美日韩精品一区二区| 中文字幕一区二区三区在线不卡 | 国产嫩草影院久久久久| 精品一区二区精品| 欧美精品久久久久久久久老牛影院| 国产精品区一区二区三| 国产伦精一区二区三区| 日韩一区二区电影在线| 午夜精品福利一区二区三区蜜桃| 国产精品99久久不卡二区| 欧美一激情一区二区三区| 亚洲在线视频一区| 99精品久久免费看蜜臀剧情介绍| 中文字幕第一区第二区| 国产一区二区不卡| 欧美变态tickle挠乳网站| 天天影视涩香欲综合网| 欧美日韩在线电影| 亚洲在线一区二区三区| 欧美午夜理伦三级在线观看| 亚洲视频免费看| 97久久久精品综合88久久| 成人免费小视频| 色欧美88888久久久久久影院| 亚洲日本护士毛茸茸| 色婷婷综合久久久中文一区二区| 亚洲免费观看高清完整版在线观看 | 日韩欧美一区在线| 蜜臀av国产精品久久久久| 69堂国产成人免费视频| 三级不卡在线观看| 日韩三级.com| 国产一区二区三区免费看| 久久久777精品电影网影网| 国产一区二区伦理| 国产精品免费免费| 色综合天天综合色综合av | 久久综合久久99| 黄色日韩网站视频| 欧美国产乱子伦| 欧美婷婷六月丁香综合色| 亚洲福利一二三区| 欧美大肚乱孕交hd孕妇| 国产乱码精品一区二区三区忘忧草 | 五月天亚洲精品| 精品免费日韩av| 大白屁股一区二区视频| 亚洲色图制服丝袜| 91精品一区二区三区在线观看| 久久精品99国产精品日本| 久久久久久夜精品精品免费| 99久免费精品视频在线观看 | 欧美激情资源网| 一本大道久久a久久综合| 亚洲成人三级小说| 精品不卡在线视频| 色先锋久久av资源部| 亚洲色图一区二区| 色婷婷精品大在线视频| 91麻豆文化传媒在线观看| 成人短视频下载| 成人99免费视频| 成人毛片视频在线观看| 成人18精品视频| 99久久国产综合精品女不卡| eeuss影院一区二区三区 | 国产精品福利一区二区三区| 中文字幕高清不卡| 麻豆91在线播放免费| 日韩精品亚洲一区二区三区免费| 亚洲大尺度视频在线观看| 亚洲最新视频在线观看| 亚洲一区二区三区中文字幕| 亚洲一区二区三区四区不卡| 性欧美大战久久久久久久久| 日韩高清不卡一区二区三区| 美国十次综合导航| 狠狠色丁香婷婷综合| 国内精品视频666| 国产成人丝袜美腿| 成人免费高清视频在线观看| 色综合久久久久综合体桃花网| 91视视频在线直接观看在线看网页在线看| jizz一区二区| 欧美日韩精品二区第二页| 欧美一区二区三区免费视频| 精品少妇一区二区三区| 国产亚洲欧洲一区高清在线观看| 国产欧美日韩精品在线| 亚洲欧美福利一区二区| 亚洲第一成年网| 国模娜娜一区二区三区| 成人毛片在线观看| 欧美性视频一区二区三区| 91精品国产综合久久精品app| 一区二区三区国产精华| 国产精品久久网站| 国产偷国产偷亚洲高清人白洁| 337p粉嫩大胆噜噜噜噜噜91av| 91精品国产欧美一区二区成人| 一本色道久久综合亚洲aⅴ蜜桃 | 日本道在线观看一区二区| 成人丝袜高跟foot| 国产凹凸在线观看一区二区| 国产sm精品调教视频网站| 国产 日韩 欧美大片| 成人性色生活片| av在线不卡免费看| 91免费看视频| 亚洲激情第一区| 国产人成亚洲第一网站在线播放| 不卡视频在线看| 日韩精品一区二区三区在线播放 | 国产日韩欧美不卡| 国产精品伦理在线| 综合久久久久久| 亚洲精品高清在线观看| 亚洲国产欧美在线人成| 日韩欧美电影一二三| 自拍av一区二区三区| 国产在线日韩欧美| 欧美日韩成人激情| 国产精一区二区三区| 久久国产麻豆精品| 粗大黑人巨茎大战欧美成人| av电影天堂一区二区在线观看| 一本色道a无线码一区v| 欧美大片日本大片免费观看| 欧美日韩电影在线| 麻豆精品视频在线观看免费| 国产成人在线色| 日韩欧美不卡在线观看视频| 一区二区理论电影在线观看| 国产乱码一区二区三区| 欧美成人精品二区三区99精品| 亚洲综合一二区| 99麻豆久久久国产精品免费优播| 久久久一区二区三区捆绑**| 欧美aaaaaa午夜精品| 欧美高清激情brazzers| 亚洲精品成人在线| 欧美日高清视频| 丝袜脚交一区二区| 欧美三区在线观看| 亚洲一区二区四区蜜桃| 色噜噜狠狠色综合欧洲selulu| 国产精品萝li| 99精品视频一区二区|