diff --git a/functions/private/Initalize-InstallAppEntry.ps1 b/functions/private/Initalize-InstallAppEntry.ps1 index 864925f5..09aa732f 100644 --- a/functions/private/Initalize-InstallAppEntry.ps1 +++ b/functions/private/Initalize-InstallAppEntry.ps1 @@ -5,19 +5,19 @@ function Initialize-InstallAppEntry { Used to as part of the Install Tab UI generation .PARAMETER TargetElement The Element into which the Apps should be placed - .PARAMETER AppKey + .PARAMETER appKey The Key of the app inside the $sync.configs.applicationsHashtable #> param( [Windows.Controls.WrapPanel]$TargetElement, - $AppKey + $appKey ) # Create the outer Border for the application type $border = New-Object Windows.Controls.Border $border.Style = $sync.Form.Resources.AppTileBorderStyle - $border.Tag = $AppKey - $border.ToolTip = $Apps.$AppKey.description + $border.Tag = $appKey + $border.ToolTip = $Apps.$appKey.description $border.Add_MouseUp({ $childCheckbox = ($this.Child.Children | Where-Object {$_.Template.TargetType -eq [System.Windows.Controls.Checkbox]})[0] $childCheckBox.isChecked = -not $childCheckbox.IsChecked @@ -39,7 +39,7 @@ function Initialize-InstallAppEntry { # Create the CheckBox, vertically centered $checkBox = New-Object Windows.Controls.CheckBox - $checkBox.Name = $AppKey + $checkBox.Name = $appKey $checkbox.Style = $sync.Form.Resources.AppTileCheckboxStyle $checkbox.Add_Checked({ Invoke-WPFSelectedAppsUpdate -type "Add" -checkbox $this @@ -52,7 +52,7 @@ function Initialize-InstallAppEntry { $borderElement = $this.Parent.Parent $borderElement.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallUnselectedColor") }) - + # Create a StackPanel for the image and name $imageAndNamePanel = New-Object Windows.Controls.StackPanel $imageAndNamePanel.Orientation = "Horizontal" @@ -69,7 +69,7 @@ function Initialize-InstallAppEntry { # Create the TextBlock for the application name $appName = New-Object Windows.Controls.TextBlock $appName.Style = $sync.Form.Resources.AppTileNameStyle - $appName.Text = $Apps.$AppKey.content + $appName.Text = $Apps.$appKey.content $imageAndNamePanel.Children.Add($appName) | Out-Null # Add the image and name panel to the Checkbox @@ -122,7 +122,7 @@ function Initialize-InstallAppEntry { }) } } - } + } # Add the button panel to the DockPanel $dockPanel.Children.Add($buttonPanel) | Out-Null diff --git a/functions/public/Invoke-WPFUIApps.ps1 b/functions/public/Invoke-WPFUIApps.ps1 index 43fc7e4f..e339277f 100644 --- a/functions/public/Invoke-WPFUIApps.ps1 +++ b/functions/public/Invoke-WPFUIApps.ps1 @@ -10,13 +10,9 @@ function Invoke-WPFUIApps { switch ($TargetGridName) { "appspanel" { $dockPanel = Initialize-InstallAppsMainElement -TargetGridName $TargetGridName - $null = Initialize-InstallHeader -TargetElement $dockPanel - $sync.ItemsControl = Initialize-InstallAppArea -TargetElement $dockPanel - Initialize-InstallCategoryAppList -TargetElement $sync.ItemsControl -Apps $Apps - } default { Write-Output "$TargetGridName not yet implemented" diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 7b280cfc..830567db 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -45,7 +45,6 @@ class GenericException : Exception { [string]$additionalData GenericException($Message) : base($Message) {} } -log_time_taken "Main.ps1 class setup line 48" $inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^> $sync.log - $sync.start_time = $current_time -} - # Set DebugPreference based on the -Debug switch if ($Debug) { $DebugPreference = "Continue" @@ -44,8 +34,6 @@ Add-Type -AssemblyName System.Windows.Forms # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) -$sync.log = "$ENV:USERPROFILE\Desktop\winutil.log" -$sync.start_time = Get-Date $sync.PSScriptRoot = $PSScriptRoot $sync.version = "#{replaceme}" $sync.configs = @{} @@ -100,5 +88,3 @@ Start-Transcript -Path "$logdir\winutil_$dateTime.log" -Append -NoClobber | Out- # Set PowerShell window title $Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Admin)" clear-host -Write-Output "" > $sync.log -log_time_taken "Start.ps1 finished" \ No newline at end of file diff --git a/xaml/inputXML.xaml b/xaml/inputXML.xaml index 528b3b9b..1dcbafe1 100644 --- a/xaml/inputXML.xaml +++ b/xaml/inputXML.xaml @@ -135,9 +135,9 @@ -