當前位置:編程學習大全網 - 源碼下載 - 源代碼監控文件

源代碼監控文件

//進程加載

私有void按鈕13_Click(對象發送方,EventArgs e)

{

列表框2。items . Clear();

can 1();

面板20。show();

面板20。位置=新點(200,40);

面板20。身高= 485;面板20。寬度= 625;

Process[] m =過程。get processes();

foreach(m中的流程I)

{

列表框2。items . Add(I . process name);

}

標簽2。Text = ~進程數:~+listBox2。項目。計數;

this . listbox 2 . selectedindex = 0;

}

//流程詳細信息更新

私有void SearchProcess_Click(對象發送方,EventArgs e)

{

button13_Click(發件人,e);

}

//顯示所選系統進程的詳細信息。

私有void listbox 2 _ selectedindex changed(對象發送方,EventArgs e)

{

嘗試

{

string process name = this . listbox 2 . text;

this . group box 9 . text = process name+~流程詳情~;

Process[] MyProcess =進程。GetProcessesByName(進程名);

This.label21。Text = ~CPU時間:~+myprocess [0]。totalprocesstime。hours+~: ~+myprocess [0]。totalprocesstime。分鐘+~:~+my process[0]. totalprocessortime . seconds+~。~+my process[0]. totalprocessortime .毫秒;

This.label24.Text = ~進程圖像名稱:~+MyProcess[0]。ProcessName

This.label23.Text = ~進程ID: ~+myprocess [0]。ID;

This.label22.Text = ~啟動線程數:~+myprocess [0]。threads . count . tostring();

//MessageBox。show(my process[0]. totalprocessortime . tostring());

This.label20.Text = ~線程優先級:~+myprocess [0]。priority colass . tostring();

This.label19。Text = ~啟動時間:~+myprocess [0]。開始時間。tolongtimestring();

This.label18。Text = ~專用內存:~+(myprocess [0]。privatemorysize/1024)。tostring()+~ k ~;

This.label17。Text = ~峰值虛擬內存:~+(myprocess [0]。peakvirtualmemorysize/1024)。tostring()+~ k ~;

This.label16。Text = ~峰值分頁內存:~+(myprocess [0]。peakpagedmemorysize/1024)。tostring()+~ k ~;

This.label15。Text = ~分頁系統內存:~+(myprocess [0]。paged系統內存大小/1024)。tostring()+~ k ~;

this . label 11 . text = ~ page memory:~+(my process[0]。pagememorysize/1024)。tostring()+~ k ~;

This.label12。Text = ~未分頁的系統內存:~+(myprocess [0]。非分頁系統內存大小/1024)。tostring()+~ k ~;

This.label13。Text = ~物理內存:~+(myprocess [0]。Workingset/1024)。tostring()+~ k ~;

This.label14。Text = ~虛擬內存:~+(myprocess [0]。Virtualmemorysize/1024)。tostring()+~ k ~;

}

catch(異常錯誤)

{

//不處理生成的異常。

MessageBox。顯示(錯誤。ToString());

}

}

//鼠標結束進程

Private void結束進程toolstripmenuitem _ click(對象發送方,eventargse)

{

Process[] MyProcess =進程。GetProcessesByName(this . listbox 2 . text);

嘗試

{

我的進程[0]。kill();

button13_Click(發件人,e);

}

catch(異常o)

{

MessageBox。show(o . ToString());

}

}

//焦點刷新

私有void open_Activated(對象發送方,EventArgs e)

{

列表框2。items . Clear();

Process[] m =過程。get processes();

foreach(m中的流程I)

{

列表框2。items . Add(I . process name);

}

標簽2。Text = ~進程數:~+listBox2。項目。計數;

this . listbox 2 . selectedindex = 0;

}

//結束進程

私有void button46_Click(對象發送方,EventArgs e)

{

end process toolstrip menuitem _ click(sender,e);

}

  • 上一篇:dreamweaver設計頁面不顯示,網站制作,版權問題,沸騰展望內核
  • 下一篇:BG鏈遊早報:SIDUS HEROES(西杜斯英雄)即將開始IDO
  • copyright 2024編程學習大全網