Esempio n. 1
0
        private double GetPercentageNetwork()
        {
            if (_networkCounter == null)
            {
                return(0d);
            }
            double bytes = ((double)_networkCounter.NextValue());

            double value = ((double)bytes * 8) / 1000000;

            if (_networkMax < value)
            {
                _networkMax = value;
            }

            DisplayNetwork = BitHelper.DisplayByte(bytes);

            return(value * 100 / _networkMax);
        }