From bc32a8a10eb4b3805f9da8bd741fc4d487ba21e4 Mon Sep 17 00:00:00 2001 From: rbalsleyMSFT <53497092+rbalsleyMSFT@users.noreply.github.com> Date: Wed, 16 Jul 2025 14:09:16 -0700 Subject: [PATCH] Adds browse button for Office configuration file Implements the click handler for the browse button associated with the Office configuration XML file path. This change enables users to select the configuration file via a file dialog, automatically populating the path into the text field and improving usability. --- FFUDevelopment/FFUUI.Core/FFUUI.Core.Handlers.psm1 | 10 ++++++++++ FFUDevelopment/FFUUI.Core/FFUUI.Core.Initialize.psm1 | 1 + 2 files changed, 11 insertions(+) diff --git a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Handlers.psm1 b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Handlers.psm1 index 718aefd..3e74e2e 100644 --- a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Handlers.psm1 +++ b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Handlers.psm1 @@ -553,6 +553,16 @@ function Register-EventHandlers { } }) + $State.Controls.btnBrowseOfficeConfigXMLFile.Add_Click({ + param($eventSource, $routedEventArgs) + $window = [System.Windows.Window]::GetWindow($eventSource) + $localState = $window.Tag + $selectedPath = Invoke-BrowseAction -Type 'OpenFile' -Title "Select Office Configuration XML File" -Filter "XML files (*.xml)|*.xml" + if ($selectedPath) { + $localState.Controls.txtOfficeConfigXMLFilePath.Text = $selectedPath + } + }) + $State.Controls.chkInstallOffice.Add_Checked({ param($eventSource, $routedEventArgs) $window = [System.Windows.Window]::GetWindow($eventSource) diff --git a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Initialize.psm1 b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Initialize.psm1 index 2d16dec..02f5365 100644 --- a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Initialize.psm1 +++ b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Initialize.psm1 @@ -118,6 +118,7 @@ function Initialize-UIControls { $State.Controls.txtProductKey = $window.FindName('txtProductKey') $State.Controls.txtOfficePath = $window.FindName('txtOfficePath') $State.Controls.txtOfficeConfigXMLFilePath = $window.FindName('txtOfficeConfigXMLFilePath') + $State.Controls.btnBrowseOfficeConfigXMLFile = $window.FindName('btnBrowseOfficeConfigXMLFile') $State.Controls.txtDriversFolder = $window.FindName('txtDriversFolder') $State.Controls.txtPEDriversFolder = $window.FindName('txtPEDriversFolder') $State.Controls.chkCopyPEDrivers = $window.FindName('chkCopyPEDrivers')