mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-01-24 14:34:15 +08:00
Reduce refresh UI controls
This commit is contained in:
parent
ca2eccc762
commit
a5ebf08a8c
@ -171,12 +171,12 @@ $form.Controls.Add($layout)
|
||||
|
||||
$progressBar.Value = [int][System.Math]::Truncate($percentage)
|
||||
$label.Text = [string]::Format("{0:0.00}%", $percentage)
|
||||
$label.Refresh()
|
||||
}
|
||||
|
||||
[System.ComponentModel.AsyncCompletedEventHandler]$downloadFileCompletedEventHandler = {
|
||||
param($sender, [System.ComponentModel.AsyncCompletedEventArgs]$CompletedEventArgs)
|
||||
if (!$form.IsDisposed) {
|
||||
$label.Refresh()
|
||||
if ($CompletedEventArgs.Cancelled) {
|
||||
$form.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
|
||||
} elseif ($CompletedEventArgs.Error -ne $null) {
|
||||
|
Loading…
Reference in New Issue
Block a user