WIP: correct lang display (not working rn)

This commit is contained in:
MyDrift 2024-09-05 06:52:11 +02:00
parent 6dbdfa67cd
commit 084ac9429d
2 changed files with 16 additions and 15 deletions

View File

@ -89,21 +89,6 @@ function Invoke-WPFGetIso {
& $fidopath -Win 'Windows 11' -Rel $sync["ISORelease"].SelectedItem -Arch "x64" -Lang $sync["ISOLanguage"].SelectedItem & $fidopath -Win 'Windows 11' -Rel $sync["ISORelease"].SelectedItem -Arch "x64" -Lang $sync["ISOLanguage"].SelectedItem
Set-Location $originalLocation Set-Location $originalLocation
$filePath = Get-ChildItem -Path "$env:temp" -Filter "Win11*.iso" | Sort-Object LastWriteTime -Descending | Select-Object -First 1 $filePath = Get-ChildItem -Path "$env:temp" -Filter "Win11*.iso" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
# WIP positioning, wont work as expected currently
$sync["ISOLanguage"].Items.Add($locale)
if ($locale -ne "en-US") {
$sync["ISOLanguage"].Items.Add("en-US")
}
$sync["ISOLanguage"].SelectedItem = $locale
if ($sync["ISOoption1"].IsChecked) {
$sync["ISORelease"].Visibility = [System.Windows.Visibility]::Visible
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Visible
} else {
$sync["ISORelease"].Visibility = [System.Windows.Visibility]::Collapsed
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Collapsed
}
} }
Write-Host "File path $($filePath)" Write-Host "File path $($filePath)"

View File

@ -486,6 +486,22 @@ $sync["Form"].Add_Activated({
Set-WinUtilTaskbaritem -overlay "logo" Set-WinUtilTaskbaritem -overlay "logo"
}) })
# WIP positioning, wont work as expected currently
$sync["ISOLanguage"].Items.Add($locale)
if ($locale -ne "en-US") {
$sync["ISOLanguage"].Items.Add("en-US")
}
$sync["ISOLanguage"].SelectedItem = $locale
if ($sync["ISOoption1"].IsChecked) {
$sync["ISORelease"].Visibility = [System.Windows.Visibility]::Visible
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Visible
} else {
$sync["ISORelease"].Visibility = [System.Windows.Visibility]::Collapsed
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Collapsed
}
# Define event handler for button click # Define event handler for button click
$sync["SettingsButton"].Add_Click({ $sync["SettingsButton"].Add_Click({
Write-Debug "SettingsButton clicked" Write-Debug "SettingsButton clicked"