mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-15 17:30:37 -06:00
little fix
This commit is contained in:
parent
c914a7bc79
commit
210d288035
@ -45,13 +45,6 @@ function Invoke-WPFUIElements {
|
|||||||
$targetGrid.ColumnDefinitions.Add($colDef) | Out-Null
|
$targetGrid.ColumnDefinitions.Add($colDef) | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only apply the logic for distributing entries across columns if the targetGridName is "appspanel"
|
|
||||||
if ($targetGridName -eq "appspanel") {
|
|
||||||
$panelcount = 0
|
|
||||||
$entrycount = $configHashtable.Keys.Count + $organizedData["0"].Keys.Count
|
|
||||||
$maxcount = [Math]::Round($entrycount / $columncount + 0.5)
|
|
||||||
}
|
|
||||||
|
|
||||||
# Convert PSCustomObject to Hashtable
|
# Convert PSCustomObject to Hashtable
|
||||||
$configHashtable = @{}
|
$configHashtable = @{}
|
||||||
$configVariable.PSObject.Properties.Name | ForEach-Object {
|
$configVariable.PSObject.Properties.Name | ForEach-Object {
|
||||||
@ -90,6 +83,13 @@ function Invoke-WPFUIElements {
|
|||||||
|
|
||||||
# Store application data in an array under the category
|
# Store application data in an array under the category
|
||||||
$organizedData[$entryObject.Panel][$entryObject.Category] += $entryObject
|
$organizedData[$entryObject.Panel][$entryObject.Category] += $entryObject
|
||||||
|
|
||||||
|
# Only apply the logic for distributing entries across columns if the targetGridName is "appspanel"
|
||||||
|
if ($targetGridName -eq "appspanel") {
|
||||||
|
$panelcount = 0
|
||||||
|
$entrycount = $configHashtable.Keys.Count + $organizedData["0"].Keys.Count
|
||||||
|
$maxcount = [Math]::Round($entrycount / $columncount + 0.5)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Iterate through 'organizedData' by panel, category, and application
|
# Iterate through 'organizedData' by panel, category, and application
|
||||||
|
Loading…
Reference in New Issue
Block a user