/// <summary> /// Raise the complete file event /// </summary> /// <param name="file">The file name</param> void OnCompleteFile(string file) { CompletedFileHandler handler = CompletedFile; if (handler != null) { var args = new ScanEventArgs(file); handler(this, args); alive_ = args.ContinueRunning; } }
private void OnCompleteFile(string file) { CompletedFileHandler completedFile = CompletedFile; if (completedFile != null) { ScanEventArgs e = new ScanEventArgs(file); completedFile(this, e); alive_ = e.ContinueRunning; } }
// Token: 0x0600079C RID: 1948 RVA: 0x0002C5BC File Offset: 0x0002A7BC private void OnCompleteFile(string file) { CompletedFileHandler completedFile = this.CompletedFile; if (completedFile != null) { ScanEventArgs scanEventArgs = new ScanEventArgs(file); completedFile(this, scanEventArgs); this.alive_ = scanEventArgs.ContinueRunning; } }
/// <summary> /// Fires the <see cref="CompletedFile"/> delegate /// </summary> /// <param name="file">The file whose processing has been completed.</param> /// <returns>A boolean indicating if execution should continue or not.</returns> public bool OnCompletedFile(string file) { bool result = true; CompletedFileHandler handler = CompletedFile; if (handler != null) { ScanEventArgs args = new ScanEventArgs(file); handler(this, args); result = args.ContinueRunning; } return(result); }
public bool OnCompletedFile(string file) { bool result = true; CompletedFileHandler completedFile = CompletedFile; if (completedFile != null) { ScanEventArgs scanEventArgs = new ScanEventArgs(file); completedFile(this, scanEventArgs); result = scanEventArgs.ContinueRunning; } return(result); }
public bool OnCompletedFile(string file) { bool continueRunning = true; CompletedFileHandler completedFile = CompletedFile; if (completedFile != null) { ScanEventArgs e = new ScanEventArgs(file); completedFile(this, e); continueRunning = e.ContinueRunning; } return(continueRunning); }
static bool UncompressByFastZip(string orgPath, string tarPath, CompletedFileHandler progressFileHandle = null) { bool res = true; try { FastZipEvents events = new FastZipEvents(); if (progressFileHandle != null) { events.CompletedFile = progressFileHandle; } FastZip zipfile2 = new FastZip(events); zipfile2.ExtractZip(orgPath, tarPath, ""); } catch (Exception ex) { Debug.LogError(ex.Message); res = false; } return(res); }
/// <summary> /// 快速解压 /// </summary> /// <param name="zipFilePath">压缩文件路径</param> /// <param name="extractPath">解压路径</param> /// <param name="pwd">密码</param> /// <param name="progressFun">进程</param> /// <param name="seconds">触发时间</param> /// <param name="completeFun">压缩过程中执行的函数</param> public static void UnZip(string zipFilePath, string extractPath, string pwd, ProgressHandler progressFun, double seconds, CompletedFileHandler completeFun) { FastZipEvents events = new FastZipEvents(); if (progressFun != null) { events.Progress = progressFun; events.ProgressInterval = TimeSpan.FromSeconds(seconds); } if (completeFun != null) { events.CompletedFile = completeFun; } FastZip zip = new FastZip(events); zip.CreateEmptyDirectories = true; if (!string.IsNullOrEmpty(pwd)) { zip.Password = pwd; } zip.UseZip64 = UseZip64.On; zip.RestoreAttributesOnExtract = true; zip.RestoreDateTimeOnExtract = true; zip.ExtractZip(zipFilePath, extractPath, FastZip.Overwrite.Always, null, "", "", true); }