public void ExtractFile() { if (info.zipid != -1) { ArcsZipArcEntry zipEntry = TDCGExplorer.GetArcsDatabase().GetZip(info.zipid); string zipsource = Path.Combine(TDCGExplorer.GetSystemDatabase().zips_path, zipEntry.path); switch (Path.GetExtension(zipEntry.path.ToLower())) { case ".zip": using (IArchive arc = new ZipArchive()) { ExtractFile(arc, zipsource); } break; case ".rar": using (IArchive arc = new RarArchive()) { ExtractFile(arc, zipsource); } break; case ".lzh": using (IArchive arc = new LzhArchive()) { ExtractFile(arc, zipsource); } break; default: break; } } }