From 5b8936dd161ed2beaa4c20385125ef65211eb3c1 Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Mon, 8 Jun 2026 22:04:36 +0200 Subject: [PATCH] More code cleanup --- UI/CLI/Commands/HaltCommand.cs | 2 -- UI/CLI/Commands/HelpCommand.cs | 2 -- UI/CLI/Commands/ProcessCommands.cs | 1 - UI/CLI/Commands/StartGuiCommand.cs | 1 - Utils/ChangedPropertiesTracker.cs | 6 +++--- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/UI/CLI/Commands/HaltCommand.cs b/UI/CLI/Commands/HaltCommand.cs index 0c52e9d..0e212e6 100644 --- a/UI/CLI/Commands/HaltCommand.cs +++ b/UI/CLI/Commands/HaltCommand.cs @@ -1,5 +1,3 @@ -using RemSox.UI.CLI; - namespace RemSox.UI.CLI.Commands; public sealed class HaltCommand : ICommand diff --git a/UI/CLI/Commands/HelpCommand.cs b/UI/CLI/Commands/HelpCommand.cs index 0477546..563d6f4 100644 --- a/UI/CLI/Commands/HelpCommand.cs +++ b/UI/CLI/Commands/HelpCommand.cs @@ -1,5 +1,3 @@ -using RemSox.UI.CLI; - namespace RemSox.UI.CLI.Commands; public sealed class HelpCommand : ICommand diff --git a/UI/CLI/Commands/ProcessCommands.cs b/UI/CLI/Commands/ProcessCommands.cs index 6312f64..9e9d8a6 100644 --- a/UI/CLI/Commands/ProcessCommands.cs +++ b/UI/CLI/Commands/ProcessCommands.cs @@ -1,5 +1,4 @@ using RemSox.Processing; -using RemSox.UI.CLI; namespace RemSox.UI.CLI.Commands; diff --git a/UI/CLI/Commands/StartGuiCommand.cs b/UI/CLI/Commands/StartGuiCommand.cs index bbf201d..e3ee874 100644 --- a/UI/CLI/Commands/StartGuiCommand.cs +++ b/UI/CLI/Commands/StartGuiCommand.cs @@ -1,6 +1,5 @@ using RemSox.Processes; using RemSox.Processing; -using RemSox.UI.CLI; namespace RemSox.UI.CLI.Commands; diff --git a/Utils/ChangedPropertiesTracker.cs b/Utils/ChangedPropertiesTracker.cs index 73622de..4e87d66 100644 --- a/Utils/ChangedPropertiesTracker.cs +++ b/Utils/ChangedPropertiesTracker.cs @@ -11,10 +11,10 @@ public abstract class ChangedPropertiesTracker : INotifyPropertyChanged { get { - Dictionary changes = new(); - foreach (var name in changedPropertyNames) + Dictionary changes = []; + foreach (string name in changedPropertyNames) { - if (properties.TryGetValue(name, out var value)) + if (properties.TryGetValue(name, out object? value)) { changes[name] = value; }