diff --git a/Bloxstrap/App.xaml.cs b/Bloxstrap/App.xaml.cs index 4e7fb936..907dd8ed 100644 --- a/Bloxstrap/App.xaml.cs +++ b/Bloxstrap/App.xaml.cs @@ -1,25 +1,9 @@ -using System; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Net.Http; -using System.Net; -using System.Reflection; -using System.Threading; -using System.Threading.Tasks; +using System.Reflection; using System.Windows; using System.Windows.Threading; using Microsoft.Win32; -using Bloxstrap.Enums; -using Bloxstrap.Extensions; -using Bloxstrap.Models; -using Bloxstrap.Models.Attributes; -using Bloxstrap.UI; -using Bloxstrap.Utility; - namespace Bloxstrap { /// @@ -27,8 +11,6 @@ namespace Bloxstrap /// public partial class App : Application { - public static readonly CultureInfo CultureFormat = CultureInfo.InvariantCulture; - public const string ProjectName = "Bloxstrap"; public const string ProjectRepository = "pizzaboxer/bloxstrap"; public const string RobloxAppName = "RobloxPlayerBeta"; diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index f9f263f5..b3b359ee 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -1,24 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.IO.Compression; -using System.Linq; -using System.Net.Http; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; +using System.Windows; using System.Windows.Forms; -using System.Windows; using Microsoft.Win32; -using Bloxstrap.Enums; -using Bloxstrap.Extensions; using Bloxstrap.Integrations; -using Bloxstrap.Models; -using Bloxstrap.Tools; -using Bloxstrap.UI; namespace Bloxstrap { diff --git a/Bloxstrap/Directories.cs b/Bloxstrap/Directories.cs index faddb26d..21f9d13c 100644 --- a/Bloxstrap/Directories.cs +++ b/Bloxstrap/Directories.cs @@ -1,7 +1,4 @@ -using System; -using System.IO; - -namespace Bloxstrap +namespace Bloxstrap { static class Directories { diff --git a/Bloxstrap/Extensions/BootstrapperIconEx.cs b/Bloxstrap/Extensions/BootstrapperIconEx.cs index dad9cefb..90656a76 100644 --- a/Bloxstrap/Extensions/BootstrapperIconEx.cs +++ b/Bloxstrap/Extensions/BootstrapperIconEx.cs @@ -1,7 +1,4 @@ -using System; -using System.Drawing; - -using Bloxstrap.Enums; +using System.Drawing; namespace Bloxstrap.Extensions { diff --git a/Bloxstrap/Extensions/BootstrapperStyleEx.cs b/Bloxstrap/Extensions/BootstrapperStyleEx.cs index bb837d88..607c6b28 100644 --- a/Bloxstrap/Extensions/BootstrapperStyleEx.cs +++ b/Bloxstrap/Extensions/BootstrapperStyleEx.cs @@ -1,7 +1,4 @@ -using Bloxstrap.Enums; -using Bloxstrap.UI; - -namespace Bloxstrap.Extensions +namespace Bloxstrap.Extensions { static class BootstrapperStyleEx { diff --git a/Bloxstrap/Extensions/CursorTypeEx.cs b/Bloxstrap/Extensions/CursorTypeEx.cs index a46dc7ec..34b8de94 100644 --- a/Bloxstrap/Extensions/CursorTypeEx.cs +++ b/Bloxstrap/Extensions/CursorTypeEx.cs @@ -1,8 +1,4 @@ -using System.Collections.Generic; - -using Bloxstrap.Enums; - -namespace Bloxstrap.Extensions +namespace Bloxstrap.Extensions { static class CursorTypeEx { diff --git a/Bloxstrap/Extensions/DateTimeEx.cs b/Bloxstrap/Extensions/DateTimeEx.cs index f30d0115..62b4744d 100644 --- a/Bloxstrap/Extensions/DateTimeEx.cs +++ b/Bloxstrap/Extensions/DateTimeEx.cs @@ -1,12 +1,10 @@ -using System; - -namespace Bloxstrap.Extensions +namespace Bloxstrap.Extensions { static class DateTimeEx { public static string ToFriendlyString(this DateTime dateTime) { - return dateTime.ToString("dddd, d MMMM yyyy 'at' h:mm:ss tt", App.CultureFormat); + return dateTime.ToString("dddd, d MMMM yyyy 'at' h:mm:ss tt"); } } } diff --git a/Bloxstrap/Extensions/EmojiTypeEx.cs b/Bloxstrap/Extensions/EmojiTypeEx.cs index 07fd220e..0eb9d6ea 100644 --- a/Bloxstrap/Extensions/EmojiTypeEx.cs +++ b/Bloxstrap/Extensions/EmojiTypeEx.cs @@ -1,8 +1,4 @@ -using System.Collections.Generic; - -using Bloxstrap.Enums; - -namespace Bloxstrap.Extensions +namespace Bloxstrap.Extensions { static class EmojiTypeEx { diff --git a/Bloxstrap/Extensions/IconEx.cs b/Bloxstrap/Extensions/IconEx.cs index bdb1ddd4..2cd48af7 100644 --- a/Bloxstrap/Extensions/IconEx.cs +++ b/Bloxstrap/Extensions/IconEx.cs @@ -1,5 +1,4 @@ using System.Drawing; -using System.IO; using System.Windows.Media.Imaging; using System.Windows.Media; diff --git a/Bloxstrap/Extensions/ThemeEx.cs b/Bloxstrap/Extensions/ThemeEx.cs index 57ab9556..30da5392 100644 --- a/Bloxstrap/Extensions/ThemeEx.cs +++ b/Bloxstrap/Extensions/ThemeEx.cs @@ -1,5 +1,4 @@ using Microsoft.Win32; -using Bloxstrap.Enums; namespace Bloxstrap.Extensions { diff --git a/Bloxstrap/FastFlagManager.cs b/Bloxstrap/FastFlagManager.cs index 0685e864..0043f6e4 100644 --- a/Bloxstrap/FastFlagManager.cs +++ b/Bloxstrap/FastFlagManager.cs @@ -1,8 +1,4 @@ -using System.Collections.Generic; -using System.IO; -using System.Text.Json; - -namespace Bloxstrap +namespace Bloxstrap { public class FastFlagManager : JsonManager> { diff --git a/Bloxstrap/GlobalUsings.cs b/Bloxstrap/GlobalUsings.cs new file mode 100644 index 00000000..2bfd51a1 --- /dev/null +++ b/Bloxstrap/GlobalUsings.cs @@ -0,0 +1,22 @@ +global using System; +global using System.Collections.Generic; +global using System.Diagnostics; +global using System.IO; +global using System.IO.Compression; +global using System.Text; +global using System.Text.Json; +global using System.Text.Json.Serialization; +global using System.Text.RegularExpressions; +global using System.Linq; +global using System.Net; +global using System.Net.Http; +global using System.Threading; +global using System.Threading.Tasks; + +global using Bloxstrap.Enums; +global using Bloxstrap.Extensions; +global using Bloxstrap.Models; +global using Bloxstrap.Models.Attributes; +global using Bloxstrap.Models.RobloxApi; +global using Bloxstrap.UI; +global using Bloxstrap.Utility; \ No newline at end of file diff --git a/Bloxstrap/HttpClientLoggingHandler.cs b/Bloxstrap/HttpClientLoggingHandler.cs index ccf7bd28..a39b94ad 100644 --- a/Bloxstrap/HttpClientLoggingHandler.cs +++ b/Bloxstrap/HttpClientLoggingHandler.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace Bloxstrap +namespace Bloxstrap { internal class HttpClientLoggingHandler : MessageProcessingHandler { diff --git a/Bloxstrap/Integrations/DiscordRichPresence.cs b/Bloxstrap/Integrations/DiscordRichPresence.cs index f6d40288..35628d00 100644 --- a/Bloxstrap/Integrations/DiscordRichPresence.cs +++ b/Bloxstrap/Integrations/DiscordRichPresence.cs @@ -1,12 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -using DiscordRPC; - -using Bloxstrap.Models.RobloxApi; -using Bloxstrap.Models; +using DiscordRPC; namespace Bloxstrap.Integrations { diff --git a/Bloxstrap/Integrations/ServerNotifier.cs b/Bloxstrap/Integrations/ServerNotifier.cs index bfd55be3..02e9b6a0 100644 --- a/Bloxstrap/Integrations/ServerNotifier.cs +++ b/Bloxstrap/Integrations/ServerNotifier.cs @@ -1,6 +1,4 @@ -using System; -using System.Threading.Tasks; -using System.Windows; +using System.Windows; namespace Bloxstrap.Integrations { diff --git a/Bloxstrap/JsonManager.cs b/Bloxstrap/JsonManager.cs index 095819ab..38baeeec 100644 --- a/Bloxstrap/JsonManager.cs +++ b/Bloxstrap/JsonManager.cs @@ -1,8 +1,4 @@ -using System; -using System.IO; -using System.Text.Json; - -namespace Bloxstrap +namespace Bloxstrap { public class JsonManager where T : new() { diff --git a/Bloxstrap/Logger.cs b/Bloxstrap/Logger.cs index aabc96e0..3ef73ee9 100644 --- a/Bloxstrap/Logger.cs +++ b/Bloxstrap/Logger.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Text; -using System.Threading; - -namespace Bloxstrap +namespace Bloxstrap { // https://stackoverflow.com/a/53873141/11852173 // TODO - this kind of sucks diff --git a/Bloxstrap/Models/Attributes/BuildMetadataAttribute.cs b/Bloxstrap/Models/Attributes/BuildMetadataAttribute.cs index 32423f38..7c8fbe09 100644 --- a/Bloxstrap/Models/Attributes/BuildMetadataAttribute.cs +++ b/Bloxstrap/Models/Attributes/BuildMetadataAttribute.cs @@ -1,6 +1,4 @@ -using System; - -namespace Bloxstrap.Models.Attributes +namespace Bloxstrap.Models.Attributes { [AttributeUsage(AttributeTargets.Assembly)] public class BuildMetadataAttribute : Attribute diff --git a/Bloxstrap/Models/ClientVersion.cs b/Bloxstrap/Models/ClientVersion.cs index 4f18c472..e951e4e0 100644 --- a/Bloxstrap/Models/ClientVersion.cs +++ b/Bloxstrap/Models/ClientVersion.cs @@ -1,7 +1,4 @@ -using System; -using System.Text.Json.Serialization; - -namespace Bloxstrap.Models +namespace Bloxstrap.Models { public class ClientVersion { diff --git a/Bloxstrap/Models/DeployInfo.cs b/Bloxstrap/Models/DeployInfo.cs index 2f8f2651..91c4f944 100644 --- a/Bloxstrap/Models/DeployInfo.cs +++ b/Bloxstrap/Models/DeployInfo.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Bloxstrap.Models +namespace Bloxstrap.Models { public class DeployInfo { diff --git a/Bloxstrap/Models/FontFace.cs b/Bloxstrap/Models/FontFace.cs index 50bb179c..b8da43ce 100644 --- a/Bloxstrap/Models/FontFace.cs +++ b/Bloxstrap/Models/FontFace.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Bloxstrap.Models +namespace Bloxstrap.Models { public class FontFace { diff --git a/Bloxstrap/Models/FontFamily.cs b/Bloxstrap/Models/FontFamily.cs index 9a846e1e..1416a8ff 100644 --- a/Bloxstrap/Models/FontFamily.cs +++ b/Bloxstrap/Models/FontFamily.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Bloxstrap.Models +namespace Bloxstrap.Models { public class FontFamily { diff --git a/Bloxstrap/Models/GameMessage.cs b/Bloxstrap/Models/GameMessage.cs index d7b1b987..7639652a 100644 --- a/Bloxstrap/Models/GameMessage.cs +++ b/Bloxstrap/Models/GameMessage.cs @@ -1,6 +1,4 @@ -using System.Text.Json.Serialization; - -namespace Bloxstrap.Models +namespace Bloxstrap.Models { public class GameMessage { diff --git a/Bloxstrap/Models/GithubRelease.cs b/Bloxstrap/Models/GithubRelease.cs index a3885862..12b88760 100644 --- a/Bloxstrap/Models/GithubRelease.cs +++ b/Bloxstrap/Models/GithubRelease.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Bloxstrap.Models +namespace Bloxstrap.Models { public class GithubRelease { diff --git a/Bloxstrap/Models/PackageManifest.cs b/Bloxstrap/Models/PackageManifest.cs index 72eb7999..4d7c3a18 100644 --- a/Bloxstrap/Models/PackageManifest.cs +++ b/Bloxstrap/Models/PackageManifest.cs @@ -4,11 +4,6 @@ * Copyright (c) 2015-present MaximumADHD */ -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading.Tasks; - namespace Bloxstrap.Models { public class PackageManifest : List diff --git a/Bloxstrap/Models/RobloxApi/ApiArrayResponse.cs b/Bloxstrap/Models/RobloxApi/ApiArrayResponse.cs index 7f7e9484..4e1fefdb 100644 --- a/Bloxstrap/Models/RobloxApi/ApiArrayResponse.cs +++ b/Bloxstrap/Models/RobloxApi/ApiArrayResponse.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Bloxstrap.Models.RobloxApi +namespace Bloxstrap.Models.RobloxApi { /// /// Roblox.Web.WebAPI.Models.ApiArrayResponse diff --git a/Bloxstrap/Models/RobloxApi/GameCreator.cs b/Bloxstrap/Models/RobloxApi/GameCreator.cs index 3f4ef22e..c1918844 100644 --- a/Bloxstrap/Models/RobloxApi/GameCreator.cs +++ b/Bloxstrap/Models/RobloxApi/GameCreator.cs @@ -1,6 +1,4 @@ -using System.Text.Json.Serialization; - -namespace Bloxstrap.Models.RobloxApi +namespace Bloxstrap.Models.RobloxApi { /// /// Roblox.Games.Api.Models.Response.GameCreator diff --git a/Bloxstrap/Models/RobloxApi/GameDetailResponse.cs b/Bloxstrap/Models/RobloxApi/GameDetailResponse.cs index 2a824ac9..dca8c814 100644 --- a/Bloxstrap/Models/RobloxApi/GameDetailResponse.cs +++ b/Bloxstrap/Models/RobloxApi/GameDetailResponse.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text.Json.Serialization; - -namespace Bloxstrap.Models.RobloxApi +namespace Bloxstrap.Models.RobloxApi { /// diff --git a/Bloxstrap/Models/RobloxApi/ThumbnailResponse.cs b/Bloxstrap/Models/RobloxApi/ThumbnailResponse.cs index 2a4a2275..c6678132 100644 --- a/Bloxstrap/Models/RobloxApi/ThumbnailResponse.cs +++ b/Bloxstrap/Models/RobloxApi/ThumbnailResponse.cs @@ -1,6 +1,4 @@ -using System.Text.Json.Serialization; - -namespace Bloxstrap.Models.RobloxApi +namespace Bloxstrap.Models.RobloxApi { /// /// Roblox.Web.Responses.Thumbnails.ThumbnailResponse diff --git a/Bloxstrap/Models/RobloxApi/UniverseIdResponse.cs b/Bloxstrap/Models/RobloxApi/UniverseIdResponse.cs index 19bb84d1..c42d10af 100644 --- a/Bloxstrap/Models/RobloxApi/UniverseIdResponse.cs +++ b/Bloxstrap/Models/RobloxApi/UniverseIdResponse.cs @@ -1,6 +1,4 @@ -using System.Text.Json.Serialization; - -namespace Bloxstrap.Models.RobloxApi +namespace Bloxstrap.Models.RobloxApi { // lmao its just one property public class UniverseIdResponse diff --git a/Bloxstrap/Models/Settings.cs b/Bloxstrap/Models/Settings.cs index 95fd18f4..4ba664a1 100644 --- a/Bloxstrap/Models/Settings.cs +++ b/Bloxstrap/Models/Settings.cs @@ -1,7 +1,5 @@ using System.Collections.ObjectModel; -using Bloxstrap.Enums; - namespace Bloxstrap.Models { public class Settings diff --git a/Bloxstrap/Models/State.cs b/Bloxstrap/Models/State.cs index b099001e..0e0a2e82 100644 --- a/Bloxstrap/Models/State.cs +++ b/Bloxstrap/Models/State.cs @@ -1,8 +1,4 @@ -using System.Collections.Generic; - -using Bloxstrap.Enums; - -namespace Bloxstrap.Models +namespace Bloxstrap.Models { public class State { diff --git a/Bloxstrap/ProtocolHandler.cs b/Bloxstrap/ProtocolHandler.cs index 4d4c58c1..5d12b12f 100644 --- a/Bloxstrap/ProtocolHandler.cs +++ b/Bloxstrap/ProtocolHandler.cs @@ -1,14 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Web; +using System.Web; using System.Windows; using Microsoft.Win32; -using Bloxstrap.Enums; -using Bloxstrap.UI; - namespace Bloxstrap { static class ProtocolHandler diff --git a/Bloxstrap/Resource.cs b/Bloxstrap/Resource.cs index a5a89bb5..98df7e60 100644 --- a/Bloxstrap/Resource.cs +++ b/Bloxstrap/Resource.cs @@ -1,7 +1,4 @@ -using System.IO; -using System.Linq; -using System.Reflection; -using System.Threading.Tasks; +using System.Reflection; namespace Bloxstrap { diff --git a/Bloxstrap/RobloxActivity.cs b/Bloxstrap/RobloxActivity.cs index ca87f3c8..a0e89e27 100644 --- a/Bloxstrap/RobloxActivity.cs +++ b/Bloxstrap/RobloxActivity.cs @@ -1,14 +1,4 @@ -using System; -using System.IO; -using System.Linq; -using System.Text.Json; -using System.Text.RegularExpressions; -using System.Threading; -using System.Threading.Tasks; - -using Bloxstrap.Models; - -namespace Bloxstrap +namespace Bloxstrap { public class RobloxActivity : IDisposable { diff --git a/Bloxstrap/RobloxDeployment.cs b/Bloxstrap/RobloxDeployment.cs index dc597f1c..6667ca8e 100644 --- a/Bloxstrap/RobloxDeployment.cs +++ b/Bloxstrap/RobloxDeployment.cs @@ -1,13 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Text.Json; -using System.Threading.Tasks; - -using Bloxstrap.Models; - -namespace Bloxstrap +namespace Bloxstrap { public static class RobloxDeployment { diff --git a/Bloxstrap/UI/Controls.cs b/Bloxstrap/UI/Controls.cs index 34115be9..8d7faf85 100644 --- a/Bloxstrap/UI/Controls.cs +++ b/Bloxstrap/UI/Controls.cs @@ -1,8 +1,5 @@ -using System; -using System.Windows; +using System.Windows; -using Bloxstrap.Enums; -using Bloxstrap.Extensions; using Bloxstrap.UI.Elements.Bootstrapper; using Bloxstrap.UI.Menu; using Bloxstrap.UI.MessageBox; diff --git a/Bloxstrap/UI/Elements/Bootstrapper/Base/BaseFunctions.cs b/Bloxstrap/UI/Elements/Bootstrapper/Base/BaseFunctions.cs index c3e3c087..8e493a3b 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/Base/BaseFunctions.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/Base/BaseFunctions.cs @@ -1,5 +1,4 @@ -using System; -using System.Windows; +using System.Windows; namespace Bloxstrap.UI.Elements.Bootstrapper.Base { diff --git a/Bloxstrap/UI/Elements/Bootstrapper/Base/WinFormsDialogBase.cs b/Bloxstrap/UI/Elements/Bootstrapper/Base/WinFormsDialogBase.cs index 4627a0be..ba14b073 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/Base/WinFormsDialogBase.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/Base/WinFormsDialogBase.cs @@ -1,7 +1,5 @@ -using System; -using System.Windows.Forms; +using System.Windows.Forms; -using Bloxstrap.Extensions; using Bloxstrap.UI.Utility; namespace Bloxstrap.UI.Elements.Bootstrapper.Base diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs index a1d73855..88020adb 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs @@ -1,11 +1,8 @@ -using System; -using System.Windows; +using System.Windows; using System.Windows.Forms; using System.Windows.Media; using System.Windows.Media.Imaging; -using Bloxstrap.Enums; -using Bloxstrap.Extensions; using Bloxstrap.UI.Elements.Bootstrapper.Base; using Bloxstrap.UI.ViewModels.Bootstrapper; diff --git a/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml.cs b/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml.cs index fd3ec5e6..ac3311f0 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml.cs @@ -1,12 +1,9 @@ -using System; -using System.Windows; -using System.Windows.Forms; +using System.Windows.Forms; using Wpf.Ui.Appearance; using Wpf.Ui.Mvvm.Contracts; using Wpf.Ui.Mvvm.Services; -using Bloxstrap.Extensions; using Bloxstrap.UI.ViewModels.Bootstrapper; using Bloxstrap.UI.Elements.Bootstrapper.Base; diff --git a/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2008.cs b/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2008.cs index a84042cb..65d5251d 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2008.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2008.cs @@ -1,4 +1,3 @@ -using System; using System.Windows.Forms; using Bloxstrap.UI.Elements.Bootstrapper.Base; diff --git a/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2011.cs b/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2011.cs index ae7657b2..0588675a 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2011.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/LegacyDialog2011.cs @@ -1,7 +1,5 @@ -using System; using System.Windows.Forms; -using Bloxstrap.Extensions; using Bloxstrap.UI.Elements.Bootstrapper.Base; namespace Bloxstrap.UI.Elements.Bootstrapper diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs b/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs index 8773d766..4f9bb01b 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/ProgressDialog.cs @@ -1,9 +1,6 @@ -using System; -using System.Drawing; +using System.Drawing; using System.Windows.Forms; -using Bloxstrap.Enums; -using Bloxstrap.Extensions; using Bloxstrap.UI.Elements.Bootstrapper.Base; namespace Bloxstrap.UI.Elements.Bootstrapper diff --git a/Bloxstrap/UI/Elements/Bootstrapper/VistaDialog.cs b/Bloxstrap/UI/Elements/Bootstrapper/VistaDialog.cs index f102ad03..8a47f9cf 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/VistaDialog.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/VistaDialog.cs @@ -1,7 +1,5 @@ -using System; -using System.Windows.Forms; +using System.Windows.Forms; -using Bloxstrap.Extensions; using Bloxstrap.UI.Elements.Bootstrapper.Base; namespace Bloxstrap.UI.Elements.Bootstrapper diff --git a/Bloxstrap/UI/Elements/ExceptionDialog.xaml.cs b/Bloxstrap/UI/Elements/ExceptionDialog.xaml.cs index 2b71bcb7..6c071944 100644 --- a/Bloxstrap/UI/Elements/ExceptionDialog.xaml.cs +++ b/Bloxstrap/UI/Elements/ExceptionDialog.xaml.cs @@ -1,11 +1,7 @@ -using System; -using System.Diagnostics; -using System.Media; +using System.Media; using System.Windows; using System.Windows.Interop; -using Bloxstrap.Utility; - namespace Bloxstrap.UI { // hmm... do i use MVVM for this? diff --git a/Bloxstrap/UI/Elements/FluentMessageBox.xaml.cs b/Bloxstrap/UI/Elements/FluentMessageBox.xaml.cs index c04e178a..19157f62 100644 --- a/Bloxstrap/UI/Elements/FluentMessageBox.xaml.cs +++ b/Bloxstrap/UI/Elements/FluentMessageBox.xaml.cs @@ -1,12 +1,10 @@ -using System; -using System.Configuration; -using System.Media; +using System.Media; using System.Windows; using System.Windows.Controls; using System.Windows.Interop; using System.Windows.Media.Imaging; + using Bloxstrap.UI.Utility; -using Bloxstrap.Utility; namespace Bloxstrap.UI.MessageBox { diff --git a/Bloxstrap/UI/Elements/Menu/MainWindow.xaml.cs b/Bloxstrap/UI/Elements/Menu/MainWindow.xaml.cs index 65fed5ef..d974e529 100644 --- a/Bloxstrap/UI/Elements/Menu/MainWindow.xaml.cs +++ b/Bloxstrap/UI/Elements/Menu/MainWindow.xaml.cs @@ -1,12 +1,10 @@ -using System; -using System.Windows.Controls; +using System.Windows.Controls; using Wpf.Ui.Appearance; using Wpf.Ui.Controls.Interfaces; using Wpf.Ui.Mvvm.Contracts; using Wpf.Ui.Mvvm.Services; -using Bloxstrap.Extensions; using Bloxstrap.UI.ViewModels.Menu; namespace Bloxstrap.UI.Menu diff --git a/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml.cs b/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml.cs index 736197b7..f423e1b9 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml.cs +++ b/Bloxstrap/UI/Elements/Menu/Pages/BehaviourPage.xaml.cs @@ -1,9 +1,4 @@ -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Input; - -using Bloxstrap.UI.ViewModels.Menu; +using Bloxstrap.UI.ViewModels.Menu; namespace Bloxstrap.UI.Menu.Pages { diff --git a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml.cs b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml.cs index 7770a97b..ccf4cff2 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml.cs +++ b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagsPage.xaml.cs @@ -1,5 +1,4 @@ -using System; -using System.Windows.Input; +using System.Windows.Input; using Bloxstrap.UI.ViewModels.Menu; diff --git a/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml.cs b/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml.cs index 397aeca1..9210778b 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml.cs +++ b/Bloxstrap/UI/Elements/Menu/Pages/IntegrationsPage.xaml.cs @@ -1,6 +1,5 @@ using System.Windows.Controls; -using Bloxstrap.Models; using Bloxstrap.UI.ViewModels.Menu; namespace Bloxstrap.UI.Menu.Pages diff --git a/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml.cs b/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml.cs index 50cece0c..c3173d2e 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml.cs +++ b/Bloxstrap/UI/Elements/Menu/Pages/ModsPage.xaml.cs @@ -1,5 +1,4 @@ -using System; -using System.Windows; +using System.Windows; using Bloxstrap.UI.ViewModels.Menu; diff --git a/Bloxstrap/UI/IBootstrapperDialog.cs b/Bloxstrap/UI/IBootstrapperDialog.cs index 26b5aeeb..4b449007 100644 --- a/Bloxstrap/UI/IBootstrapperDialog.cs +++ b/Bloxstrap/UI/IBootstrapperDialog.cs @@ -1,5 +1,4 @@ -using System; -using System.Windows.Forms; +using System.Windows.Forms; namespace Bloxstrap.UI { diff --git a/Bloxstrap/UI/Utility/WindowScaling.cs b/Bloxstrap/UI/Utility/WindowScaling.cs index 8ede97a1..91447ad9 100644 --- a/Bloxstrap/UI/Utility/WindowScaling.cs +++ b/Bloxstrap/UI/Utility/WindowScaling.cs @@ -1,5 +1,4 @@ -using System; -using System.Windows; +using System.Windows; using System.Windows.Forms; namespace Bloxstrap.UI.Utility diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs index 5867d5c4..593921de 100644 --- a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs @@ -1,12 +1,9 @@ -using System.ComponentModel; -using System.Windows; +using System.Windows; using System.Windows.Input; using System.Windows.Media; using CommunityToolkit.Mvvm.Input; -using Bloxstrap.Extensions; - namespace Bloxstrap.UI.ViewModels.Bootstrapper { public class BootstrapperDialogViewModel : NotifyPropertyChangedViewModel diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/ByfronDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/ByfronDialogViewModel.cs index 568fe34b..29eb85a5 100644 --- a/Bloxstrap/UI/ViewModels/Bootstrapper/ByfronDialogViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Bootstrapper/ByfronDialogViewModel.cs @@ -1,8 +1,4 @@ -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; -using System.Windows; +using System.Windows; using System.Windows.Media; using System.Windows.Media.Imaging; diff --git a/Bloxstrap/UI/ViewModels/Menu/AboutViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/AboutViewModel.cs index 8291e121..5222f27c 100644 --- a/Bloxstrap/UI/ViewModels/Menu/AboutViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/AboutViewModel.cs @@ -1,8 +1,4 @@ -using System; -using System.Windows; - -using Bloxstrap.Extensions; -using Bloxstrap.Models.Attributes; +using System.Windows; namespace Bloxstrap.UI.ViewModels.Menu { diff --git a/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs index 19a5224b..d81edfcd 100644 --- a/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs @@ -1,16 +1,12 @@ -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Windows; +using System.Windows; using System.Windows.Controls; -using Microsoft.Win32; using System.Windows.Input; using System.Windows.Media; using CommunityToolkit.Mvvm.Input; -using Bloxstrap.Enums; -using Bloxstrap.Extensions; +using Microsoft.Win32; + using Bloxstrap.UI.Menu; namespace Bloxstrap.UI.ViewModels.Menu diff --git a/Bloxstrap/UI/ViewModels/Menu/BehaviourViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/BehaviourViewModel.cs index 07688194..38b1a192 100644 --- a/Bloxstrap/UI/ViewModels/Menu/BehaviourViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/BehaviourViewModel.cs @@ -1,14 +1,4 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; - - -using Bloxstrap.Enums; -using Bloxstrap.Extensions; -using Bloxstrap.Models; +using System.Windows; namespace Bloxstrap.UI.ViewModels.Menu { diff --git a/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs index 30ea3703..3ba02f61 100644 --- a/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/FastFlagsViewModel.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.IO; -using System.Linq; -using System.Windows; +using System.Windows; using System.Windows.Input; using CommunityToolkit.Mvvm.Input; diff --git a/Bloxstrap/UI/ViewModels/Menu/InstallationViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/InstallationViewModel.cs index 389abe84..c00093c2 100644 --- a/Bloxstrap/UI/ViewModels/Menu/InstallationViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/InstallationViewModel.cs @@ -1,6 +1,4 @@ -using System.ComponentModel; -using System.Diagnostics; -using System.Windows.Input; +using System.Windows.Input; using CommunityToolkit.Mvvm.Input; diff --git a/Bloxstrap/UI/ViewModels/Menu/IntegrationsViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/IntegrationsViewModel.cs index d0425ac6..640b8b84 100644 --- a/Bloxstrap/UI/ViewModels/Menu/IntegrationsViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/IntegrationsViewModel.cs @@ -1,11 +1,8 @@ using System.Collections.ObjectModel; -using System.ComponentModel; using System.Windows.Input; using CommunityToolkit.Mvvm.Input; -using Bloxstrap.Models; - namespace Bloxstrap.UI.ViewModels.Menu { public class IntegrationsViewModel : NotifyPropertyChangedViewModel diff --git a/Bloxstrap/UI/ViewModels/Menu/MainWindowViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/MainWindowViewModel.cs index cad2e8d9..9e51a3a3 100644 --- a/Bloxstrap/UI/ViewModels/Menu/MainWindowViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/MainWindowViewModel.cs @@ -1,9 +1,4 @@ -using System; -using System.ComponentModel; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; +using System.Windows; using System.Windows.Input; using Microsoft.Win32; diff --git a/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs index 7616c589..3502350d 100644 --- a/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/ModsViewModel.cs @@ -1,14 +1,6 @@ -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Windows; +using System.Windows; using System.Windows.Input; -using Bloxstrap.Enums; -using Bloxstrap.Extensions; - using Microsoft.Win32; using CommunityToolkit.Mvvm.Input; diff --git a/Bloxstrap/UI/ViewModels/NotifyPropertyChangedViewModel.cs b/Bloxstrap/UI/ViewModels/NotifyPropertyChangedViewModel.cs index 54acc1fd..6cf587b8 100644 --- a/Bloxstrap/UI/ViewModels/NotifyPropertyChangedViewModel.cs +++ b/Bloxstrap/UI/ViewModels/NotifyPropertyChangedViewModel.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.ComponentModel; namespace Bloxstrap.UI.ViewModels { diff --git a/Bloxstrap/Updater.cs b/Bloxstrap/Updater.cs index b438634d..39434e18 100644 --- a/Bloxstrap/Updater.cs +++ b/Bloxstrap/Updater.cs @@ -1,11 +1,4 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Windows; -using System.Threading; -using System.Threading.Tasks; - -using Bloxstrap.UI; +using System.Windows; namespace Bloxstrap { diff --git a/Bloxstrap/Utilities.cs b/Bloxstrap/Utilities.cs index 32194fad..c362a710 100644 --- a/Bloxstrap/Utilities.cs +++ b/Bloxstrap/Utilities.cs @@ -1,8 +1,4 @@ -using System; -using System.Diagnostics; -using System.IO; - -namespace Bloxstrap +namespace Bloxstrap { static class Utilities { diff --git a/Bloxstrap/Utility/AsyncMutex.cs b/Bloxstrap/Utility/AsyncMutex.cs index e6e972f9..400ccc89 100644 --- a/Bloxstrap/Utility/AsyncMutex.cs +++ b/Bloxstrap/Utility/AsyncMutex.cs @@ -1,11 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; - -namespace Bloxstrap.Tools +namespace Bloxstrap.Utility { // https://gist.github.com/dfederm/35c729f6218834b764fa04c219181e4e diff --git a/Bloxstrap/Utility/Http.cs b/Bloxstrap/Utility/Http.cs index dbdec6bd..3d1f402d 100644 --- a/Bloxstrap/Utility/Http.cs +++ b/Bloxstrap/Utility/Http.cs @@ -1,8 +1,4 @@ -using System; -using System.Text.Json; -using System.Threading.Tasks; - -namespace Bloxstrap.Utility +namespace Bloxstrap.Utility { internal static class Http { diff --git a/Bloxstrap/Utility/MD5Hash.cs b/Bloxstrap/Utility/MD5Hash.cs index 9e1abcb9..caa7e48a 100644 --- a/Bloxstrap/Utility/MD5Hash.cs +++ b/Bloxstrap/Utility/MD5Hash.cs @@ -1,34 +1,28 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; - -namespace Bloxstrap.Utility -{ - public static class MD5Hash - { - public static string FromFile(string filename) - { - using (MD5 md5 = MD5.Create()) - { - using (FileStream stream = File.OpenRead(filename)) - { - byte[] hash = md5.ComputeHash(stream); - return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant(); - } - } - } - - public static string FromBytes(byte[] data) - { - using (MD5 md5 = MD5.Create()) - { - byte[] hash = md5.ComputeHash(data); - return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant(); - } - } - } -} +using System.Security.Cryptography; + +namespace Bloxstrap.Utility +{ + public static class MD5Hash + { + public static string FromFile(string filename) + { + using (MD5 md5 = MD5.Create()) + { + using (FileStream stream = File.OpenRead(filename)) + { + byte[] hash = md5.ComputeHash(stream); + return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant(); + } + } + } + + public static string FromBytes(byte[] data) + { + using (MD5 md5 = MD5.Create()) + { + byte[] hash = md5.ComputeHash(data); + return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant(); + } + } + } +} diff --git a/Bloxstrap/Utility/NativeMethods.cs b/Bloxstrap/Utility/NativeMethods.cs index 76cbbb65..321fbcfd 100644 --- a/Bloxstrap/Utility/NativeMethods.cs +++ b/Bloxstrap/Utility/NativeMethods.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.InteropServices; namespace Bloxstrap.Utility { diff --git a/Bloxstrap/Utility/SystemEvent.cs b/Bloxstrap/Utility/SystemEvent.cs index 05eb590c..f4b47468 100644 --- a/Bloxstrap/Utility/SystemEvent.cs +++ b/Bloxstrap/Utility/SystemEvent.cs @@ -4,11 +4,7 @@ * Copyright (c) 2015-present MaximumADHD */ -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace Bloxstrap.Tools +namespace Bloxstrap.Utility { public class SystemEvent : EventWaitHandle {