mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-14 11:18:47 -05:00
[GUI] Improve lzma progress report
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// LzmaDecoder.cs
|
||||
// LzmaDecoder.cs
|
||||
|
||||
using System;
|
||||
using AssetStudio;
|
||||
@@ -349,6 +349,7 @@ namespace SevenZip.Compression.LZMA
|
||||
m_OutWindow.Flush();
|
||||
m_OutWindow.ReleaseStream();
|
||||
m_RangeDecoder.ReleaseStream();
|
||||
Progress.Reset(index: 1);
|
||||
}
|
||||
|
||||
public void SetDecoderProperties(byte[] properties)
|
||||
|
||||
@@ -1560,9 +1560,11 @@ namespace AssetStudioGUI
|
||||
{
|
||||
BeginInvoke(new Action(() =>
|
||||
{
|
||||
progressBar1.Refresh();
|
||||
if (value == 0)
|
||||
return;
|
||||
using (var graphics = progressBar1.CreateGraphics())
|
||||
{
|
||||
progressBar1.Refresh();
|
||||
var rect = new Rectangle(0, 0, progressBar1.Width, progressBar1.Height);
|
||||
graphics.DrawString(str, progressBarTextFont, progressBarTextBrush, rect, progressBarTextFormat);
|
||||
}
|
||||
@@ -1570,9 +1572,11 @@ namespace AssetStudioGUI
|
||||
}
|
||||
else
|
||||
{
|
||||
progressBar1.Refresh();
|
||||
if (value == 0)
|
||||
return;
|
||||
using (var graphics = progressBar1.CreateGraphics())
|
||||
{
|
||||
progressBar1.Refresh();
|
||||
var rect = new Rectangle(0, 0, progressBar1.Width, progressBar1.Height);
|
||||
graphics.DrawString(str, progressBarTextFont, progressBarTextBrush, rect, progressBarTextFormat);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user