diff --git a/FFUDevelopment/BuildFFUVM_UI.ps1 b/FFUDevelopment/BuildFFUVM_UI.ps1
index 62fda88..833217f 100644
--- a/FFUDevelopment/BuildFFUVM_UI.ps1
+++ b/FFUDevelopment/BuildFFUVM_UI.ps1
@@ -12,171 +12,16 @@ Add-Type -AssemblyName PresentationCore,PresentationFramework
Add-Type -AssemblyName System.Windows.Forms # Added to load Windows Forms for OpenFileDialog
# Define the path to the info.png image
-$infoImagePath = "$PSScriptRoot\info.png"
+$infoImagePath = Join-Path -Path $PSScriptRoot -ChildPath "info.png"
-# Replace the XAML string with one that uses ToolTips instead of Popups and adjusts their placement
-$xamlString = @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+# Load the XAML from the external file
+$xamlPath = Join-Path -Path $PSScriptRoot -ChildPath "BuildFFUVM_UI.xaml"
+if (-Not (Test-Path $xamlPath)) {
+ Write-Error "XAML file not found at path: $xamlPath"
+ exit
+}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-"@
+$xamlString = Get-Content -Path $xamlPath -Raw
# Create the XmlReader
$reader = New-Object System.IO.StringReader($xamlString)
@@ -214,6 +59,40 @@ if ($cmbWindowsSKU.Items.Count -gt 0) {
Write-Host "No SKUs available to populate the ComboBox."
}
+# Function to set image sources
+function Set-ImageSource {
+ param (
+ [System.Windows.Window]$window,
+ [string]$imageName,
+ [string]$sourcePath
+ )
+ $image = $window.FindName($imageName)
+ if ($image) {
+ $uri = New-Object System.Uri($sourcePath, [System.UriKind]::Absolute)
+ $bitmap = New-Object System.Windows.Media.Imaging.BitmapImage($uri)
+ $image.Source = $bitmap
+ }
+}
+
+# List of Image control names
+$imageNames = @(
+ "imgFFUNameInfo",
+ "imgISOPathInfo",
+ "imgWindowsSKUInfo",
+ "imgVMSwitchNameInfo",
+ "imgVMHostIPAddressInfo",
+ "imgInstallOfficeInfo",
+ "imgInstallAppsInfo",
+ "imgInstallDriversInfo",
+ "imgCopyDriversInfo" # Added Image control for Copy Drivers
+ # Add any other Image control names here
+)
+
+# Set the Source for each Image control
+foreach ($imgName in $imageNames) {
+ Set-ImageSource -window $window -imageName $imgName -sourcePath $infoImagePath
+}
+
# Optional: Add logging for debugging purposes
# Uncomment the following lines to enable debug output
# Write-Host "Extracted SKU List: $skuList"
@@ -240,6 +119,7 @@ $runScriptHandler = {
$installOffice = $window.FindName('chkInstallOffice').IsChecked
$installApps = $window.FindName('chkInstallApps').IsChecked
$installDrivers = $window.FindName('chkInstallDrivers').IsChecked
+ $copyDrivers = $window.FindName('chkCopyDrivers').IsChecked # Retrieved Copy Drivers value
# Create config object
$config = @{
@@ -255,6 +135,7 @@ $runScriptHandler = {
InstallOffice = $installOffice
InstallApps = $installApps
InstallDrivers = $installDrivers
+ CopyDrivers = $copyDrivers # Added CopyDrivers to config
# ...include other parameters as needed
}
@@ -354,6 +235,7 @@ $btnBuildConfig.Add_Click({
InstallOffice = ($window.FindName('chkInstallOffice')).IsChecked
InstallApps = ($window.FindName('chkInstallApps')).IsChecked
InstallDrivers = ($window.FindName('chkInstallDrivers')).IsChecked
+ CopyDrivers = ($window.FindName('chkCopyDrivers')).IsChecked # Added CopyDrivers to config
# ...include other parameters as needed
}
diff --git a/FFUDevelopment/BuildFFUVM_UI.xaml b/FFUDevelopment/BuildFFUVM_UI.xaml
new file mode 100644
index 0000000..cfc9de7
--- /dev/null
+++ b/FFUDevelopment/BuildFFUVM_UI.xaml
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+