mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-03 03:23:31 -05:00
run preprocessing
This commit is contained in:
@ -2,10 +2,10 @@ function Set-CategoryVisibility {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Used to expand or collapse categories and corresponding apps on the install tab
|
||||
|
||||
|
||||
.PARAMETER Category
|
||||
Can eigther be a specific category name like "Browsers" OR "*" to affect all categories at once
|
||||
|
||||
|
||||
.PARAMETER overrideState
|
||||
"Expand" => expands the corresponding elements
|
||||
"Collapse" => collapses the corresponding elements
|
||||
@ -17,8 +17,8 @@ function Set-CategoryVisibility {
|
||||
[ValidateSet("Expand", "Collapse")]
|
||||
[string]$overrideState
|
||||
)
|
||||
|
||||
switch ($overrideState){
|
||||
|
||||
switch ($overrideState) {
|
||||
"Expand" {$state = $true}
|
||||
"Collapse" {$state = $false}
|
||||
default {$state = $sync.CompactView}
|
||||
@ -29,7 +29,7 @@ function Set-CategoryVisibility {
|
||||
if ($category -eq "*") {
|
||||
$items = $sync.ItemsControl.Items | Where-Object {($_.Tag -like "CategoryWrapPanel_*")}
|
||||
$sync.ItemsControl.Items | Where-Object {($_.Tag -eq "CategoryToggleButton")} | Foreach-Object { $_.Visibility = [Windows.Visibility]::Visible; $_.IsChecked = $state }
|
||||
|
||||
|
||||
} else {
|
||||
$items = $sync.ItemsControl.Items | Where-Object {($_.Tag -eq "CategoryWrapPanel_$Category")}
|
||||
}
|
||||
@ -41,4 +41,4 @@ function Set-CategoryVisibility {
|
||||
$items.Children | ForEach-Object {
|
||||
$_.Visibility = $elementVisibility
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user