mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
Add progress info to LoadZipFile()
Displays the progress of loading zip(apk) files on the progress bar
This commit is contained in:
parent
2a2216e2bf
commit
568daafc7f
@ -248,7 +248,7 @@ namespace AssetStudio
|
|||||||
|
|
||||||
private void LoadZipFile(FileReader reader)
|
private void LoadZipFile(FileReader reader)
|
||||||
{
|
{
|
||||||
Logger.Info("Loading " + reader.FileName);
|
Logger.Info("Reading " + reader.FileName);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (ZipArchive archive = new ZipArchive(reader.BaseStream, ZipArchiveMode.Read))
|
using (ZipArchive archive = new ZipArchive(reader.BaseStream, ZipArchiveMode.Read))
|
||||||
@ -303,6 +303,9 @@ namespace AssetStudio
|
|||||||
}
|
}
|
||||||
|
|
||||||
// load all entries
|
// load all entries
|
||||||
|
var progressCount = archive.Entries.Count;
|
||||||
|
int k = 0;
|
||||||
|
Progress.Reset();
|
||||||
foreach (ZipArchiveEntry entry in archive.Entries)
|
foreach (ZipArchiveEntry entry in archive.Entries)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -328,6 +331,7 @@ namespace AssetStudio
|
|||||||
resourceFileReaders.Add(entry.Name, entryReader);
|
resourceFileReaders.Add(entry.Name, entryReader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Progress.Report(++k, progressCount);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user