public void SetProperty(NetworkMeasureProperty prop, string val) { long dbVal = long.Parse(val); switch (prop) { case NetworkMeasureProperty.DownloadRate: case NetworkMeasureProperty.CurrentDownload: case NetworkMeasureProperty.CurrentUpload: case NetworkMeasureProperty.UploadRate: case NetworkMeasureProperty.TrafficMaxLimit: SetProperty(prop, Octet.FromOctet(dbVal)); break; case NetworkMeasureProperty.StartDay: SetProperty(prop, Convert.ToInt32(dbVal)); break; } }
public static Octet FromKilo(long kilo) => Octet.FromOctet(kilo * coef);
public static Octet operator /(Octet a, long b) { return(Octet.FromOctet(a.GetOctets() / b)); }
public static Octet operator -(Octet a, Octet b) { return(Octet.FromOctet(a.GetOctets() - b.GetOctets())); }