remove trailing whitespaces

THX to Mr.K :)
This commit is contained in:
MyDrift 2024-07-15 19:16:20 +02:00
parent 0fc921cb7c
commit 172f893c9f
5 changed files with 12 additions and 12 deletions

View File

@ -64,5 +64,5 @@ function Install-WinUtilWinget {
throw [WingetFailedInstall]::new('Failed to install!')
}
}
}

View File

@ -26,7 +26,7 @@ function Invoke-WinUtilFeatureInstall {
}
else{
Write-Warning "Unable to Install $feature due to unhandled exception"
Write-Warning $psitem.Exception.StackTrace
}

View File

@ -29,7 +29,7 @@ function Set-WinUtilTaskbaritem {
- Set-WinUtilTaskbaritem -overlay "None"
Custom icon:
- Set-WinUtilTaskbaritem -overlay "C:\path\to\icon.png"
.PARAMETER description
Description to display on the taskbar item preview
Set-WinUtilTaskbaritem -description "This is a description"
@ -46,30 +46,30 @@ function Set-WinUtilTaskbaritem {
<#
.SYNOPSIS
Converts an image file to a Bitmap object
.PARAMETER image
The path to the image file to convert
.EXAMPLE
ConvertTo-Bitmap -imageFilePath "C:\path\to\image.png"
#>
param (
$imageFilePath
)
# Read the image file as a byte array
$imageBytes = [System.IO.File]::ReadAllBytes($imageFilePath)
# Convert the byte array to a Base64 string
$base64String = [System.Convert]::ToBase64String($imageBytes)
# Create a streaming image by streaming the base64 string to a bitmap streamsource
$bitmap = New-Object System.Windows.Media.Imaging.BitmapImage
$bitmap.BeginInit()
$bitmap.StreamSource = [System.IO.MemoryStream][System.Convert]::FromBase64String($base64String)
$bitmap.EndInit()
$bitmap.Freeze()
# Return the bitmap object
return $bitmap
}

View File

@ -27,7 +27,7 @@ function Invoke-WPFFeatureInstall {
$sync.ProcessRunning = $false
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" })
Write-Host "==================================="
Write-Host "--- Features are Installed ---"
Write-Host "--- A Reboot may be required ---"

View File

@ -28,9 +28,9 @@ function Invoke-WPFShortcut {
else{
$shell = "powershell.exe"
}
$shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'"
$DestinationName = "WinUtil.lnk"
}