[GUI] Improve lzma progress report

This commit is contained in:
VaDiM
2026-03-02 17:25:34 +03:00
parent 0a381aff55
commit 094f1a4f9d
2 changed files with 8 additions and 3 deletions
@@ -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)
+6 -2
View File
@@ -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);
}