Exemplo n.º 1
0
        private void UpdateSeries()
        {
            float value = _cpuCounter.NextValue();

            _cpuSeries.RemoveFirstYAndAddY(value);
            Invalidate();
        }
Exemplo n.º 2
0
        private void UpdateSeries()
        {
            long totalSentNow     = 0;
            long totalRecievedNow = 0;

            foreach (NetworkInterface ni in interfaces)
            {
                IPInterfaceStatistics iPInterfaceStatistics = ni.GetIPStatistics();
                totalSentNow     += iPInterfaceStatistics.BytesSent;
                totalRecievedNow += iPInterfaceStatistics.BytesReceived;
            }

            long deltaSentInKBytes     = (_totalSent == 0) ? 0 : (totalSentNow - _totalSent) / 1000;
            long deltaRecievedInKBytes = (_totalRecieved == 0) ? 0 : (totalRecievedNow - _totalRecieved) / 1000;

            long deltaSentInKBit     = (_totalSent == 0) ? 0 : (totalSentNow - _totalSent) / 1024 * 8;
            long deltaRecievedInKBit = (_totalRecieved == 0) ? 0 : (totalRecievedNow - _totalRecieved) / 1024 * 8;

            _totalSent     = totalSentNow;
            _totalRecieved = totalRecievedNow;

            _sentSeries.RemoveFirstYAndAddY(deltaSentInKBit);
            _recievedSeries.RemoveFirstYAndAddY(deltaRecievedInKBit);

            UpdateYLabels();

            Invalidate();
        }
Exemplo n.º 3
0
        private void UpdateSeries()
        {
            float freeRam = _ramCounter.NextValue();
            float usedRam = _totalRam - freeRam;
            float percent = usedRam / _totalRam * 100f;

            _series.RemoveFirstYAndAddY(percent);
            Invalidate();
        }