- 51Aspx源码必读.txt[3KB]
- frmMain.cs[2KB]
- frmMain.Designer.cs[6KB]
- frmMain.resx[6KB]
- myCPU.csproj[3KB]
- Program.cs[488B]
- from.gif[4KB]
- myCPU.sln[851B]
- myCPU.suo[21KB]
- 最新Asp.Net源码下载.url[123B]
源码介绍
CPU监控器源码
源码描述:
开发环境:vs2010
一个简单的cpu监控器源码,利用计时器,Graphics等先获取cpu的值,再利用
Graphics绘制出cpu的峰谷。
基本原理
//获取CPU监视器当前显示值
private void trmGetCPU_Tick(object sender, EventArgs e)
{
//获取计数器当前样本的值
float cpuCurrentValue = this.perCPUMonitore.NextValue();
this.lblCurrentValue.Text = cpuCurrentValue.ToString() + "%";
//判断队列中的值是否满了
if (this.cpuValues.Count >= 200) {
//当满了时除去开始CPU显示的值
cpuValues.Dequeue();
}
//把当前CPU的值添加到队列集合中
this.cpuValues.Enqueue(cpuCurrentValue);
//调用图像
this.drawCPU();
}
下单记录
用户名 | 源码评分 | 成交价 | 下单时间 | 订单状态 |
---|