mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-06-09 15:57:27 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user