void fileHashMaker_HashBlockProcessed(object sender, HasherEventArgs e) { int koef; string format; if (e.StreamBytes > 1000000) { koef = 1000000; format = "{0} of {1}MB Progress"; } else { koef = 1000; format = "{0} of {1}KB Progress"; } Console.Title = string.Format(format, e.BytesProcessed / koef, e.StreamBytes / koef); }
protected void OnHashComputed(HasherEventArgs e) { if (HashComputed != null) { HashComputed(this, e); } }
protected virtual void OnHashBlockProcessed(HasherEventArgs e) { if (HashBlockProcessed != null) { HashBlockProcessed(this, e); } }