123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
-
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ANT_Managed_Library.ANTFS
- {
-
-
-
- public class TransferStatus
- {
- private uint myByteProgress;
- private uint myTotalLength;
- private byte myPercentage;
-
-
-
-
-
- public TransferStatus(uint Progress, uint Length)
- {
- this.myByteProgress = Progress;
- this.myTotalLength = Length;
- if (Length != 0)
- this.myPercentage = (byte)Math.Round(((decimal)Progress / (decimal)Length) * 100);
- else
- this.myPercentage = 0;
- }
-
-
-
- public uint ByteProgress
- {
- get { return myByteProgress; }
- }
-
-
-
- public uint TotalLength
- {
- get { return myTotalLength; }
- }
-
-
-
- public byte Percentage
- {
- get { return myPercentage; }
- }
-
-
-
-
- public override string ToString()
- {
- return "Transfer Status: (" + myByteProgress + "/" + myTotalLength + ") ... " + myPercentage + '%';
- }
- }
- }
|