mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-15 17:30:37 -06:00
remove trailing whitespaces
THX to Mr.K :)
This commit is contained in:
parent
0fc921cb7c
commit
172f893c9f
@ -64,5 +64,5 @@ function Install-WinUtilWinget {
|
|||||||
throw [WingetFailedInstall]::new('Failed to install!')
|
throw [WingetFailedInstall]::new('Failed to install!')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ function Invoke-WinUtilFeatureInstall {
|
|||||||
}
|
}
|
||||||
|
|
||||||
else{
|
else{
|
||||||
|
|
||||||
Write-Warning "Unable to Install $feature due to unhandled exception"
|
Write-Warning "Unable to Install $feature due to unhandled exception"
|
||||||
Write-Warning $psitem.Exception.StackTrace
|
Write-Warning $psitem.Exception.StackTrace
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ function Set-WinUtilTaskbaritem {
|
|||||||
- Set-WinUtilTaskbaritem -overlay "None"
|
- Set-WinUtilTaskbaritem -overlay "None"
|
||||||
Custom icon:
|
Custom icon:
|
||||||
- Set-WinUtilTaskbaritem -overlay "C:\path\to\icon.png"
|
- Set-WinUtilTaskbaritem -overlay "C:\path\to\icon.png"
|
||||||
|
|
||||||
.PARAMETER description
|
.PARAMETER description
|
||||||
Description to display on the taskbar item preview
|
Description to display on the taskbar item preview
|
||||||
Set-WinUtilTaskbaritem -description "This is a description"
|
Set-WinUtilTaskbaritem -description "This is a description"
|
||||||
@ -46,30 +46,30 @@ function Set-WinUtilTaskbaritem {
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Converts an image file to a Bitmap object
|
Converts an image file to a Bitmap object
|
||||||
|
|
||||||
.PARAMETER image
|
.PARAMETER image
|
||||||
The path to the image file to convert
|
The path to the image file to convert
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
ConvertTo-Bitmap -imageFilePath "C:\path\to\image.png"
|
ConvertTo-Bitmap -imageFilePath "C:\path\to\image.png"
|
||||||
#>
|
#>
|
||||||
param (
|
param (
|
||||||
$imageFilePath
|
$imageFilePath
|
||||||
)
|
)
|
||||||
|
|
||||||
# Read the image file as a byte array
|
# Read the image file as a byte array
|
||||||
$imageBytes = [System.IO.File]::ReadAllBytes($imageFilePath)
|
$imageBytes = [System.IO.File]::ReadAllBytes($imageFilePath)
|
||||||
|
|
||||||
# Convert the byte array to a Base64 string
|
# Convert the byte array to a Base64 string
|
||||||
$base64String = [System.Convert]::ToBase64String($imageBytes)
|
$base64String = [System.Convert]::ToBase64String($imageBytes)
|
||||||
|
|
||||||
# Create a streaming image by streaming the base64 string to a bitmap streamsource
|
# Create a streaming image by streaming the base64 string to a bitmap streamsource
|
||||||
$bitmap = New-Object System.Windows.Media.Imaging.BitmapImage
|
$bitmap = New-Object System.Windows.Media.Imaging.BitmapImage
|
||||||
$bitmap.BeginInit()
|
$bitmap.BeginInit()
|
||||||
$bitmap.StreamSource = [System.IO.MemoryStream][System.Convert]::FromBase64String($base64String)
|
$bitmap.StreamSource = [System.IO.MemoryStream][System.Convert]::FromBase64String($base64String)
|
||||||
$bitmap.EndInit()
|
$bitmap.EndInit()
|
||||||
$bitmap.Freeze()
|
$bitmap.Freeze()
|
||||||
|
|
||||||
# Return the bitmap object
|
# Return the bitmap object
|
||||||
return $bitmap
|
return $bitmap
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ function Invoke-WPFFeatureInstall {
|
|||||||
|
|
||||||
$sync.ProcessRunning = $false
|
$sync.ProcessRunning = $false
|
||||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" })
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" })
|
||||||
|
|
||||||
Write-Host "==================================="
|
Write-Host "==================================="
|
||||||
Write-Host "--- Features are Installed ---"
|
Write-Host "--- Features are Installed ---"
|
||||||
Write-Host "--- A Reboot may be required ---"
|
Write-Host "--- A Reboot may be required ---"
|
||||||
|
@ -28,9 +28,9 @@ function Invoke-WPFShortcut {
|
|||||||
else{
|
else{
|
||||||
$shell = "powershell.exe"
|
$shell = "powershell.exe"
|
||||||
}
|
}
|
||||||
|
|
||||||
$shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'"
|
$shellArgs = "-ExecutionPolicy Bypass -Command `"Start-Process $shell -verb runas -ArgumentList `'-Command `"irm https://christitus.com/win | iex`"`'"
|
||||||
|
|
||||||
$DestinationName = "WinUtil.lnk"
|
$DestinationName = "WinUtil.lnk"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user