protected virtual void OnFileReciveUpdate() { if (_currentFileStrem == null) { return; } FileReciveUpdateEventArgs args = new FileReciveUpdateEventArgs() { FileName = Path.GetFileName(_currentFileStrem.Name), CurrentSize = _currentFileStrem.Length, ExpectedSize = _expectedFileSize }; if (FileReciveUpdate != null) { FileReciveUpdate(this, args); } }
private static void OnFileReciveUpdate(object sender, FileReciveUpdateEventArgs args) { Console.Write("\r"); Console.Write(DrawProgressBar(args.CurrentSize, args.ExpectedSize)); }