protected override void Dispose(bool disposing) { if (fs != null) { fs.Dispose(); } callbackCancelAsync = null; base.Dispose(disposing); }
public FileHashStream(string path, ReportProgressCallback callbackCancelAsync, DataGridViewProgressBarCell cell) { fs = new FileStream(path, FileMode.Open, FileAccess.Read); long length = fs.Length; fEnoughSize = length > 0x200000L; this.callbackCancelAsync = callbackCancelAsync; this.cell = cell; this.cell.FileSize = length; }
protected override void Dispose(bool disposing) { if(fs != null) { fs.Dispose(); } callbackCancelAsync = null; base.Dispose(disposing); }
public void ReportProgress(int percent) { ReportProgressCallback?.Invoke(percent); }