Remove -NoUi (#4572)

* Made -NoUi not exit the window

* Update start.ps1

* Update main.ps1

* Update main.ps1

* Update Set-WinUtilProgressbar.ps1

* Update Invoke-WPFImpex.ps1

* Update Invoke-WPFUIThread.ps1

* Update start.ps1

* Update Invoke-WPFUIThread.ps1

* Update main.ps1

* Update main.ps1
This commit is contained in:
Gabi
2026-06-08 18:02:35 +03:00
committed by GitHub
parent 7dfebba70f
commit 01ef78915a
5 changed files with 18 additions and 86 deletions
-11
View File
@@ -92,17 +92,6 @@ function Invoke-WPFImpex {
$sync.selectedFeatures = [System.Collections.Generic.List[string]]::new()
Update-WinUtilSelections -flatJson $flattenedJson
if (!$PARAM_NOUI) {
# Set flag so toggle Checked/Unchecked events don't trigger registry writes
# while we're programmatically restoring UI state from the imported config
$sync.ImportInProgress = $true
try {
Reset-WPFCheckBoxes -doToggles $true
} finally {
$sync.ImportInProgress = $false
}
}
}
} catch {
Write-Error "An error occurred while importing: $_"
+1 -19
View File
@@ -1,21 +1,3 @@
function Invoke-WPFUIThread {
<#
.SYNOPSIS
Creates and runs a task on Winutil's WPF Forms thread.
.PARAMETER ScriptBlock
The scriptblock to invoke in the thread
#>
[CmdletBinding()]
Param (
$ScriptBlock
)
if ($PARAM_NOUI) {
return;
}
function Invoke-WPFUIThread ($ScriptBlock) {
$sync.form.Dispatcher.Invoke([action]$ScriptBlock)
}