private bool Execute_ZIP() { bool bRet = false; fs.Common.ZIP.ZIP oZIP = null; try { oZIP = new fs.Common.ZIP.ZIP(this.FilePath); oZIP.Create(this.WorkingFolder); string[] aFiles = System.IO.Directory.GetFiles(this.WorkingFolder); this.Progress.ProgressStart(aFiles.Length); foreach (string sFile in aFiles) { this.Progress.Progress(); oZIP.AddFile(sFile); } bRet = oZIP.Save(); } catch (Exception ex) { throw ex; } finally { oZIP.Dispose(); oZIP = null; } return(bRet); }
private bool Execute_UNZIP() { bool bRet = false; fs.Common.ZIP.ZIP oZIP = null; try { oZIP = new fs.Common.ZIP.ZIP(this.FilePath); oZIP.Extract(this.WorkingFolder); } catch (Exception ex) { throw ex; } finally { oZIP.Dispose(); oZIP = null; } return(bRet); }