示例#1
0
        private void UpdateUsage()
        {
            long   data = source.BytesUsed - source.BytesMusic - source.BytesVideo;
            double cap  = (double)source.BytesCapacity;

            disk_bar.UpdateSegment(0, source.BytesMusic / cap);
            disk_bar.UpdateSegment(1, source.BytesVideo / cap);
            disk_bar.UpdateSegment(2, data / cap);
            disk_bar.UpdateSegment(3, (cap - source.BytesUsed) / cap);
        }
示例#2
0
        private void UpdateUsage()
        {
            var bytes_used  = source.BytesUsed;
            var bytes_music = source.BytesMusic;
            var bytes_video = source.BytesVideo;
            var cap         = (double)source.BytesCapacity;

            long data = bytes_used - bytes_music - bytes_video;

            disk_bar.UpdateSegment(0, bytes_music / cap);
            disk_bar.UpdateSegment(1, bytes_video / cap);
            disk_bar.UpdateSegment(2, data / cap);
            disk_bar.UpdateSegment(3, (cap - bytes_used) / cap);
        }
示例#3
0
        private void UpdateUsage()
        {
            var cap = (double)source.BytesCapacity;

            if (Math.Abs(cap) < 0.1)
            {
                return;
            }

            var bytes_used  = source.BytesUsed;
            var bytes_music = source.BytesMusic;

            long data = bytes_used - bytes_music;

            disk_bar.UpdateSegment(0, bytes_music / cap);
            disk_bar.UpdateSegment(1, data / cap);
            disk_bar.UpdateSegment(2, (cap - bytes_used) / cap);
        }