Compare commits

..

5 Commits

Author SHA1 Message Date
MyDrift
cd35c74896
Update functions/private/Set-WinUtilTaskbarItem.ps1
Co-authored-by: Mr.k <mineshtine28546271@gmail.com>
2024-07-14 13:13:23 +02:00
MyDrift
0ff05828e1 fix syntax 2024-07-14 13:06:51 +02:00
MyDrift
05e2946363
Update functions/private/Set-WinUtilTaskbarItem.ps1
Co-authored-by: Mr.k <mineshtine28546271@gmail.com>
2024-07-14 13:04:08 +02:00
MyDrift
1185d05bf1 fix 2024-07-14 09:28:27 +02:00
MyDrift
a1e4d203ce polish 2024-07-14 09:26:13 +02:00
3 changed files with 8 additions and 10 deletions

View File

@ -10,9 +10,7 @@ function Invoke-WinUtilFeatureInstall {
$CheckBox $CheckBox
) )
# $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 1/$using:CheckBox.Count }) $x = 0
x = 0
$CheckBox | ForEach-Object { $CheckBox | ForEach-Object {
if($sync.configs.feature.$psitem.feature){ if($sync.configs.feature.$psitem.feature){

View File

@ -1,11 +1,13 @@
function Set-WinUtilTaskbaritem {
<# <#
.SYNOPSIS .SYNOPSIS
Modifies the Taskbaritem of the WPF Form Modifies the Taskbaritem of the WPF Form
.PARAMETER state & value .PARAMETER state
Value can be between 0 and 1, 0 being no progress done yet and 1 being fully completed
State can be 'None' > No progress, 'Indeterminate' > Without value, 'Normal' > when using value, 'Error' > Red (when using value), 'Paused' > Yellow (when using value) State can be 'None' > No progress, 'Indeterminate' > Without value, 'Normal' > when using value, 'Error' > Red (when using value), 'Paused' > Yellow (when using value)
.PARAMETER value
Value can be between 0 and 1, 0 being no progress done yet and 1 being fully completed
.PARAMETER overlay .PARAMETER overlay
Overlay icon to display on the taskbar item Overlay icon to display on the taskbar item
@ -18,9 +20,6 @@
Set-WinUtilTaskbaritem -overlay "C:\path\to\icon.png" Set-WinUtilTaskbaritem -overlay "C:\path\to\icon.png"
#> #>
function Set-WinUtilTaskbaritem {
param ( param (
[double]$value, [double]$value,
$state, $state,

View File

@ -161,7 +161,8 @@ $logoPath = "$env:TEMP\cttlogo.png"
Invoke-WebRequest -Uri $logoUrl -OutFile $logoPath Invoke-WebRequest -Uri $logoUrl -OutFile $logoPath
# download the check # download the check
$CheckUrl = "https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/docs/assets/Check.png" $CheckUrl = "https://raw.githubusercontent.com/ChrisTitusTech/winutil/main/docs/assets/check.png"
# Download the image # Download the image
$CheckPath = "$env:TEMP\cttcheck.png" $CheckPath = "$env:TEMP\cttcheck.png"
Invoke-WebRequest -Uri $CheckUrl -OutFile $CheckPath Invoke-WebRequest -Uri $CheckUrl -OutFile $CheckPath
@ -446,7 +447,7 @@ $sync["SearchBar"].Add_TextChanged({
}) })
$sync["Form"].Add_Activated({ $sync["Form"].Add_Activated({
Set-WinUtilTaskbaritem -overlay $logoPath Set-WinUtilTaskbaritem -overlay $logoPath -state "None"
}) })
# Define event handler for button click # Define event handler for button click