From 0fb9878cff444c5db086fb5ac361c1c8012b065f Mon Sep 17 00:00:00 2001 From: rbalsleyMSFT <53497092+rbalsleyMSFT@users.noreply.github.com> Date: Tue, 17 Jun 2025 13:21:56 -0700 Subject: [PATCH] Refactor Windows settings function for clarity Renames the function for populating Windows settings UI controls to better reflect its purpose. The `Get-` verb more accurately describes the function's action of retrieving information from the ISO file, as opposed to the previous `Initialize-` verb. --- FFUDevelopment/BuildFFUVM_UI.ps1 | 8 ++++---- FFUDevelopment/FFUUI.Core/FFUUI.Core.WindowsSettings.psm1 | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/FFUDevelopment/BuildFFUVM_UI.ps1 b/FFUDevelopment/BuildFFUVM_UI.ps1 index 2152ec1..d045841 100644 --- a/FFUDevelopment/BuildFFUVM_UI.ps1 +++ b/FFUDevelopment/BuildFFUVM_UI.ps1 @@ -147,11 +147,11 @@ $window.Add_Loaded({ Initialize-DynamicUIElements -State $script:uiState - # Initialize Windows Settings UI using data from helper module - Initialize-WindowsSettingsCombos -isoPath $script:uiState.Defaults.windowsSettingsDefaults.DefaultISOPath -State $script:uiState # Use combined refresh function + # Get Windows Settings UI using data from helper module + Get-WindowsSettingsCombos -isoPath $script:uiState.Defaults.windowsSettingsDefaults.DefaultISOPath -State $script:uiState # Use combined refresh function - $script:uiState.Controls.txtISOPath.Add_TextChanged({ - Initialize-WindowsSettingsCombos -isoPath $script:uiState.Controls.txtISOPath.Text -State $script:uiState + $script:uiState.Controls.txtISOPath.Add_TextChanged({ + Get-WindowsSettingsCombos -isoPath $script:uiState.Controls.txtISOPath.Text -State $script:uiState }) $script:uiState.Controls.cmbWindowsRelease.Add_SelectionChanged({ $selectedReleaseValue = 11 # Default if null diff --git a/FFUDevelopment/FFUUI.Core/FFUUI.Core.WindowsSettings.psm1 b/FFUDevelopment/FFUUI.Core/FFUUI.Core.WindowsSettings.psm1 index 4ec556e..78750e4 100644 --- a/FFUDevelopment/FFUUI.Core/FFUUI.Core.WindowsSettings.psm1 +++ b/FFUDevelopment/FFUUI.Core/FFUUI.Core.WindowsSettings.psm1 @@ -463,7 +463,7 @@ function Update-WindowsSkuCombo { } # Combined function to initialize the Release, Version, and SKU combos -function Initialize-WindowsSettingsCombos { +function Get-WindowsSettingsCombos { param( [string]$isoPath, [Parameter(Mandatory = $true)]