Consolidation - global usings

This commit is contained in:
pizzaboxer 2023-07-15 22:52:44 +01:00
parent 77725ea5d7
commit 282d4c665a
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
72 changed files with 116 additions and 384 deletions

View File

@ -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
{
/// <summary>
@ -27,8 +11,6 @@ namespace Bloxstrap
/// </summary>
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";

View File

@ -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
{

View File

@ -1,7 +1,4 @@
using System;
using System.IO;
namespace Bloxstrap
namespace Bloxstrap
{
static class Directories
{

View File

@ -1,7 +1,4 @@
using System;
using System.Drawing;
using Bloxstrap.Enums;
using System.Drawing;
namespace Bloxstrap.Extensions
{

View File

@ -1,7 +1,4 @@
using Bloxstrap.Enums;
using Bloxstrap.UI;
namespace Bloxstrap.Extensions
namespace Bloxstrap.Extensions
{
static class BootstrapperStyleEx
{

View File

@ -1,8 +1,4 @@
using System.Collections.Generic;
using Bloxstrap.Enums;
namespace Bloxstrap.Extensions
namespace Bloxstrap.Extensions
{
static class CursorTypeEx
{

View File

@ -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");
}
}
}

View File

@ -1,8 +1,4 @@
using System.Collections.Generic;
using Bloxstrap.Enums;
namespace Bloxstrap.Extensions
namespace Bloxstrap.Extensions
{
static class EmojiTypeEx
{

View File

@ -1,5 +1,4 @@
using System.Drawing;
using System.IO;
using System.Windows.Media.Imaging;
using System.Windows.Media;

View File

@ -1,5 +1,4 @@
using Microsoft.Win32;
using Bloxstrap.Enums;
namespace Bloxstrap.Extensions
{

View File

@ -1,8 +1,4 @@
using System.Collections.Generic;
using System.IO;
using System.Text.Json;
namespace Bloxstrap
namespace Bloxstrap
{
public class FastFlagManager : JsonManager<Dictionary<string, object>>
{

22
Bloxstrap/GlobalUsings.cs Normal file
View File

@ -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;

View File

@ -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
{

View File

@ -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
{

View File

@ -1,6 +1,4 @@
using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows;
namespace Bloxstrap.Integrations
{

View File

@ -1,8 +1,4 @@
using System;
using System.IO;
using System.Text.Json;
namespace Bloxstrap
namespace Bloxstrap
{
public class JsonManager<T> where T : new()
{

View File

@ -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

View File

@ -1,6 +1,4 @@
using System;
namespace Bloxstrap.Models.Attributes
namespace Bloxstrap.Models.Attributes
{
[AttributeUsage(AttributeTargets.Assembly)]
public class BuildMetadataAttribute : Attribute

View File

@ -1,7 +1,4 @@
using System;
using System.Text.Json.Serialization;
namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class ClientVersion
{

View File

@ -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
{

View File

@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class FontFace
{

View File

@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class FontFamily
{

View File

@ -1,6 +1,4 @@
using System.Text.Json.Serialization;
namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class GameMessage
{

View File

@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class GithubRelease
{

View File

@ -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<Package>

View File

@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Bloxstrap.Models.RobloxApi
namespace Bloxstrap.Models.RobloxApi
{
/// <summary>
/// Roblox.Web.WebAPI.Models.ApiArrayResponse

View File

@ -1,6 +1,4 @@
using System.Text.Json.Serialization;
namespace Bloxstrap.Models.RobloxApi
namespace Bloxstrap.Models.RobloxApi
{
/// <summary>
/// Roblox.Games.Api.Models.Response.GameCreator

View File

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Bloxstrap.Models.RobloxApi
namespace Bloxstrap.Models.RobloxApi
{
/// <summary>

View File

@ -1,6 +1,4 @@
using System.Text.Json.Serialization;
namespace Bloxstrap.Models.RobloxApi
namespace Bloxstrap.Models.RobloxApi
{
/// <summary>
/// Roblox.Web.Responses.Thumbnails.ThumbnailResponse

View File

@ -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

View File

@ -1,7 +1,5 @@
using System.Collections.ObjectModel;
using Bloxstrap.Enums;
namespace Bloxstrap.Models
{
public class Settings

View File

@ -1,8 +1,4 @@
using System.Collections.Generic;
using Bloxstrap.Enums;
namespace Bloxstrap.Models
namespace Bloxstrap.Models
{
public class State
{

View File

@ -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

View File

@ -1,7 +1,4 @@
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Reflection;
namespace Bloxstrap
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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;

View File

@ -1,5 +1,4 @@
using System;
using System.Windows;
using System.Windows;
namespace Bloxstrap.UI.Elements.Bootstrapper.Base
{

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,3 @@
using System;
using System.Windows.Forms;
using Bloxstrap.UI.Elements.Bootstrapper.Base;

View File

@ -1,7 +1,5 @@
using System;
using System.Windows.Forms;
using Bloxstrap.Extensions;
using Bloxstrap.UI.Elements.Bootstrapper.Base;
namespace Bloxstrap.UI.Elements.Bootstrapper

View File

@ -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

View File

@ -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

View File

@ -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?

View File

@ -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
{

View File

@ -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

View File

@ -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
{

View File

@ -1,5 +1,4 @@
using System;
using System.Windows.Input;
using System.Windows.Input;
using Bloxstrap.UI.ViewModels.Menu;

View File

@ -1,6 +1,5 @@
using System.Windows.Controls;
using Bloxstrap.Models;
using Bloxstrap.UI.ViewModels.Menu;
namespace Bloxstrap.UI.Menu.Pages

View File

@ -1,5 +1,4 @@
using System;
using System.Windows;
using System.Windows;
using Bloxstrap.UI.ViewModels.Menu;

View File

@ -1,5 +1,4 @@
using System;
using System.Windows.Forms;
using System.Windows.Forms;
namespace Bloxstrap.UI
{

View File

@ -1,5 +1,4 @@
using System;
using System.Windows;
using System.Windows;
using System.Windows.Forms;
namespace Bloxstrap.UI.Utility

View File

@ -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

View File

@ -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;

View File

@ -1,8 +1,4 @@
using System;
using System.Windows;
using Bloxstrap.Extensions;
using Bloxstrap.Models.Attributes;
using System.Windows;
namespace Bloxstrap.UI.ViewModels.Menu
{

View File

@ -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

View File

@ -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
{

View File

@ -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;

View File

@ -1,6 +1,4 @@
using System.ComponentModel;
using System.Diagnostics;
using System.Windows.Input;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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
{

View File

@ -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
{

View File

@ -1,8 +1,4 @@
using System;
using System.Diagnostics;
using System.IO;
namespace Bloxstrap
namespace Bloxstrap
{
static class Utilities
{

View File

@ -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

View File

@ -1,8 +1,4 @@
using System;
using System.Text.Json;
using System.Threading.Tasks;
namespace Bloxstrap.Utility
namespace Bloxstrap.Utility
{
internal static class Http
{

View File

@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Security.Cryptography;
namespace Bloxstrap.Utility
{

View File

@ -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
{

View File

@ -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
{