Пример #1
0
        /// <summary>
        /// Working method
        /// </summary>
        /// <param name="sender">Object</param>
        /// <param name="e">Argument (none)</param>
        private void BW_Integration_DoWork(object sender, DoWorkEventArgs e)
        {
            tos = new TOSortie(Files.Count, string.Empty, TypeTOSortie.General);
            foreach (string file in Files)
            {
                switch (Path.GetExtension(file))
                {
                /*
                 * case ".7z":
                 * case ".zip":
                 * case ".rar":
                 *  SevenZipExtractor ex = new SevenZipExtractor(file);
                 *  foreach (ArchiveFileInfo adata in ex.ArchiveFileData)
                 *  {
                 *      if (adata.FileName.EndsWith(".rar"))
                 *      {
                 *          MemoryStream ms = new MemoryStream();
                 *          ex.ExtractFile(adata.Index, ms);
                 *          SevenZipExtractor ex2 = new SevenZipExtractor(ms);
                 *          foreach (ArchiveFileInfo adata2 in ex2.ArchiveFileData)
                 *          {
                 *              if (adata.FileName == ".nds")
                 *              {
                 *
                 *              }
                 *          }
                 *      }
                 *  }
                 *  LocateFirstVolume(file);
                 *  SearchNdsInArchive(file);
                 *  break;
                 */
                case ".nds":
                case ".nd5":
                    string crc = GetCRC32FromFile(file);
                    NdsFileIntegration(file, crc);
                    break;

                default:
                    // nothing to do
                    break;
                }
            }
        }
Пример #2
0
 /// <summary>
 /// File Compression Started
 /// </summary>
 /// <param name="sender">Object</param>
 /// <param name="e">Argument</param>
 private void Cmp_FileCompressionStarted(object sender, FileNameEventArgs e)
 {
     tosCmp = new TOSortie(100, string.Format("Compressing \"{0}\" ...", e.FileName), TypeTOSortie.Zip);
 }
Пример #3
0
 /// <summary>
 /// szip_FileExtractionStarted
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="e">FileInfoEventArgs</param>
 private void Szip_FileExtractionStarted(object sender, FileInfoEventArgs e)
 {
     tosCmp = new TOSortie(100, string.Format("Extracting \"{0}\" ...", e.FileInfo.FileName), TypeTOSortie.Zip);
 }