Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
valleyofdoom committed Jul 16, 2024
1 parent c775b87 commit d8e0d5d
Show file tree
Hide file tree
Showing 23 changed files with 585 additions and 663 deletions.
14 changes: 7 additions & 7 deletions AppxPackagesManager/AppxPackagesManager.sln
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33801.468
VisualStudioVersion = 17.10.35013.160
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppxPackagesManager", "AppxPackagesManager\AppxPackagesManager.csproj", "{A925F229-24FF-4A16-A2C2-110C9D1ECCD1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppxPackagesManager", "AppxPackagesManager\AppxPackagesManager.csproj", "{6E6CA88B-CBF3-4A36-9D33-9312FC54392E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A925F229-24FF-4A16-A2C2-110C9D1ECCD1}.Debug|x64.ActiveCfg = Debug|x64
{A925F229-24FF-4A16-A2C2-110C9D1ECCD1}.Debug|x64.Build.0 = Debug|x64
{A925F229-24FF-4A16-A2C2-110C9D1ECCD1}.Release|x64.ActiveCfg = Release|x64
{A925F229-24FF-4A16-A2C2-110C9D1ECCD1}.Release|x64.Build.0 = Release|x64
{6E6CA88B-CBF3-4A36-9D33-9312FC54392E}.Debug|x64.ActiveCfg = Debug|x64
{6E6CA88B-CBF3-4A36-9D33-9312FC54392E}.Debug|x64.Build.0 = Debug|x64
{6E6CA88B-CBF3-4A36-9D33-9312FC54392E}.Release|x64.ActiveCfg = Release|x64
{6E6CA88B-CBF3-4A36-9D33-9312FC54392E}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1166BDA6-D8B8-46D7-BE13-5F4371ED3F08}
SolutionGuid = {46C4FC05-2279-4554-9512-E10B3ECB498D}
EndGlobalSection
EndGlobal
14 changes: 1 addition & 13 deletions AppxPackagesManager/AppxPackagesManager/App.config
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
9 changes: 9 additions & 0 deletions AppxPackagesManager/AppxPackagesManager/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="AppxPackagesManager.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:AppxPackagesManager"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Windows;
using System.Windows;

namespace AppxPackagesManager {
/// <summary>
Expand Down
8 changes: 0 additions & 8 deletions AppxPackagesManager/AppxPackagesManager/App/App.xaml

This file was deleted.

212 changes: 20 additions & 192 deletions AppxPackagesManager/AppxPackagesManager/AppxPackagesManager.csproj

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions AppxPackagesManager/AppxPackagesManager/FodyWeavers.xml

This file was deleted.

31 changes: 0 additions & 31 deletions AppxPackagesManager/AppxPackagesManager/GridItem.cs

This file was deleted.

119 changes: 119 additions & 0 deletions AppxPackagesManager/AppxPackagesManager/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<Window
x:Class="AppxPackagesManager.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:AppxPackagesManager"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="{Binding Title}"
MinWidth="800"
MinHeight="450"
IsEnabled="{Binding IsWindowEnabled}"
WindowState="Maximized"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="10*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<Grid Grid.Row="0" Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<TextBox
Grid.Column="0"
Height="23"
Margin="0,0,10,0"
Text="{Binding SearchQuery, UpdateSourceTrigger=PropertyChanged}" />
<ComboBox
Grid.Column="1"
Margin="0,0,10,0"
ItemsSource="{Binding PackageTypes}"
SelectedItem="{Binding SelectedPackagesType}" />
<Button
Grid.Column="2"
Width="100"
Height="23"
Command="{Binding RefreshCommand}"
Content="Refresh List" />
</Grid>

<DataGrid
Grid.Row="1"
AutoGenerateColumns="False"
CanUserAddRows="False"
HorizontalGridLinesBrush="LightGray"
ItemsSource="{Binding PackagesGridItems}"
VerticalGridLinesBrush="LightGray">
<DataGrid.Columns>
<DataGridTemplateColumn Header="Uninstall">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox
HorizontalAlignment="Center"
IsChecked="{Binding IsUninstall, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding CanUninstall}"
ToolTip="{Binding CheckBoxToolTip}"
ToolTipService.ShowOnDisabled="True" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn
Binding="{Binding FriendlyName}"
Header="Friendly Name"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding PackageName}"
Header="Package Name"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding RequiredByPackages}"
Header="Required By"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding Version}"
Header="Version"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding IsNonRemovable}"
Header="Non Removable"
IsReadOnly="True" />
<DataGridTextColumn
Binding="{Binding IsFramework}"
Header="Framework"
IsReadOnly="True" />
</DataGrid.Columns>
</DataGrid>

<StackPanel
Grid.Row="2"
Margin="5,5,5,5"
Orientation="Horizontal">

<Button
Width="160"
Height="23"
Margin="0,0,10,0"
Command="{Binding UninstallSelectedCommand}"
Content="Uninstall Selected Packages" />
<Button
Width="100"
Height="23"
Margin="0,0,10,0"
Command="{Binding SelectAllCommand}"
Content="Select All" />
<Button
Width="100"
Height="23"
Margin="0,0,10,0"
Command="{Binding SelectionClearCommand}"
Content="Clear Selection" />
<Label Grid.Column="1" Content="{Binding PackagesCount}" />
</StackPanel>
</Grid>
</Window>
11 changes: 11 additions & 0 deletions AppxPackagesManager/AppxPackagesManager/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using AppxPackagesManager.ViewModels;
using System.Windows;

namespace AppxPackagesManager {
public partial class MainWindow : Window {
public MainWindow() {
DataContext = new MainWindowViewModel();
InitializeComponent();
}
}
}
134 changes: 0 additions & 134 deletions AppxPackagesManager/AppxPackagesManager/MainWindow/MainWindow.xaml

This file was deleted.

Loading

0 comments on commit d8e0d5d

Please sign in to comment.