protected override StringArrayList ExtractArchive() { StringArrayList ret = new StringArrayList(); Ambertation.SevenZip.IO.CommandlineArchive a = new Ambertation.SevenZip.IO.CommandlineArchive(this.ArchiveName); Ambertation.SevenZip.IO.ArchiveFile[] content = a.ListContent(); a.Extract(SimPe.Helper.SimPeTeleportPath, false); foreach (Ambertation.SevenZip.IO.ArchiveFile desc in content) { string rname = System.IO.Path.Combine(Helper.SimPeTeleportPath, desc.Name); if (System.IO.File.Exists(rname)) { ret.Add(rname); } } return(ret); }
HandlerRegistry() { reg = new Hashtable(); subreg = new Hashtable(); AddFilehandler(ExtensionType.Package, typeof(PackageHandler)); AddFilehandler(ExtensionType.DisabledPackage, typeof(PackageHandler)); AddFilehandler(ExtensionType.Sim2Pack, typeof(PackageHandler)); Ambertation.SevenZip.IO.CommandlineArchive a = new Ambertation.SevenZip.IO.CommandlineArchive(""); foreach (string ext in a.SupportedForUnpack) { this.AddFileHandler(ext, typeof(SevenZipHandler)); } this.AddTypeHandler(SimPe.Cache.PackageType.Lot, typeof(LotTypeHandler)); this.AddTypeHandler(SimPe.Cache.PackageType.Wallpaper, typeof(WallpaperTypeHandler)); this.AddTypeHandler(SimPe.Cache.PackageType.Floor, typeof(WallpaperTypeHandler)); this.AddTypeHandler(SimPe.Cache.PackageType.Roof, typeof(WallpaperTypeHandler)); this.AddTypeHandler(SimPe.Cache.PackageType.Terrain, typeof(WallpaperTypeHandler)); this.AddTypeHandler(SimPe.Cache.PackageType.Sim, typeof(SimTypeHandler)); this.AddTypeHandler(SimPe.Cache.PackageType.Neighborhood, typeof(NeighborhoodTypeHandler)); this.AddTypeHandler(SimPe.Cache.PackageType.Recolor, typeof(RecolorTypeHandler)); }