mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-02 19:13:30 -05:00
Compare commits
1 Commits
48f1c71584
...
revert-329
Author | SHA1 | Date | |
---|---|---|---|
986376c44a |
@ -701,7 +701,7 @@
|
|||||||
"content": "GIMP (Image Editor)",
|
"content": "GIMP (Image Editor)",
|
||||||
"description": "GIMP is a versatile open-source raster graphics editor used for tasks such as photo retouching, image editing, and image composition.",
|
"description": "GIMP is a versatile open-source raster graphics editor used for tasks such as photo retouching, image editing, and image composition.",
|
||||||
"link": "https://www.gimp.org/",
|
"link": "https://www.gimp.org/",
|
||||||
"winget": "GIMP.GIMP.3"
|
"winget": "GIMP.GIMP"
|
||||||
},
|
},
|
||||||
"git": {
|
"git": {
|
||||||
"category": "Development",
|
"category": "Development",
|
||||||
|
@ -3812,6 +3812,6 @@
|
|||||||
|
|
||||||
Write-Host Please sign out and back in, or restart your computer to apply the changes!
|
Write-Host Please sign out and back in, or restart your computer to apply the changes!
|
||||||
"
|
"
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
function Get-WinUtilSelectedPackages
|
|
||||||
{
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Sorts given packages based on installer preference and availability.
|
|
||||||
|
|
||||||
.OUTPUTS
|
|
||||||
Hashtable. Key = Package Manager, Value = ArrayList of packages to install
|
|
||||||
#>
|
|
||||||
param (
|
|
||||||
[Parameter(Mandatory=$true)]
|
|
||||||
$PackageList,
|
|
||||||
[Parameter(Mandatory=$true)]
|
|
||||||
[PackageManagers]$Preference
|
|
||||||
)
|
|
||||||
|
|
||||||
if ($PackageList.count -eq 1) {
|
|
||||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" })
|
|
||||||
} else {
|
|
||||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" })
|
|
||||||
}
|
|
||||||
|
|
||||||
$packages = [System.Collections.Hashtable]::new()
|
|
||||||
$packagesWinget = [System.Collections.ArrayList]::new()
|
|
||||||
$packagesChoco = [System.Collections.ArrayList]::new()
|
|
||||||
$packages[[PackageManagers]::Winget] = $packagesWinget
|
|
||||||
$packages[[PackageManagers]::Choco] = $packagesChoco
|
|
||||||
|
|
||||||
Write-Debug "Checking packages using Preference '$($Preference)'"
|
|
||||||
|
|
||||||
foreach ($package in $PackageList) {
|
|
||||||
switch ($Preference) {
|
|
||||||
"Choco" {
|
|
||||||
if ($package.choco -eq "na") {
|
|
||||||
Write-Debug "$($package.content) has no Choco value."
|
|
||||||
$packagesWinget.add($package.winget)
|
|
||||||
Write-Host "Queueing $($package.winget) for Winget"
|
|
||||||
} else {
|
|
||||||
$null = $packagesChoco.add($package.choco)
|
|
||||||
Write-Host "Queueing $($package.choco) for Chocolatey"
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
"Winget" {
|
|
||||||
if ($package.winget -eq "na") {
|
|
||||||
Write-Debug "$($package.content) has no Winget value."
|
|
||||||
$packagesChoco.add($package.choco)
|
|
||||||
Write-Host "Queueing $($package.choco) for Chocolatey"
|
|
||||||
} else {
|
|
||||||
$null = $packagesWinget.add($($package.winget))
|
|
||||||
Write-Host "Queueing $($package.winget) for Winget"
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $packages
|
|
||||||
}
|
|
@ -73,7 +73,7 @@ function Initialize-InstallCategoryAppList {
|
|||||||
$wrapPanel.Visibility = [Windows.Visibility]::Collapsed
|
$wrapPanel.Visibility = [Windows.Visibility]::Collapsed
|
||||||
$wrapPanel.Tag = "CategoryWrapPanel_$category"
|
$wrapPanel.Tag = "CategoryWrapPanel_$category"
|
||||||
$null = $TargetElement.Items.Add($wrapPanel)
|
$null = $TargetElement.Items.Add($wrapPanel)
|
||||||
$appsByCategory[$category] |Sort-Object | ForEach-Object {
|
$appsByCategory[$category] | ForEach-Object {
|
||||||
$sync.$_ = $(Initialize-InstallAppEntry -TargetElement $wrapPanel -AppKey $_)
|
$sync.$_ = $(Initialize-InstallAppEntry -TargetElement $wrapPanel -AppKey $_)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
function Set-PackageManagerPreference {
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Sets the currently selected package manager to global "ManagerPreference" in sync.
|
|
||||||
Also persists preference across Winutil restarts via preference.ini.
|
|
||||||
|
|
||||||
Reads from preference.ini if no argument sent.
|
|
||||||
|
|
||||||
.PARAMETER preferedPackageManager
|
|
||||||
The PackageManager that was selected.
|
|
||||||
#>
|
|
||||||
param(
|
|
||||||
[Parameter(Position=0, Mandatory=$false)]
|
|
||||||
[PackageManagers]$preferedPackageManager
|
|
||||||
)
|
|
||||||
|
|
||||||
$preferencePath = "$env:LOCALAPPDATA\winutil\preferences.ini"
|
|
||||||
$oldChocoPath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini"
|
|
||||||
|
|
||||||
#Try loading from file if no argument given.
|
|
||||||
if ($null -eq $preferedPackageManager) {
|
|
||||||
# Backwards compat for preferChocolatey.ini
|
|
||||||
if (Test-Path -Path $oldChocoPath) {
|
|
||||||
$preferedPackageManager = [PackageManagers]::Choco
|
|
||||||
Remove-Item -Path $oldChocoPath
|
|
||||||
}
|
|
||||||
elseif (Test-Path -Path $preferencePath) {
|
|
||||||
$potential = Get-Content -Path $preferencePath -TotalCount 1
|
|
||||||
$preferedPackageManager = [PackageManagers]$potential
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Debug "Creating new preference file, defaulting to winget."
|
|
||||||
$preferedPackageManager = [PackageManagers]::Winget
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$sync["ManagerPreference"] = [PackageManagers]::$preferedPackageManager
|
|
||||||
Write-Debug "Manager Preference changed to '$($sync["ManagerPreference"])'"
|
|
||||||
|
|
||||||
|
|
||||||
# Write preference to file to persist across restarts.
|
|
||||||
Out-File -FilePath $preferencePath -InputObject $sync["ManagerPreference"]
|
|
||||||
}
|
|
@ -18,15 +18,15 @@ function Invoke-WPFGetInstalled {
|
|||||||
if (($sync.ChocoRadioButton.IsChecked -eq $false) -and ((Test-WinUtilPackageManager -winget) -eq "not-installed") -and $checkbox -eq "winget") {
|
if (($sync.ChocoRadioButton.IsChecked -eq $false) -and ((Test-WinUtilPackageManager -winget) -eq "not-installed") -and $checkbox -eq "winget") {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
$managerPreference = $sync["ManagerPreference"]
|
$preferChoco = $sync.ChocoRadioButton.IsChecked
|
||||||
$sync.ItemsControl.Dispatcher.Invoke([action] {
|
$sync.ItemsControl.Dispatcher.Invoke([action] {
|
||||||
$sync.ItemsControl.Items | ForEach-Object { $_.Visibility = [Windows.Visibility]::Collapsed }
|
$sync.ItemsControl.Items | ForEach-Object { $_.Visibility = [Windows.Visibility]::Collapsed }
|
||||||
$null = $sync.itemsControl.Items.Add($sync.LoadingLabel)
|
$null = $sync.itemsControl.Items.Add($sync.LoadingLabel)
|
||||||
})
|
})
|
||||||
Invoke-WPFRunspace -ParameterList @(("managerPreference", $managerPreference),("checkbox", $checkbox),("ShowOnlyCheckedApps", ${function:Show-OnlyCheckedApps})) -DebugPreference $DebugPreference -ScriptBlock {
|
Invoke-WPFRunspace -ParameterList @(("preferChoco", $preferChoco),("checkbox", $checkbox),("ShowOnlyCheckedApps", ${function:Show-OnlyCheckedApps})) -DebugPreference $DebugPreference -ScriptBlock {
|
||||||
param (
|
param (
|
||||||
[string]$checkbox,
|
[string]$checkbox,
|
||||||
[PackageManagers]$managerPreference,
|
[boolean]$preferChoco,
|
||||||
[scriptblock]$ShowOnlyCheckedApps
|
[scriptblock]$ShowOnlyCheckedApps
|
||||||
)
|
)
|
||||||
$sync.ProcessRunning = $true
|
$sync.ProcessRunning = $true
|
||||||
@ -34,10 +34,8 @@ function Invoke-WPFGetInstalled {
|
|||||||
|
|
||||||
if ($checkbox -eq "winget") {
|
if ($checkbox -eq "winget") {
|
||||||
Write-Host "Getting Installed Programs..."
|
Write-Host "Getting Installed Programs..."
|
||||||
switch ($managerPreference) {
|
if ($preferChoco) { $Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox "choco" }
|
||||||
"Choco"{$Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox "choco"; break}
|
else { $Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox $checkbox }
|
||||||
"Winget"{$Checkboxes = Invoke-WinUtilCurrentSystem -CheckBox $checkbox; break}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
elseif ($checkbox -eq "tweaks") {
|
elseif ($checkbox -eq "tweaks") {
|
||||||
Write-Host "Getting Installed Tweaks..."
|
Write-Host "Getting Installed Tweaks..."
|
||||||
|
@ -21,16 +21,40 @@ function Invoke-WPFInstall {
|
|||||||
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
[System.Windows.MessageBox]::Show($WarningMsg, $AppTitle, [System.Windows.MessageBoxButton]::OK, [System.Windows.MessageBoxImage]::Warning)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
$ChocoPreference = $($sync.ChocoRadioButton.IsChecked)
|
||||||
|
$installHandle = Invoke-WPFRunspace -ParameterList @(("PackagesToInstall", $PackagesToInstall),("ChocoPreference", $ChocoPreference)) -DebugPreference $DebugPreference -ScriptBlock {
|
||||||
|
param($PackagesToInstall, $ChocoPreference, $DebugPreference)
|
||||||
|
if ($PackagesToInstall.count -eq 1) {
|
||||||
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" })
|
||||||
|
} else {
|
||||||
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" })
|
||||||
|
}
|
||||||
|
$packagesWinget, $packagesChoco = {
|
||||||
|
$packagesWinget = [System.Collections.ArrayList]::new()
|
||||||
|
$packagesChoco = [System.Collections.ArrayList]::new()
|
||||||
|
|
||||||
$ManagerPreference = $sync["ManagerPreference"]
|
foreach ($package in $PackagesToInstall) {
|
||||||
|
if ($ChocoPreference) {
|
||||||
Invoke-WPFRunspace -ParameterList @(("PackagesToInstall", $PackagesToInstall),("ManagerPreference", $ManagerPreference)) -DebugPreference $DebugPreference -ScriptBlock {
|
if ($package.choco -eq "na") {
|
||||||
param($PackagesToInstall, $ManagerPreference, $DebugPreference)
|
$packagesWinget.add($package.winget)
|
||||||
|
Write-Host "Queueing $($package.winget) for Winget install"
|
||||||
$packagesSorted = Get-WinUtilSelectedPackages -PackageList $PackagesToInstall -Preference $ManagerPreference
|
} else {
|
||||||
|
$null = $packagesChoco.add($package.choco)
|
||||||
$packagesWinget = $packagesSorted[[PackageManagers]::Winget]
|
Write-Host "Queueing $($package.choco) for Chocolatey install"
|
||||||
$packagesChoco = $packagesSorted[[PackageManagers]::Choco]
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ($package.winget -eq "na") {
|
||||||
|
$packagesChoco.add($package.choco)
|
||||||
|
Write-Host "Queueing $($package.choco) for Chocolatey install"
|
||||||
|
} else {
|
||||||
|
$null = $packagesWinget.add($($package.winget))
|
||||||
|
Write-Host "Queueing $($package.winget) for Winget install"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $packagesWinget, $packagesChoco
|
||||||
|
}.Invoke($PackagesToInstall)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$sync.ProcessRunning = $true
|
$sync.ProcessRunning = $true
|
||||||
|
@ -29,20 +29,46 @@ function Invoke-WPFUnInstall {
|
|||||||
$confirm = [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
$confirm = [System.Windows.MessageBox]::Show($Messageboxbody, $MessageboxTitle, $ButtonType, $MessageIcon)
|
||||||
|
|
||||||
if($confirm -eq "No") {return}
|
if($confirm -eq "No") {return}
|
||||||
|
$ChocoPreference = $($sync.ChocoRadioButton.IsChecked)
|
||||||
|
|
||||||
$ManagerPreference = $sync["ManagerPreference"]
|
Invoke-WPFRunspace -ArgumentList @(("PackagesToUninstall", $PackagesToUninstall),("ChocoPreference", $ChocoPreference)) -DebugPreference $DebugPreference -ScriptBlock {
|
||||||
|
param($PackagesToUninstall, $ChocoPreference, $DebugPreference)
|
||||||
|
if ($PackagesToUninstall.count -eq 1) {
|
||||||
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 -overlay "logo" })
|
||||||
|
} else {
|
||||||
|
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" })
|
||||||
|
}
|
||||||
|
$packagesWinget, $packagesChoco = {
|
||||||
|
$packagesWinget = [System.Collections.ArrayList]::new()
|
||||||
|
$packagesChoco = [System.Collections.ArrayList]::new()
|
||||||
|
|
||||||
Invoke-WPFRunspace -ArgumentList @(("PackagesToUninstall", $PackagesToInstall),("ManagerPreference", $ManagerPreference)) -DebugPreference $DebugPreference -ScriptBlock {
|
foreach ($package in $PackagesToUninstall) {
|
||||||
param($PackagesToUninstall, $ManagerPreference, $DebugPreference)
|
if ($ChocoPreference) {
|
||||||
|
if ($package.choco -eq "na") {
|
||||||
$packagesSorted = Get-WinUtilSelectedPackages -PackageList $PackagesToInstall -Preference $ManagerPreference
|
$packagesWinget.add($package.winget)
|
||||||
$packagesWinget = $packagesSorted[[PackageManagers]::Winget]
|
Write-Host "Queueing $($package.winget) for Winget uninstall"
|
||||||
$packagesChoco = $packagesSorted[[PackageManagers]::Choco]
|
} else {
|
||||||
|
$null = $packagesChoco.add($package.choco)
|
||||||
|
Write-Host "Queueing $($package.choco) for Chocolatey uninstall"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if ($package.winget -eq "na") {
|
||||||
|
$packagesChoco.add($package.choco)
|
||||||
|
Write-Host "Queueing $($package.choco) for Chocolatey uninstall"
|
||||||
|
} else {
|
||||||
|
$null = $packagesWinget.add($($package.winget))
|
||||||
|
Write-Host "Queueing $($package.winget) for Winget uninstall"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $packagesWinget, $packagesChoco
|
||||||
|
}.Invoke($PackagesToUninstall)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$sync.ProcessRunning = $true
|
$sync.ProcessRunning = $true
|
||||||
|
|
||||||
# Uninstall all selected programs in new window
|
# Install all selected programs in new window
|
||||||
if($packagesWinget.Count -gt 0) {
|
if($packagesWinget.Count -gt 0) {
|
||||||
Install-WinUtilProgramWinget -Action Uninstall -Programs $packagesWinget
|
Install-WinUtilProgramWinget -Action Uninstall -Programs $packagesWinget
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,3 @@
|
|||||||
# Create enums
|
|
||||||
Add-Type @"
|
|
||||||
public enum PackageManagers
|
|
||||||
{
|
|
||||||
Winget,
|
|
||||||
Choco
|
|
||||||
}
|
|
||||||
"@
|
|
||||||
|
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# Set the maximum number of threads for the RunspacePool to the number of threads on the machine
|
# Set the maximum number of threads for the RunspacePool to the number of threads on the machine
|
||||||
$maxthreads = [int]$env:NUMBER_OF_PROCESSORS
|
$maxthreads = [int]$env:NUMBER_OF_PROCESSORS
|
||||||
@ -132,6 +123,9 @@ Invoke-WPFUIElements -configVariable $sync.configs.appnavigation -targetGridName
|
|||||||
$sync.WPFToggleView.Add_Click({
|
$sync.WPFToggleView.Add_Click({
|
||||||
$sync.CompactView = -not $sync.CompactView
|
$sync.CompactView = -not $sync.CompactView
|
||||||
Update-AppTileProperties
|
Update-AppTileProperties
|
||||||
|
if ($sync.SearchBar.Text -eq "") {
|
||||||
|
Set-CategoryVisibility -Category "*"
|
||||||
|
}
|
||||||
})
|
})
|
||||||
Invoke-WPFUIApps -Apps $sync.configs.applicationsHashtable -targetGridName "appspanel"
|
Invoke-WPFUIApps -Apps $sync.configs.applicationsHashtable -targetGridName "appspanel"
|
||||||
|
|
||||||
@ -148,14 +142,12 @@ Invoke-WPFUIElements -configVariable $sync.configs.feature -targetGridName "feat
|
|||||||
|
|
||||||
$xaml.SelectNodes("//*[@Name]") | ForEach-Object {$sync["$("$($psitem.Name)")"] = $sync["Form"].FindName($psitem.Name)}
|
$xaml.SelectNodes("//*[@Name]") | ForEach-Object {$sync["$("$($psitem.Name)")"] = $sync["Form"].FindName($psitem.Name)}
|
||||||
|
|
||||||
#Persist Package Manager preference across winutil restarts
|
#Persist the Chocolatey preference across winutil restarts
|
||||||
$sync.ChocoRadioButton.Add_Checked({Set-PackageManagerPreference Choco})
|
$ChocoPreferencePath = "$env:LOCALAPPDATA\winutil\preferChocolatey.ini"
|
||||||
$sync.WingetRadioButton.Add_Checked({Set-PackageManagerPreference Winget})
|
$sync.ChocoRadioButton.Add_Checked({New-Item -Path $ChocoPreferencePath -Force })
|
||||||
Set-PackageManagerPreference
|
$sync.ChocoRadioButton.Add_Unchecked({Remove-Item $ChocoPreferencePath -Force})
|
||||||
|
if (Test-Path $ChocoPreferencePath) {
|
||||||
switch ($sync["ManagerPreference"]) {
|
$sync.ChocoRadioButton.IsChecked = $true
|
||||||
"Choco" {$sync.ChocoRadioButton.IsChecked = $true; break}
|
|
||||||
"Winget" {$sync.WingetRadioButton.IsChecked = $true; break}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$sync.keys | ForEach-Object {
|
$sync.keys | ForEach-Object {
|
||||||
@ -194,6 +186,7 @@ $sync.keys | ForEach-Object {
|
|||||||
# Load computer information in the background
|
# Load computer information in the background
|
||||||
Invoke-WPFRunspace -ScriptBlock {
|
Invoke-WPFRunspace -ScriptBlock {
|
||||||
try {
|
try {
|
||||||
|
$oldProgressPreference = $ProgressPreference
|
||||||
$ProgressPreference = "SilentlyContinue"
|
$ProgressPreference = "SilentlyContinue"
|
||||||
$sync.ConfigLoaded = $False
|
$sync.ConfigLoaded = $False
|
||||||
$sync.ComputerInfo = Get-ComputerInfo
|
$sync.ComputerInfo = Get-ComputerInfo
|
||||||
@ -211,6 +204,12 @@ Invoke-WPFRunspace -ScriptBlock {
|
|||||||
|
|
||||||
# Print the logo
|
# Print the logo
|
||||||
Invoke-WPFFormVariables
|
Invoke-WPFFormVariables
|
||||||
|
$sync.CompactView = $false
|
||||||
|
$sync.Form.Resources.AppTileWidth = [double]::NaN
|
||||||
|
$sync.Form.Resources.AppTileCompactVisibility = [Windows.Visibility]::Visible
|
||||||
|
$sync.Form.Resources.AppTileFontSize = [double]16
|
||||||
|
$sync.Form.Resources.AppTileMargins = [Windows.Thickness]5
|
||||||
|
$sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]0
|
||||||
function Update-AppTileProperties {
|
function Update-AppTileProperties {
|
||||||
if ($sync.CompactView -eq $true) {
|
if ($sync.CompactView -eq $true) {
|
||||||
$sync.Form.Resources.AppTileWidth = [double]::NaN
|
$sync.Form.Resources.AppTileWidth = [double]::NaN
|
||||||
@ -220,24 +219,13 @@ function Update-AppTileProperties {
|
|||||||
$sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]0
|
$sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]0
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# On first load, set the AppTileWidth to NaN because the Window dosnt exist yet and there is no ActuaWidth
|
$sync.Form.Resources.AppTileWidth = $sync.ItemsControl.ActualWidth -20
|
||||||
if ($sync.ItemsControl.ActualWidth -gt 0) {
|
|
||||||
$sync.Form.Resources.AppTileWidth = $sync.ItemsControl.ActualWidth -20}
|
|
||||||
else {
|
|
||||||
$sync.Form.Resources.AppTileWidth = [double]::NaN
|
|
||||||
}
|
|
||||||
$sync.Form.Resources.AppTileCompactVisibility = [Windows.Visibility]::Visible
|
$sync.Form.Resources.AppTileCompactVisibility = [Windows.Visibility]::Visible
|
||||||
$sync.Form.Resources.AppTileFontSize = [double]16
|
$sync.Form.Resources.AppTileFontSize = [double]16
|
||||||
$sync.Form.Resources.AppTileMargins = [Windows.Thickness]5
|
$sync.Form.Resources.AppTileMargins = [Windows.Thickness]5
|
||||||
$sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]1
|
$sync.Form.Resources.AppTileBorderThickness = [Windows.Thickness]1
|
||||||
}
|
}
|
||||||
if ($sync.SearchBar.Text -eq "") {
|
|
||||||
Set-CategoryVisibility -Category "*"
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
# initialize AppTile properties
|
|
||||||
Update-AppTileProperties
|
|
||||||
|
|
||||||
# We need to update the app tile properties when the form is resized because to fill a WrapPanel update the width of the elemenmt manually (afaik)
|
# We need to update the app tile properties when the form is resized because to fill a WrapPanel update the width of the elemenmt manually (afaik)
|
||||||
$sync.Form.Add_SizeChanged({
|
$sync.Form.Add_SizeChanged({
|
||||||
Update-AppTileProperties
|
Update-AppTileProperties
|
||||||
|
@ -42,7 +42,6 @@ $sync.ProcessRunning = $false
|
|||||||
$sync.selectedApps = [System.Collections.Generic.List[string]]::new()
|
$sync.selectedApps = [System.Collections.Generic.List[string]]::new()
|
||||||
$sync.ShowOnlySeleced = $false
|
$sync.ShowOnlySeleced = $false
|
||||||
$sync.currentTab = "Install"
|
$sync.currentTab = "Install"
|
||||||
$sync.CompactView = $true
|
|
||||||
$sync.ShowOnlySelected = $false
|
$sync.ShowOnlySelected = $false
|
||||||
$sync.selectedAppsStackPanel
|
$sync.selectedAppsStackPanel
|
||||||
$sync.selectedAppsPopup
|
$sync.selectedAppsPopup
|
||||||
|
Reference in New Issue
Block a user