From 0e39392509ef2161ac1c626aeec8033dd55bcd47 Mon Sep 17 00:00:00 2001 From: NotroDev Date: Wed, 10 Jul 2024 10:24:21 +0200 Subject: [PATCH] cleanup --- SkEditor/API/Utilities/ILogs.cs | 2 +- SkEditor/Controls/MainMenuControl.axaml.cs | 1 - SkEditor/Utilities/ChangelogChecker.cs | 5 +---- SkEditor/Utilities/CrashChecker.cs | 3 +-- SkEditor/Utilities/Editor/TextEditorEventHandler.cs | 2 -- SkEditor/Utilities/Files/FileHandler.cs | 2 +- SkEditor/Utilities/Files/Icon.cs | 1 - SkEditor/Utilities/InternalAPI/Classes/Windows.cs | 1 - SkEditor/Views/Settings/AboutPage.axaml.cs | 1 - 9 files changed, 4 insertions(+), 14 deletions(-) diff --git a/SkEditor/API/Utilities/ILogs.cs b/SkEditor/API/Utilities/ILogs.cs index 0b400b1..7cbe6a9 100644 --- a/SkEditor/API/Utilities/ILogs.cs +++ b/SkEditor/API/Utilities/ILogs.cs @@ -46,7 +46,7 @@ public interface ILogs /// The exception to log. public void Fatal(Exception exception); - + /// /// Sends an error message related to an addon to the log. Optionally informs the user. /// diff --git a/SkEditor/Controls/MainMenuControl.axaml.cs b/SkEditor/Controls/MainMenuControl.axaml.cs index 73a1a69..c22517d 100644 --- a/SkEditor/Controls/MainMenuControl.axaml.cs +++ b/SkEditor/Controls/MainMenuControl.axaml.cs @@ -13,7 +13,6 @@ using SkEditor.Views.Generators; using SkEditor.Views.Generators.Gui; using SkEditor.Views.Settings; -using System; namespace SkEditor.Controls; public partial class MainMenuControl : UserControl diff --git a/SkEditor/Utilities/ChangelogChecker.cs b/SkEditor/Utilities/ChangelogChecker.cs index 2260bf5..fc680c8 100644 --- a/SkEditor/Utilities/ChangelogChecker.cs +++ b/SkEditor/Utilities/ChangelogChecker.cs @@ -1,8 +1,5 @@ -using Avalonia.Controls; -using Avalonia.Threading; -using FluentAvalonia.UI.Controls; +using FluentAvalonia.UI.Controls; using SkEditor.API; -using System.Reflection; namespace SkEditor.Utilities; public static class ChangelogChecker diff --git a/SkEditor/Utilities/CrashChecker.cs b/SkEditor/Utilities/CrashChecker.cs index c398ccb..9a285ed 100644 --- a/SkEditor/Utilities/CrashChecker.cs +++ b/SkEditor/Utilities/CrashChecker.cs @@ -1,5 +1,4 @@ -using Serilog; -using SkEditor.API; +using SkEditor.API; using SkEditor.Views; using System; using System.IO; diff --git a/SkEditor/Utilities/Editor/TextEditorEventHandler.cs b/SkEditor/Utilities/Editor/TextEditorEventHandler.cs index 12f3910..ad05a80 100644 --- a/SkEditor/Utilities/Editor/TextEditorEventHandler.cs +++ b/SkEditor/Utilities/Editor/TextEditorEventHandler.cs @@ -9,10 +9,8 @@ using AvaloniaEdit.Highlighting; using SkEditor.API; using SkEditor.Utilities.Files; -using SkEditor.ViewModels; using System; using System.Collections.Generic; -using System.Diagnostics; using System.Linq; using System.Reflection; using System.Text; diff --git a/SkEditor/Utilities/Files/FileHandler.cs b/SkEditor/Utilities/Files/FileHandler.cs index ff24eb2..9889330 100644 --- a/SkEditor/Utilities/Files/FileHandler.cs +++ b/SkEditor/Utilities/Files/FileHandler.cs @@ -96,7 +96,7 @@ public static async void SaveAsFile() await SkEditorAPI.Files.Save(SkEditorAPI.Files.GetCurrentOpenedFile(), true); } - public static void SaveAllFiles() => + public static void SaveAllFiles() => SkEditorAPI.Files.GetOpenedEditors().ForEach(async file => await SkEditorAPI.Files.Save(file, false)); public static void SwitchTab(int index) diff --git a/SkEditor/Utilities/Files/Icon.cs b/SkEditor/Utilities/Files/Icon.cs index eeb0074..2f798a7 100644 --- a/SkEditor/Utilities/Files/Icon.cs +++ b/SkEditor/Utilities/Files/Icon.cs @@ -1,6 +1,5 @@ using Avalonia; using FluentAvalonia.UI.Controls; -using SkEditor.API; using System.Collections.Generic; using System.IO; diff --git a/SkEditor/Utilities/InternalAPI/Classes/Windows.cs b/SkEditor/Utilities/InternalAPI/Classes/Windows.cs index 2ebdc64..90e30a6 100644 --- a/SkEditor/Utilities/InternalAPI/Classes/Windows.cs +++ b/SkEditor/Utilities/InternalAPI/Classes/Windows.cs @@ -8,7 +8,6 @@ using SkEditor.Utilities; using SkEditor.Views; using System; -using System.Linq; using System.Threading.Tasks; namespace SkEditor.API; diff --git a/SkEditor/Views/Settings/AboutPage.axaml.cs b/SkEditor/Views/Settings/AboutPage.axaml.cs index 031e19b..5dfcf65 100644 --- a/SkEditor/Views/Settings/AboutPage.axaml.cs +++ b/SkEditor/Views/Settings/AboutPage.axaml.cs @@ -2,7 +2,6 @@ using CommunityToolkit.Mvvm.Input; using SkEditor.API; using SkEditor.Utilities; -using SkEditor.ViewModels; namespace SkEditor.Views.Settings; public partial class AboutPage : UserControl