Refactor class structure for singletons/utilities

cleanup necessary namespaces and adjust namespaces for certain classes to better represent what they're for
models, helpers and tools are all different and shouldnt really be under the same namespace
This commit is contained in:
pizzaboxer 2023-04-26 21:14:35 +01:00
parent 903fc42128
commit 58fb73c127
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
45 changed files with 204 additions and 223 deletions

View File

@ -14,10 +14,9 @@ using System.Windows.Threading;
using Microsoft.Win32;
using Bloxstrap.Dialogs;
using Bloxstrap.Enums;
using Bloxstrap.Helpers;
using Bloxstrap.Integrations;
using Bloxstrap.Extensions;
using Bloxstrap.Models;
using Bloxstrap.Singletons;
using Bloxstrap.Views;
namespace Bloxstrap
@ -240,7 +239,7 @@ namespace Bloxstrap
{
if (LaunchArgs[0].StartsWith("roblox-player:"))
{
commandLine = Protocol.ParseUri(LaunchArgs[0]);
commandLine = ProtocolHandler.ParseUri(LaunchArgs[0]);
}
else if (LaunchArgs[0].StartsWith("roblox:"))
{

View File

@ -13,10 +13,10 @@ using System.Windows;
using Microsoft.Win32;
using Bloxstrap.Dialogs;
using Bloxstrap.Helpers;
using Bloxstrap.Helpers.RSMM;
using Bloxstrap.Models;
using Bloxstrap.Integrations;
using Bloxstrap.Models;
using Bloxstrap.Singletons;
using Bloxstrap.Tools;
namespace Bloxstrap
{
@ -473,8 +473,8 @@ namespace Bloxstrap
// this doesn't go under register, so we check every launch
// just in case the stock bootstrapper changes it back
Protocol.Register("roblox", "Roblox", Directories.Application);
Protocol.Register("roblox-player", "Roblox", Directories.Application);
ProtocolHandler.Register("roblox", "Roblox", Directories.Application);
ProtocolHandler.Register("roblox-player", "Roblox", Directories.Application);
// in case the user is reinstalling
if (File.Exists(Directories.Application) && App.IsFirstRun)
@ -612,8 +612,8 @@ namespace Bloxstrap
RegistryKey? bootstrapperKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Uninstall\roblox-player");
if (bootstrapperKey is null)
{
Protocol.Unregister("roblox");
Protocol.Unregister("roblox-player");
ProtocolHandler.Unregister("roblox");
ProtocolHandler.Unregister("roblox-player");
}
else
{
@ -621,8 +621,8 @@ namespace Bloxstrap
string bootstrapperLocation = (string?)bootstrapperKey.GetValue("InstallLocation") + "RobloxPlayerLauncher.exe";
Protocol.Register("roblox", "Roblox", bootstrapperLocation);
Protocol.Register("roblox-player", "Roblox", bootstrapperLocation);
ProtocolHandler.Register("roblox", "Roblox", bootstrapperLocation);
ProtocolHandler.Register("roblox-player", "Roblox", bootstrapperLocation);
}
try

View File

@ -1,10 +1,8 @@
using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Forms;
using Bloxstrap.Enums;
using Bloxstrap.Helpers;
using Bloxstrap.Extensions;
namespace Bloxstrap.Dialogs
{

View File

@ -3,7 +3,7 @@ using System.Windows;
using System.Windows.Forms;
using Bloxstrap.Enums;
using Bloxstrap.Helpers.Extensions;
using Bloxstrap.Extensions;
using Bloxstrap.ViewModels;
using Wpf.Ui.Appearance;

View File

@ -1,7 +1,7 @@
using System;
using System.Windows.Forms;
using Bloxstrap.Enums;
using Bloxstrap.Extensions;
namespace Bloxstrap.Dialogs
{

View File

@ -3,7 +3,7 @@ using System.Drawing;
using System.Windows.Forms;
using Bloxstrap.Enums;
using Bloxstrap.Helpers.Extensions;
using Bloxstrap.Extensions;
namespace Bloxstrap.Dialogs
{

View File

@ -1,7 +1,7 @@
using System;
using System.Windows.Forms;
using Bloxstrap.Enums;
using Bloxstrap.Extensions;
namespace Bloxstrap.Dialogs
{

View File

@ -1,9 +1,9 @@
using System;
using System.IO;
namespace Bloxstrap.Helpers
namespace Bloxstrap
{
class Directories
static class Directories
{
// note that these are directories that aren't tethered to the basedirectory
// so these can safely be called before initialization
@ -21,7 +21,7 @@ namespace Bloxstrap.Helpers
public static string Application { get; private set; } = "";
public static bool Initialized => String.IsNullOrEmpty(Base);
public static bool Initialized => string.IsNullOrEmpty(Base);
public static void Initialize(string baseDirectory)
{

View File

@ -1,10 +1,4 @@
using System;
using System.Drawing;
using System.IO;
using System.Windows.Media;
using System.Windows.Media.Imaging;
namespace Bloxstrap.Enums
namespace Bloxstrap.Enums
{
public enum BootstrapperIcon
{
@ -18,44 +12,4 @@ namespace Bloxstrap.Enums
Icon2022,
IconCustom
}
public static class BootstrapperIconEx
{
// small note on handling icon sizes
// i'm using multisize icon packs here with sizes 16, 24, 32, 48, 64 and 128
// use this for generating multisize packs: https://www.aconvert.com/icon/
public static Icon GetIcon(this BootstrapperIcon icon)
{
// load the custom icon file
if (icon == BootstrapperIcon.IconCustom)
{
Icon? customIcon = null;
try
{
customIcon = new Icon(App.Settings.Prop.BootstrapperIconCustomLocation);
}
catch (Exception ex)
{
App.Logger.WriteLine($"[BootstrapperIconEx::GetIcon] Failed to load custom icon! {ex}");
}
return customIcon ?? Properties.Resources.IconBloxstrap;
}
return icon switch
{
BootstrapperIcon.IconBloxstrap => Properties.Resources.IconBloxstrap,
BootstrapperIcon.Icon2009 => Properties.Resources.Icon2009,
BootstrapperIcon.Icon2011 => Properties.Resources.Icon2011,
BootstrapperIcon.IconEarly2015 => Properties.Resources.IconEarly2015,
BootstrapperIcon.IconLate2015 => Properties.Resources.IconLate2015,
BootstrapperIcon.Icon2017 => Properties.Resources.Icon2017,
BootstrapperIcon.Icon2019 => Properties.Resources.Icon2019,
BootstrapperIcon.Icon2022 => Properties.Resources.Icon2022,
_ => Properties.Resources.IconBloxstrap
};
}
}
}

View File

@ -1,8 +1,4 @@
using System.Windows.Forms;
using Bloxstrap.Dialogs;
namespace Bloxstrap.Enums
namespace Bloxstrap.Enums
{
public enum BootstrapperStyle
{
@ -12,20 +8,4 @@ namespace Bloxstrap.Enums
ProgressDialog,
FluentDialog
}
public static class BootstrapperStyleEx
{
public static IBootstrapperDialog GetNew(this BootstrapperStyle bootstrapperStyle)
{
return bootstrapperStyle switch
{
BootstrapperStyle.VistaDialog => new VistaDialog(),
BootstrapperStyle.LegacyDialog2009 => new LegacyDialog2009(),
BootstrapperStyle.LegacyDialog2011 => new LegacyDialog2011(),
BootstrapperStyle.ProgressDialog => new ProgressDialog(),
BootstrapperStyle.FluentDialog => new FluentDialog(),
_ => new FluentDialog()
};
}
}
}

View File

@ -1,6 +1,4 @@
using Microsoft.Win32;
namespace Bloxstrap.Enums
namespace Bloxstrap.Enums
{
public enum Theme
{
@ -8,25 +6,4 @@ namespace Bloxstrap.Enums
Light,
Dark
}
public static class DialogThemeEx
{
public static Theme GetFinal(this Theme dialogTheme)
{
if (dialogTheme != Theme.Default)
return dialogTheme;
RegistryKey? key = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize");
if (key is not null)
{
var value = key.GetValue("AppsUseLightTheme");
if (value is not null && (int)value == 0)
return Theme.Dark;
}
return Theme.Light;
}
}
}

View File

@ -0,0 +1,47 @@
using System;
using System.Drawing;
using Bloxstrap.Enums;
namespace Bloxstrap.Extensions
{
static class BootstrapperIconEx
{
// small note on handling icon sizes
// i'm using multisize icon packs here with sizes 16, 24, 32, 48, 64 and 128
// use this for generating multisize packs: https://www.aconvert.com/icon/
public static Icon GetIcon(this BootstrapperIcon icon)
{
// load the custom icon file
if (icon == BootstrapperIcon.IconCustom)
{
Icon? customIcon = null;
try
{
customIcon = new Icon(App.Settings.Prop.BootstrapperIconCustomLocation);
}
catch (Exception ex)
{
App.Logger.WriteLine($"[BootstrapperIconEx::GetIcon] Failed to load custom icon! {ex}");
}
return customIcon ?? Properties.Resources.IconBloxstrap;
}
return icon switch
{
BootstrapperIcon.IconBloxstrap => Properties.Resources.IconBloxstrap,
BootstrapperIcon.Icon2009 => Properties.Resources.Icon2009,
BootstrapperIcon.Icon2011 => Properties.Resources.Icon2011,
BootstrapperIcon.IconEarly2015 => Properties.Resources.IconEarly2015,
BootstrapperIcon.IconLate2015 => Properties.Resources.IconLate2015,
BootstrapperIcon.Icon2017 => Properties.Resources.Icon2017,
BootstrapperIcon.Icon2019 => Properties.Resources.Icon2019,
BootstrapperIcon.Icon2022 => Properties.Resources.Icon2022,
_ => Properties.Resources.IconBloxstrap
};
}
}
}

View File

@ -0,0 +1,21 @@
using Bloxstrap.Dialogs;
using Bloxstrap.Enums;
namespace Bloxstrap.Extensions
{
static class BootstrapperStyleEx
{
public static IBootstrapperDialog GetNew(this BootstrapperStyle bootstrapperStyle)
{
return bootstrapperStyle switch
{
BootstrapperStyle.VistaDialog => new VistaDialog(),
BootstrapperStyle.LegacyDialog2009 => new LegacyDialog2009(),
BootstrapperStyle.LegacyDialog2011 => new LegacyDialog2011(),
BootstrapperStyle.ProgressDialog => new ProgressDialog(),
BootstrapperStyle.FluentDialog => new FluentDialog(),
_ => new FluentDialog()
};
}
}
}

View File

@ -3,7 +3,7 @@ using System.IO;
using System.Windows.Media.Imaging;
using System.Windows.Media;
namespace Bloxstrap.Helpers.Extensions
namespace Bloxstrap.Extensions
{
public static class IconEx
{

View File

@ -0,0 +1,26 @@
using Microsoft.Win32;
using Bloxstrap.Enums;
namespace Bloxstrap.Extensions
{
public static class ThemeEx
{
public static Theme GetFinal(this Theme dialogTheme)
{
if (dialogTheme != Theme.Default)
return dialogTheme;
RegistryKey? key = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize");
if (key is not null)
{
var value = key.GetValue("AppsUseLightTheme");
if (value is not null && (int)value == 0)
return Theme.Dark;
}
return Theme.Light;
}
}
}

View File

@ -1,13 +1,11 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
namespace Bloxstrap.Helpers
namespace Bloxstrap
{
public class GameActivityWatcher : IDisposable
{

View File

@ -3,14 +3,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Bloxstrap.Helpers;
using Bloxstrap.Models.RobloxApi;
using DiscordRPC;
using Bloxstrap.Models.RobloxApi;
namespace Bloxstrap.Integrations
{
class DiscordRichPresence : IDisposable
public class DiscordRichPresence : IDisposable
{
private readonly DiscordRpcClient _rpcClient = new("1005469189907173486");
private readonly GameActivityWatcher _activityWatcher;

View File

@ -6,15 +6,14 @@ using System.IO.Compression;
using System.Linq;
using System.Threading.Tasks;
using Bloxstrap.Helpers;
using Bloxstrap.Models;
using IniParser;
using IniParser.Model;
using Bloxstrap.Models;
namespace Bloxstrap.Integrations
{
internal class ReShade
public class ReShade
{
// i havent even started this and i know for a fact this is gonna be a mess of an integration lol
// there's a lot of nuances involved in how reshade functionality is supposed to work (shader management, config management, etc)

View File

@ -3,7 +3,6 @@ using System.Net.NetworkInformation;
using System.Threading.Tasks;
using System.Windows.Forms;
using Bloxstrap.Helpers;
using Bloxstrap.Properties;
namespace Bloxstrap.Integrations

View File

@ -1,11 +1,4 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class CustomIntegration
{

View File

@ -1,8 +1,12 @@
// https://github.com/MaximumADHD/Roblox-Studio-Mod-Manager/blob/main/ProjectSrc/Utility/Package.cs
/*
* Roblox Studio Mod Manager (ProjectSrc/Utility/Package.cs)
* MIT License
* Copyright (c) 2015-present MaximumADHD
*/
namespace Bloxstrap.Helpers.RSMM
namespace Bloxstrap.Models
{
internal class Package
public class Package
{
public string Name { get; set; } = "";
public string Signature { get; set; } = "";

View File

@ -1,13 +1,17 @@
// https://github.com/MaximumADHD/Roblox-Studio-Mod-Manager/blob/main/ProjectSrc/Bootstrapper/PackageManifest.cs
/*
* Roblox Studio Mod Manager (ProjectSrc/Utility/PackageManifest.cs)
* MIT License
* Copyright (c) 2015-present MaximumADHD
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
namespace Bloxstrap.Helpers.RSMM
namespace Bloxstrap.Models
{
internal class PackageManifest : List<Package>
public class PackageManifest : List<Package>
{
private PackageManifest(string data)
{

View File

@ -3,7 +3,7 @@
namespace Bloxstrap.Models.RobloxApi
{
// lmao its just one property
internal class UniverseIdResponse
public class UniverseIdResponse
{
[JsonPropertyName("universeId")]
public long UniverseId { get; set; }

View File

@ -1,8 +1,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Collections.ObjectModel;
using Bloxstrap.Enums;
using Bloxstrap.Helpers;
using Bloxstrap.Singletons;
namespace Bloxstrap.Models
{

View File

@ -1,15 +1,14 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Web;
using System.Windows;
using Microsoft.Win32;
namespace Bloxstrap.Helpers
namespace Bloxstrap
{
public class Protocol
static class ProtocolHandler
{
// map uri keys to command line args
private static readonly IReadOnlyDictionary<string, string> UriKeyArgMap = new Dictionary<string, string>()
@ -112,7 +111,7 @@ namespace Bloxstrap.Helpers
{
Registry.CurrentUser.DeleteSubKeyTree($@"Software\Classes\{key}");
}
catch (Exception ex)
catch (Exception ex)
{
App.Logger.WriteLine($"[Protocol::Unregister] Failed to unregister {key}: {ex}");
}

View File

@ -3,9 +3,9 @@ using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
namespace Bloxstrap.Helpers
namespace Bloxstrap
{
internal class ResourceHelper
static class ResourceHelper
{
static readonly Assembly assembly = Assembly.GetExecutingAssembly();
static readonly string[] resourceNames = assembly.GetManifestResourceNames();

View File

@ -8,7 +8,7 @@ using System.Windows;
using Bloxstrap.Models;
namespace Bloxstrap.Helpers
namespace Bloxstrap.Singletons
{
// TODO - make this functional and into a helper instead of a singleton, this really doesn't need to be OOP
@ -33,7 +33,7 @@ namespace Bloxstrap.Helpers
{
get
{
if (String.IsNullOrEmpty(_baseUrl))
if (string.IsNullOrEmpty(_baseUrl))
{
// check for a working accessible deployment domain
foreach (string attemptedUrl in BaseUrls)
@ -55,12 +55,12 @@ namespace Bloxstrap.Helpers
}
}
if (String.IsNullOrEmpty(_baseUrl))
if (string.IsNullOrEmpty(_baseUrl))
throw new Exception("Unable to find an accessible Roblox deploy mirror!");
}
if (Channel == DefaultChannel)
return _baseUrl;
return _baseUrl;
else
return $"{_baseUrl}/channel/{Channel.ToLower()}";
}
@ -94,10 +94,10 @@ namespace Bloxstrap.Helpers
// 404 = Could not find version details for binaryType.
// 500 = Error while fetching version information.
// either way, we throw
App.Logger.WriteLine(
"[DeployManager::GetLastDeploy] Failed to fetch deploy info!\r\n"+
$"\tStatus code: {deployInfoResponse.StatusCode}\r\n"+
"[DeployManager::GetLastDeploy] Failed to fetch deploy info!\r\n" +
$"\tStatus code: {deployInfoResponse.StatusCode}\r\n" +
$"\tResponse: {rawResponse}"
);
@ -163,8 +163,8 @@ namespace Bloxstrap.Helpers
// this SUCKS
ClientVersion defaultChannelInfo = await new DeployManager().GetLastDeploy().ConfigureAwait(false);
int defaultChannelVersion = Int32.Parse(defaultChannelInfo.Version.Split('.')[1]);
int currentChannelVersion = Int32.Parse(versionInfo.Version.Split('.')[1]);
int defaultChannelVersion = int.Parse(defaultChannelInfo.Version.Split('.')[1]);
int currentChannelVersion = int.Parse(versionInfo.Version.Split('.')[1]);
if (currentChannelVersion < defaultChannelVersion)
{

View File

@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.IO;
using System.Text.Json;
namespace Bloxstrap.Helpers
namespace Bloxstrap.Singletons
{
public class FastFlagManager : JsonManager<Dictionary<string, object>>
{
@ -27,8 +27,8 @@ namespace Bloxstrap.Helpers
// this is one hell of a variable definition lmao
public static IReadOnlyDictionary<string, Dictionary<string, string?>> IGMenuVersions => new Dictionary<string, Dictionary<string, string?>>
{
{
"Default",
{
"Default",
new Dictionary<string, string?>
{
{ "FFlagDisableNewIGMinDUA", null },

View File

@ -2,7 +2,7 @@
using System.IO;
using System.Text.Json;
namespace Bloxstrap.Helpers
namespace Bloxstrap.Singletons
{
public class JsonManager<T> where T : new()
{
@ -16,7 +16,7 @@ namespace Bloxstrap.Helpers
try
{
T? settings = JsonSerializer.Deserialize<T>(File.ReadAllText(FileLocation));
if (settings is null)
throw new ArgumentNullException("Deserialization returned null");

View File

@ -5,7 +5,7 @@ using System.IO;
using System.Text;
using System.Threading;
namespace Bloxstrap.Helpers
namespace Bloxstrap.Singletons
{
// https://stackoverflow.com/a/53873141/11852173
public class Logger
@ -27,7 +27,7 @@ namespace Bloxstrap.Helpers
_filestream = File.Open(filename, FileMode.Create, FileAccess.Write, FileShare.Read);
if (_backlog.Count > 0)
WriteToLog(String.Join("\r\n", _backlog));
WriteToLog(string.Join("\r\n", _backlog));
WriteLine($"[Logger::Logger] Initialized at {filename}");
}

View File

@ -5,9 +5,10 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace Bloxstrap.Helpers
namespace Bloxstrap.Tools
{
// https://gist.github.com/dfederm/35c729f6218834b764fa04c219181e4e
public sealed class AsyncMutex : IAsyncDisposable
{
private readonly string _name;

View File

@ -1,10 +1,14 @@
// https://github.com/MaximumADHD/Roblox-Studio-Mod-Manager/blob/main/ProjectSrc/Utility/SystemEvent.cs
/*
* Roblox Studio Mod Manager (ProjectSrc/Utility/SystemEvent.cs)
* MIT License
* Copyright (c) 2015-present MaximumADHD
*/
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Bloxstrap.Helpers.RSMM
namespace Bloxstrap.Tools
{
public class SystemEvent : EventWaitHandle
{

View File

@ -9,7 +9,7 @@ using System.Threading.Tasks;
using Bloxstrap.Properties;
using Bloxstrap.Views;
namespace Bloxstrap.Helpers
namespace Bloxstrap
{
public class Updater
{
@ -75,7 +75,7 @@ namespace Bloxstrap.Helpers
}
File.Copy(Environment.ProcessPath, Directories.Application);
Bootstrapper.Register();
if (isAutoUpgrade)

View File

@ -6,9 +6,9 @@ using System.Security.Cryptography;
using System.Text.Json;
using System.Threading.Tasks;
namespace Bloxstrap.Helpers
namespace Bloxstrap
{
public class Utilities
static class Utilities
{
public static bool IsDirectoryEmpty(string path)
{

View File

@ -1,8 +1,4 @@
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using Bloxstrap.Helpers;
namespace Bloxstrap.ViewModels
namespace Bloxstrap.ViewModels
{
public class AboutViewModel
{

View File

@ -6,11 +6,12 @@ using System.Windows.Controls;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using CommunityToolkit.Mvvm.Input;
using Bloxstrap.Dialogs;
using Bloxstrap.Enums;
using Bloxstrap.Helpers.Extensions;
using Bloxstrap.Extensions;
using Bloxstrap.Views;
namespace Bloxstrap.ViewModels

View File

@ -1,22 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using Bloxstrap.Dialogs;
using Bloxstrap.Enums;
using Bloxstrap.Helpers.Extensions;
using Bloxstrap.Views;
using CommunityToolkit.Mvvm.Input;
using Wpf.Ui.Mvvm.Services;
using Wpf.Ui.Mvvm.Contracts;
namespace Bloxstrap.ViewModels
namespace Bloxstrap.ViewModels
{
public class BehaviourViewModel
{

View File

@ -10,11 +10,11 @@ using System.Windows.Media;
using CommunityToolkit.Mvvm.Input;
using Bloxstrap.Dialogs;
using Bloxstrap.Enums;
using Bloxstrap.Helpers.Extensions;
using Bloxstrap.Extensions;
namespace Bloxstrap.ViewModels
{
class FluentDialogViewModel : INotifyPropertyChanged
public class FluentDialogViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;
public void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));

View File

@ -1,11 +1,6 @@
using Bloxstrap.Helpers;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace Bloxstrap.ViewModels
{

View File

@ -8,8 +8,8 @@ using System.Windows;
using System.Windows.Forms;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using Bloxstrap.Helpers;
using Bloxstrap.Models;
using Bloxstrap.Singletons;
namespace Bloxstrap.ViewModels
{

View File

@ -1,12 +1,12 @@
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;
using Bloxstrap.Helpers;
using Bloxstrap.Models;
using System.Collections.ObjectModel;
namespace Bloxstrap.ViewModels
{

View File

@ -2,9 +2,11 @@
using System.IO;
using System.Windows;
using System.Windows.Input;
using Bloxstrap.Helpers;
using Microsoft.Win32;
using CommunityToolkit.Mvvm.Input;
using Wpf.Ui.Controls.Interfaces;
using Wpf.Ui.Mvvm.Contracts;

View File

@ -3,9 +3,11 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Windows.Input;
using Bloxstrap.Helpers;
using CommunityToolkit.Mvvm.Input;
using Bloxstrap.Singletons;
namespace Bloxstrap.ViewModels
{
public class ModsViewModel : INotifyPropertyChanged

View File

@ -1,11 +1,13 @@
using System.Windows.Controls;
using System;
using System;
using System.Windows.Controls;
using Wpf.Ui.Appearance;
using Wpf.Ui.Controls.Interfaces;
using Wpf.Ui.Mvvm.Contracts;
using Bloxstrap.Enums;
using Bloxstrap.ViewModels;
using Wpf.Ui.Mvvm.Services;
using Wpf.Ui.Appearance;
using Bloxstrap.Extensions;
using Bloxstrap.ViewModels;
namespace Bloxstrap.Views
{

View File

@ -2,9 +2,9 @@
using System.Windows;
using System.Windows.Forms;
namespace Bloxstrap.Helpers
namespace Bloxstrap
{
public class WindowScaling
public static class WindowScaling
{
public static double GetFactor()
{