winutil/functions/public/Invoke-ScratchDialog.ps1
Mr.k 1891ea7966
Remove trailing whitespace characters (#2149)
* Remove All Trailing Whitespace Characters in '.ps1' Files

* Remove All Trailing Whitespace Characters in '.json' Files

* Remove All Trailing Whitespace Characters in '.yaml' Files

* Remove All Trailing Whitespace Characters in Different Files

* Remove Even More Trailing Whitespace Characters
2024-06-28 17:15:39 -05:00

30 lines
710 B
PowerShell

function Invoke-ScratchDialog {
<#
.SYNOPSIS
Enable Editable Text box Alternate Scartch path
.PARAMETER Button
#>
$sync.WPFMicrowinISOScratchDir.IsChecked
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null
$Dialog = New-Object System.Windows.Forms.FolderBrowserDialog
$Dialog.SelectedPath = $sync.MicrowinScratchDirBox.Text
$Dialog.ShowDialog()
$filePath = $Dialog.SelectedPath
Write-Host "No ISO is chosen+ $filePath"
if ([string]::IsNullOrEmpty($filePath))
{
Write-Host "No Folder had chosen"
return
}
$sync.MicrowinScratchDirBox.Text = Join-Path $filePath "\"
}