From 0e6d0736247c58ef0ea64f0ba9335fad987249b5 Mon Sep 17 00:00:00 2001 From: Paul Bobik Date: Fri, 9 Feb 2024 21:53:48 +0100 Subject: [PATCH] Applied WPF Design Concepts and added some C# Syntax + CommunityToolkit.Mvvm Features applied --- Switchy/Switchy/App.xaml | 14 +- Switchy/Switchy/App.xaml.cs | 18 +- Switchy/Switchy/MainWindow.xaml | 79 -------- Switchy/Switchy/MainWindow.xaml.cs | 136 ------------- Switchy/Switchy/Model/ProcessListViewItem.cs | 66 +++---- Switchy/Switchy/Switchy.csproj | 6 + Switchy/Switchy/Utils/ProcessManager.cs | 109 ----------- Switchy/Switchy/Utils/TypeAssistant.cs | 39 ++-- Switchy/Switchy/Utils/User32Helper.cs | 47 ++--- Switchy/Switchy/Utils/WindowHelper.cs | 196 ++++++++++--------- Switchy/Switchy/View/MainWindow.xaml | 115 +++++++++++ Switchy/Switchy/View/MainWindow.xaml.cs | 32 +++ Switchy/Switchy/ViewModel/ProcessManager.cs | 145 ++++++++++++++ 13 files changed, 474 insertions(+), 528 deletions(-) delete mode 100644 Switchy/Switchy/MainWindow.xaml delete mode 100644 Switchy/Switchy/MainWindow.xaml.cs delete mode 100644 Switchy/Switchy/Utils/ProcessManager.cs create mode 100644 Switchy/Switchy/View/MainWindow.xaml create mode 100644 Switchy/Switchy/View/MainWindow.xaml.cs create mode 100644 Switchy/Switchy/ViewModel/ProcessManager.cs diff --git a/Switchy/Switchy/App.xaml b/Switchy/Switchy/App.xaml index ea75629..c90310d 100644 --- a/Switchy/Switchy/App.xaml +++ b/Switchy/Switchy/App.xaml @@ -1,17 +1,5 @@  - - - - - + StartupUri="View/MainWindow.xaml"> diff --git a/Switchy/Switchy/App.xaml.cs b/Switchy/Switchy/App.xaml.cs index 79eec2f..36a534e 100644 --- a/Switchy/Switchy/App.xaml.cs +++ b/Switchy/Switchy/App.xaml.cs @@ -1,14 +1,10 @@ -using System.Configuration; -using System.Data; -using System.Windows; +using System.Windows; -namespace Switchy -{ - /// - /// Interaction logic for App.xaml - /// - public partial class App : Application - { - } +namespace Switchy; +/// +/// Interaction logic for App.xaml +/// +public partial class App : Application +{ } diff --git a/Switchy/Switchy/MainWindow.xaml b/Switchy/Switchy/MainWindow.xaml deleted file mode 100644 index d1fa54b..0000000 --- a/Switchy/Switchy/MainWindow.xaml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - -