Exemplo n.º 1
0
 private void Window_RefrshLabel(object sender, Canvas.CanvasRefreshLatestDataEventArgs e)
 {
     Canvas.Data[] data = e.LatestDatas;
     if (data[0] != null)this.cpuLoadLable.Text = "C:" + String.Format("{0:0.0}", data[0].percent) + "%";
     if (data[1] != null) this.memLoadLable.Text = "M:" + String.Format("{0:0}", data[1].current / 1024) + "M/" + String.Format("{0:0}", data[1].total / 1024) + "M";
     if (data[2] != null) this.cpuCoreOneLoadLable.Text = "Core1:" + String.Format("{0:0.0}", data[2].percent) + "%";
     if (data[3] != null) this.cpuCoreTwoLoadLable.Text = "Core2:" + String.Format("{0:0.0}", data[3].percent) + "%";
 }
Exemplo n.º 2
0
 private void Window_RefrshLabel(object sender, Canvas.CanvasRefreshLatestDataEventArgs e)
 {
     Canvas.Data[] data = e.LatestDatas;
     if (data[0] != null) this.diskLoadLable.Text = "T:" + this.FormatByteSize(5, data[0].current) + "/s";
     if (data[1] != null)
     {
         this.diskReadLoadLable.Text = "R:" + this.FormatByteSize(5, data[1].current) + "/s";
         this.logicalDiskReadTotal += data[1].current;
         this.diskReadTotalLable.Text = "RT:" + this.FormatByteSize(5, this.logicalDiskReadTotal);
     }
     if (data[2] != null)
     {
         this.diskWriteLoadLable.Text = "W:" + this.FormatByteSize(5, data[2].current) + "/s";
         this.logicalDiskWriteTotal += data[2].current;
         this.diskWriteTotalLable.Text = "WT:" + this.FormatByteSize(5, this.logicalDiskWriteTotal);
     }
 }
 private void Window_RefrshLabel(object sender, Canvas.CanvasRefreshLatestDataEventArgs e)
 {
     Canvas.Data[] data = e.LatestDatas;
     if (data[0] != null) this.networkInterfaceLoad.Text = "T:" + this.FormatByteSize(5, data[0].current)+"/s";
     if (data[1] != null)
     {
         this.networkInterfaceReceivedLoad.Text = "R:" + this.FormatByteSize(5, data[1].current) + "/s";
         this.receivedTotalBytes += data[1].current;
         this.networkInterfaceReceivedTotal.Text = "RT:" + this.FormatByteSize(5, this.receivedTotalBytes) + "B";
     }
     if (data[2] != null)
     {
         this.networkInterfaceSentLoad.Text = "S:" + this.FormatByteSize(5, data[2].current) + "/s";
         this.sentTotalBytes += data[2].current;
         this.networkInterfaceSentTotal.Text = "ST:" + this.FormatByteSize(5, this.sentTotalBytes) + "B";
     }
 }