mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-10 01:51:18 +10:00
* Clean up analyzer warnings * Align analyzer warning cleanup policy * Run PSScriptAnalyzer directly in unittests workflow * Bind lazy-rendered buttons to click handlers * Remove WinUtil performance tracing * Fix Win11 ISO creator temp directory reuse
40 lines
1.3 KiB
PowerShell
40 lines
1.3 KiB
PowerShell
function Initialize-WinUtilTabContent {
|
|
param(
|
|
[Parameter(Mandatory = $true)]
|
|
[string]$TabName
|
|
)
|
|
|
|
if ($null -eq $sync.InitializedTabs) {
|
|
$sync.InitializedTabs = @{}
|
|
}
|
|
|
|
if ($sync.InitializedTabs[$TabName]) {
|
|
return
|
|
}
|
|
|
|
switch ($TabName) {
|
|
"Install" {
|
|
Invoke-WPFUIElements -configVariable $sync.configs.appnavigation -targetGridName "appscategory" -columncount 1
|
|
Initialize-WPFUI -targetGridName "appscategory"
|
|
|
|
Initialize-WPFUI -targetGridName "appspanel"
|
|
}
|
|
"Tweaks" {
|
|
Invoke-WPFUIElements -configVariable $sync.configs.tweaks -targetGridName "tweakspanel" -columncount 2
|
|
}
|
|
"Config" {
|
|
Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "featurespanel" -columncount 2
|
|
}
|
|
"AppX" {
|
|
Invoke-WPFUIElements -configVariable $sync.configs.appx -targetGridName "appxpanel" -columncount 2
|
|
}
|
|
"Win11 Creator" {
|
|
if ($sync.Form -and $sync.Form.Dispatcher) {
|
|
$sync.Form.Dispatcher.BeginInvoke([System.Windows.Threading.DispatcherPriority]::Background, [action]{ Invoke-WinUtilISOCheckExistingWork }) | Out-Null
|
|
}
|
|
}
|
|
}
|
|
|
|
$sync.InitializedTabs[$TabName] = $true
|
|
}
|