diff --git a/MagicChatboxV2/App.xaml b/MagicChatboxV2/App.xaml deleted file mode 100644 index 73dee03..0000000 --- a/MagicChatboxV2/App.xaml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - diff --git a/MagicChatboxV2/App.xaml.cs b/MagicChatboxV2/App.xaml.cs deleted file mode 100644 index b510e28..0000000 --- a/MagicChatboxV2/App.xaml.cs +++ /dev/null @@ -1,55 +0,0 @@ -using MagicChatboxV2.Services; -using MagicChatboxV2.Startup.Windows; -using MagicChatboxV2.Startup; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using System; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; -using MagicChatboxV2.Models; -using MagicChatboxV2.Modules; - -namespace MagicChatboxV2 -{ - public partial class App : Application - { - private IAppOutputService _appOutputService = null; - - public static IHost? AppHost { get; private set; } - - public App() - { - AppHost = Host.CreateDefaultBuilder() - .ConfigureServices(ServiceConfigurator.ConfigureServices) - .Build(); - } - - protected override async void OnStartup(StartupEventArgs e) - { - await AppHost!.StartAsync(); - - _appOutputService = AppHost.Services.GetRequiredService(); - AppDomain.CurrentDomain.UnhandledException += _appOutputService.HandleUnhandledDomainException; - DispatcherUnhandledException += _appOutputService.HandleUnhandledException; - - LoadingWindow loadingWindow = AppHost.Services.GetRequiredService(); - loadingWindow.Show(); - - var modules = AppHost.Services.GetServices().ToList(); - var initializationTasks = modules.Select(module => module.InitializeAsync()); - await Task.WhenAll(initializationTasks); - } - - protected override async void OnExit(ExitEventArgs e) - { - var modules = AppHost.Services.GetServices().ToList(); - var saveTasks = modules.Select(module => module.SaveStateAsync()); - await Task.WhenAll(saveTasks); - - await AppHost!.StopAsync(); - base.OnExit(e); - } - } -} diff --git a/MagicChatboxV2/AssemblyInfo.cs b/MagicChatboxV2/AssemblyInfo.cs deleted file mode 100644 index cc29e7f..0000000 --- a/MagicChatboxV2/AssemblyInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Windows; - -[assembly:ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] diff --git a/MagicChatboxV2/MagicChatboxV2.csproj b/MagicChatboxV2/MagicChatboxV2.csproj deleted file mode 100644 index 977b2a0..0000000 --- a/MagicChatboxV2/MagicChatboxV2.csproj +++ /dev/null @@ -1,39 +0,0 @@ - - - - WinExe - net6.0-windows - enable - enable - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MagicChatboxV2/MainWindow.xaml b/MagicChatboxV2/MainWindow.xaml deleted file mode 100644 index fa8703c..0000000 --- a/MagicChatboxV2/MainWindow.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - diff --git a/MagicChatboxV2/MainWindow.xaml.cs b/MagicChatboxV2/MainWindow.xaml.cs deleted file mode 100644 index ae2bbba..0000000 --- a/MagicChatboxV2/MainWindow.xaml.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Windows; - -namespace MagicChatboxV2 -{ - public partial class MainWindow : Window - { - public MainWindow() - { - InitializeComponent(); - } - } -} diff --git a/MagicChatboxV2/Models/IModule.cs b/MagicChatboxV2/Models/IModule.cs deleted file mode 100644 index 7b1cc79..0000000 --- a/MagicChatboxV2/Models/IModule.cs +++ /dev/null @@ -1,31 +0,0 @@ -using CommunityToolkit.Mvvm.ComponentModel; -using System; -using System.Threading.Tasks; - -namespace MagicChatboxV2.Models -{ - public interface IModule : IDisposable - { - string ModuleName { get; } - string ModuleVersion { get; } - string ModuleDescription { get; } - bool IsActive { get; set; } - - DateTime LastUpdated { get; } - event EventHandler DataUpdated; - - Task InitializeAsync(); - Task LoadStateAsync(); - Task SaveStateAsync(); - void StartUpdates(); - void StopUpdates(); - void UpdateData(); - string GetFormattedOutput(); - string UpdateAndGetOutput(); - } - - public interface IModule : IModule where T : ISettings - { - T Settings { get; set; } - } -} diff --git a/MagicChatboxV2/Models/ISettings.cs b/MagicChatboxV2/Models/ISettings.cs deleted file mode 100644 index 31d28a0..0000000 --- a/MagicChatboxV2/Models/ISettings.cs +++ /dev/null @@ -1,15 +0,0 @@ -using CommunityToolkit.Mvvm.ComponentModel; -using System; - -namespace MagicChatboxV2.Models -{ - public interface ISettings : IDisposable - { - bool Enabled { get; set; } - bool EnabledVR { get; set; } - bool EnabledDesktop { get; set; } - string SettingVersion { get; set; } - int ModulePosition { get; set; } - int ModuleMemberGroupNumbers { get; set; } - } -} diff --git a/MagicChatboxV2/Models/Settings.cs b/MagicChatboxV2/Models/Settings.cs deleted file mode 100644 index 4b1f4ee..0000000 --- a/MagicChatboxV2/Models/Settings.cs +++ /dev/null @@ -1,30 +0,0 @@ -using CommunityToolkit.Mvvm.ComponentModel; - -namespace MagicChatboxV2.Models -{ - public partial class Settings : ObservableRecipient, ISettings - { - [ObservableProperty] - private bool enabled; - - [ObservableProperty] - private bool enabledVR; - - [ObservableProperty] - private bool enabledDesktop; - - [ObservableProperty] - private string settingVersion; - - [ObservableProperty] - private int modulePosition; - - [ObservableProperty] - private int moduleMemberGroupNumbers; - - public void Dispose() - { - // Dispose of unmanaged resources here. - } - } -} diff --git a/MagicChatboxV2/Modules/CurrentTimeModule.cs b/MagicChatboxV2/Modules/CurrentTimeModule.cs deleted file mode 100644 index f2a79fd..0000000 --- a/MagicChatboxV2/Modules/CurrentTimeModule.cs +++ /dev/null @@ -1,225 +0,0 @@ -using CommunityToolkit.Mvvm.ComponentModel; -using MagicChatboxV2.Models; -using MagicChatboxV2.Services; -using Serilog; -using System; -using System.Globalization; -using System.Linq; -using System.Threading.Tasks; - -namespace MagicChatboxV2.Modules -{ - public partial class CurrentTimeSettings : ObservableObject, ISettings - { - [ObservableProperty] - private bool enabled; - - [ObservableProperty] - private bool enabledVR; - - [ObservableProperty] - private bool enabledDesktop; - - [ObservableProperty] - private string settingVersion; - - [ObservableProperty] - private int modulePosition; - - [ObservableProperty] - private int moduleMemberGroupNumbers; - - [ObservableProperty] - private CurrentTimeZone selectedTimeZone = CurrentTimeZone.EST; - - [ObservableProperty] - private bool autoSetDaylight = true; - - [ObservableProperty] - private bool convertTimeToTimeZone = false; - - [ObservableProperty] - private bool time24H = true; - - [ObservableProperty] - private bool useSystemCulture = true; - - public void Dispose() - { - // Dispose of unmanaged resources here. - } - - public enum CurrentTimeZone - { - UTC, - EST, - CST, - PST, - CET, - AEST, - GMT, - IST, - JST - } - } - - public partial class CurrentTimeModule : ObservableObject, IModule - { - public string ModuleName => "Current time"; - public string ModuleVersion => "1.0.0"; // Example version - public string ModuleDescription => "Displays the current time in various time zones."; // Example description - - [ObservableProperty] - private bool isActive; - - [ObservableProperty] - private DateTime lastUpdated; - - public event EventHandler DataUpdated; - - [ObservableProperty] - private CurrentTimeSettings settings; - - private readonly ISettingsService _settingsService; - private readonly IAppOutputService _appOutputService; - - public CurrentTimeModule(ISettingsService settingsService, IAppOutputService appOutputService) - { - _settingsService = settingsService; - _appOutputService = appOutputService; - Settings = new CurrentTimeSettings(); - IsActive = true; - } - - public async Task InitializeAsync() - { - await LoadStateAsync(); - Console.WriteLine($"{ModuleName} initialized."); - } - - public async Task LoadStateAsync() - { - Settings = await _settingsService.LoadSettingsAsync(); - } - - public async Task SaveStateAsync() - { - await _settingsService.SaveSettingsAsync(Settings); - } - - public void StartUpdates() - { - // Start background updates if required - } - - public void StopUpdates() - { - // Stop background updates if required - } - - public void UpdateData() - { - try - { - LastUpdated = DateTime.Now; - DataUpdated?.Invoke(this, EventArgs.Empty); - } - catch (Exception ex) - { - _appOutputService.LogError($"Failed to update data for {ModuleName}: {ex.Message}"); - } - } - - public string GetFormattedOutput() - { - return GetFormattedTime(DateTimeOffset.Now, Settings); - } - - public string UpdateAndGetOutput() - { - UpdateData(); - return GetFormattedOutput(); - } - - private TimeZoneInfo GetTimeZoneInfo(CurrentTimeSettings.CurrentTimeZone selectedTimeZone) - { - string timeZoneId = selectedTimeZone switch - { - CurrentTimeSettings.CurrentTimeZone.UTC => "UTC", - CurrentTimeSettings.CurrentTimeZone.EST => "Eastern Standard Time", - CurrentTimeSettings.CurrentTimeZone.CST => "Central Standard Time", - CurrentTimeSettings.CurrentTimeZone.PST => "Pacific Standard Time", - CurrentTimeSettings.CurrentTimeZone.CET => "Central European Standard Time", - CurrentTimeSettings.CurrentTimeZone.AEST => "E. Australia Standard Time", - CurrentTimeSettings.CurrentTimeZone.GMT => "GMT Standard Time", - CurrentTimeSettings.CurrentTimeZone.IST => "India Standard Time", - CurrentTimeSettings.CurrentTimeZone.JST => "Tokyo Standard Time", - _ => TimeZoneInfo.Local.Id - }; - return TimeZoneInfo.FindSystemTimeZoneById(timeZoneId); - } - - private static DateTimeOffset GetDateTimeWithZone( - bool autoSetDaylight, - bool timeShowTimeZone, - DateTimeOffset localDateTime, - TimeZoneInfo timeZoneInfo, - out TimeSpan timeZoneOffset) - { - DateTimeOffset dateTimeWithZone; - - if (autoSetDaylight) - { - if (timeShowTimeZone) - { - timeZoneOffset = timeZoneInfo.GetUtcOffset(localDateTime); - dateTimeWithZone = TimeZoneInfo.ConvertTime(localDateTime, timeZoneInfo); - } - else - { - timeZoneOffset = TimeZoneInfo.Local.GetUtcOffset(localDateTime); - dateTimeWithZone = localDateTime; - } - } - else - { - timeZoneOffset = timeZoneInfo.BaseUtcOffset; - if (timeZoneInfo.SupportsDaylightSavingTime && timeZoneInfo.IsDaylightSavingTime(localDateTime)) - { - TimeSpan adjustment = timeZoneInfo.GetAdjustmentRules().FirstOrDefault()?.DaylightDelta ?? TimeSpan.Zero; - timeZoneOffset = timeZoneOffset.Add(adjustment); - } - dateTimeWithZone = localDateTime.ToOffset(timeZoneOffset); - } - return dateTimeWithZone; - } - - public static string GetFormattedTime(DateTimeOffset dateTimeWithZone, CurrentTimeSettings settings) - { - TimeZoneInfo timeZoneInfo = settings.ConvertTimeToTimeZone ? TimeZoneInfo.FindSystemTimeZoneById(settings.SelectedTimeZone.ToString()) : TimeZoneInfo.Local; - TimeSpan timeZoneOffset; - dateTimeWithZone = GetDateTimeWithZone( - settings.AutoSetDaylight, - settings.ConvertTimeToTimeZone, - dateTimeWithZone, - timeZoneInfo, - out timeZoneOffset); - - string timeZoneDisplay = settings.ConvertTimeToTimeZone ? - $" ({settings.SelectedTimeZone}{(timeZoneOffset < TimeSpan.Zero ? "" : "+")}{timeZoneOffset.Hours:00})" : - ""; - - CultureInfo userCulture = settings.UseSystemCulture ? CultureInfo.CurrentCulture : CultureInfo.InvariantCulture; - string timeFormat = settings.Time24H ? "HH:mm" : "hh:mm tt"; - - string formattedTime = dateTimeWithZone.ToString(timeFormat, userCulture); - - return settings.ConvertTimeToTimeZone ? formattedTime + timeZoneDisplay : formattedTime; - } - - public void Dispose() - { - Settings.Dispose(); - } - } -} diff --git a/MagicChatboxV2/Services/AppOutputService.cs b/MagicChatboxV2/Services/AppOutputService.cs deleted file mode 100644 index a3c9b20..0000000 --- a/MagicChatboxV2/Services/AppOutputService.cs +++ /dev/null @@ -1,99 +0,0 @@ -using Serilog; -using Serilog.Events; -using System; -using System.Windows.Threading; - -namespace MagicChatboxV2.Services -{ - public interface IAppOutputService - { - void HandleUnhandledDomainException(object sender, UnhandledExceptionEventArgs e); - void HandleUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e); - void LogExceptionWithDialog(Exception ex, string message = "An error occurred", LogEventLevel level = LogEventLevel.Error, bool exitApp = false, bool allowContinue = false, int timeout = 5000, bool autoclose = false); - bool ShowErrorDialog(Exception ex, string message = "Something went wrong...", int timeout = 5000, bool autoclose = false, bool allowContinue = false); - void ShowInfoDialog(string message, int timeout = 5000, bool autoclose = false); - void LogException(Exception ex, string message = "An error occurred", LogEventLevel level = LogEventLevel.Error, bool exitApp = false, int timeout = 5000, bool autoclose = false); - void LogFatal(string message); - void LogError(string message, bool exitApp = false, int timeout = 5000, bool autoclose = false); - void LogWarning(string message); - void LogInformation(string message); - } - - public class AppOutputService : IAppOutputService - { - private readonly IDialogService _dialogService; - private readonly ILogger _logger; - - public AppOutputService(IDialogService dialogService, ILogger logger) - { - _dialogService = dialogService; - _logger = logger; - } - - public void LogExceptionWithDialog(Exception ex, string message, LogEventLevel level, bool exitApp, bool allowContinue, int timeout, bool autoclose) - { - _logger.Write(level, ex, message); - bool userWantsToExit = ShowErrorDialog(ex, message, timeout, autoclose, allowContinue); - if (exitApp && userWantsToExit) - Environment.Exit(1); - } - - public bool ShowErrorDialog(Exception ex, string message, int timeout, bool autoclose, bool allowContinue) - { - return _dialogService.ShowErrorDialog(ex, message, timeout, autoclose, allowContinue); - } - - public void ShowInfoDialog(string message, int timeout, bool autoclose) - { - _dialogService.ShowInfoDialog(message, timeout, autoclose); - } - - public void LogException(Exception ex, string message, LogEventLevel level, bool exitApp, int timeout, bool autoclose) - { - _logger.Write(level, ex, message); - if (exitApp) - { - bool userWantsToExit = ShowErrorDialog(ex, message, timeout, autoclose, false); - if (userWantsToExit) - Environment.Exit(1); - } - } - - public void LogFatal(string message) - { - _logger.Fatal(message); - Environment.Exit(1); - } - - public void LogError(string message, bool exitApp = false, int timeout = 5000, bool autoclose = false) - { - _logger.Error(message); - if (exitApp) - { - bool userWantsToExit = ShowErrorDialog(new Exception(message), message, timeout, autoclose, false); - if (userWantsToExit) - Environment.Exit(1); - } - } - - public void LogWarning(string message) - { - _logger.Warning(message); - } - - public void LogInformation(string message) - { - _logger.Information(message); - } - - public void HandleUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) - { - LogExceptionWithDialog(e.Exception, "An unhandled exception occurred", LogEventLevel.Error, true, true, 5000, false); - } - - public void HandleUnhandledDomainException(object sender, UnhandledExceptionEventArgs e) - { - LogExceptionWithDialog(e.ExceptionObject as Exception, "An unhandled domain exception occurred", LogEventLevel.Error, true, true, 5000, false); - } - } -} diff --git a/MagicChatboxV2/Services/DialogService.cs b/MagicChatboxV2/Services/DialogService.cs deleted file mode 100644 index 2811aff..0000000 --- a/MagicChatboxV2/Services/DialogService.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Windows; - -namespace MagicChatboxV2.Services -{ - public interface IDialogService - { - bool ShowErrorDialog(Exception ex, string message, int timeout, bool autoclose, bool allowContinue); - void ShowInfoDialog(string message, int timeout, bool autoclose); - } - - public class DialogService : IDialogService - { - public bool ShowErrorDialog(Exception ex, string message, int timeout, bool autoclose, bool allowContinue) - { - MessageBoxButton buttons = allowContinue ? MessageBoxButton.YesNo : MessageBoxButton.OK; - MessageBoxResult result = MessageBox.Show(message, "Error", buttons, MessageBoxImage.Error); - return result == MessageBoxResult.Yes; - } - - public void ShowInfoDialog(string message, int timeout, bool autoclose) - { - MessageBox.Show(message, "Information", MessageBoxButton.OK, MessageBoxImage.Information); - } - } -} diff --git a/MagicChatboxV2/Services/ModuleCenterService.cs b/MagicChatboxV2/Services/ModuleCenterService.cs deleted file mode 100644 index c254c4b..0000000 --- a/MagicChatboxV2/Services/ModuleCenterService.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MagicChatboxV2.Services -{ - public class ModuleCenterService - { - public ModuleCenterService() - { - } - } -} diff --git a/MagicChatboxV2/Services/SettingsService.cs b/MagicChatboxV2/Services/SettingsService.cs deleted file mode 100644 index e4ba8c3..0000000 --- a/MagicChatboxV2/Services/SettingsService.cs +++ /dev/null @@ -1,108 +0,0 @@ -using MagicChatboxV2.Models; -using Serilog.Events; -using System; -using System.IO; -using System.Text.Json; -using System.Threading.Tasks; - -namespace MagicChatboxV2.Services -{ - public interface ISettingsService - { - Task SaveSettingsAsync(T settings) where T : ISettings; - Task LoadSettingsAsync() where T : ISettings; - } - - public class SettingsService : ISettingsService - { - private readonly string settingsDirectory; - private readonly IAppOutputService _appOutputService; - - public SettingsService(IAppOutputService appOutputService) - { - settingsDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MagicChatboxV2"); - Directory.CreateDirectory(settingsDirectory); - _appOutputService = appOutputService; - } - - public async Task SaveSettingsAsync(T settings) where T : ISettings - { - try - { - if (settings == null) - { - Exception ex = new Exception($"Failed to save settings for {typeof(T).Name} because the settings object was null."); - _appOutputService.LogExceptionWithDialog(ex, "Failed to save settings", LogEventLevel.Error, false, true, 5000, false); - return; - } - - string settingsFilePath = GetSettingsFilePath(typeof(T).Name); - var options = new JsonSerializerOptions { WriteIndented = true }; - string json = JsonSerializer.Serialize(settings, options); - - if (string.IsNullOrWhiteSpace(json)) - { - Exception ex = new Exception($"Failed to serialize settings for {typeof(T).Name} because the JSON string was empty."); - _appOutputService.LogExceptionWithDialog(ex, "Failed to serialize settings", LogEventLevel.Error, false, true, 5000, false); - return; - } - - await File.WriteAllTextAsync(settingsFilePath, json); - } - catch (Exception ex) - { - _appOutputService.LogExceptionWithDialog(new Exception($"Failed to save settings for {typeof(T).Name}: {ex.Message}\n{ex.StackTrace}", ex), "Error saving settings", LogEventLevel.Error, false, true, 5000, false); - } - } - - public async Task LoadSettingsAsync() where T : ISettings - { - try - { - string settingsFilePath = GetSettingsFilePath(typeof(T).Name); - if (File.Exists(settingsFilePath)) - { - string json = await File.ReadAllTextAsync(settingsFilePath); - if (string.IsNullOrWhiteSpace(json) || json.Contains("null")) - { - return await GetNewSettingsAsync(typeof(T).Name); - } - return JsonSerializer.Deserialize(json); - } - else - { - Exception ex = new FileNotFoundException($"Settings file not found for {typeof(T).Name}", settingsFilePath); - _appOutputService.LogExceptionWithDialog(ex, "Settings file not found", LogEventLevel.Error, false, true, 5000, false); - return await GetNewSettingsAsync(typeof(T).Name); - } - } - catch (Exception ex) - { - _appOutputService.LogExceptionWithDialog(new Exception($"Failed to load settings for {typeof(T).Name}: {ex.Message}\n{ex.StackTrace}", ex), "Error loading settings", LogEventLevel.Error, false, true, 5000, false); - return await GetNewSettingsAsync(typeof(T).Name); - } - } - - private async Task GetNewSettingsAsync(string moduleName) where T : ISettings - { - try - { - var settings = (T)Activator.CreateInstance(typeof(T)); - await SaveSettingsAsync(settings); - return settings; - } - catch (Exception ex) - { - _appOutputService.LogExceptionWithDialog(ex, "Error creating new settings", LogEventLevel.Error, false, true, 5000, false); - return default; - } - } - - - - private string GetSettingsFilePath(string moduleName) - { - return Path.Combine(settingsDirectory, $"{moduleName}.json"); - } - } -} diff --git a/MagicChatboxV2/Services/StartUpService.cs b/MagicChatboxV2/Services/StartUpService.cs deleted file mode 100644 index c6e8924..0000000 --- a/MagicChatboxV2/Services/StartUpService.cs +++ /dev/null @@ -1,21 +0,0 @@ -using MagicChatboxV2.Startup.Windows; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace MagicChatboxV2.Services -{ - public class StartUpService - { - private readonly LoadingWindowViewModel _loadingWindowsViewModel; - - - public StartUpService(LoadingWindowViewModel loadingWindowViewModel) - { - _loadingWindowsViewModel = loadingWindowViewModel; - } - - } -} diff --git a/MagicChatboxV2/Startup/ServiceConfigurator.cs b/MagicChatboxV2/Startup/ServiceConfigurator.cs deleted file mode 100644 index bb9999c..0000000 --- a/MagicChatboxV2/Startup/ServiceConfigurator.cs +++ /dev/null @@ -1,72 +0,0 @@ -using MagicChatboxV2.Models; -using MagicChatboxV2.Modules; -using MagicChatboxV2.Services; -using MagicChatboxV2.Startup.Windows; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Serilog; - -namespace MagicChatboxV2.Startup -{ - public class ServiceConfigurator - { - public static void ConfigureServices(HostBuilderContext hostContext, IServiceCollection services) - { - ConfigureWindows(services); - ConfigureDialogs(services); - ConfigureViewModels(services); - ConfigureDataLayer(services); - ConfigureAppServices(services); - ConfigureModules(services); - ConfigureLogging(services); - } - - private static void ConfigureWindows(IServiceCollection services) - { - services.AddSingleton(); - services.AddSingleton(); - } - - private static void ConfigureDialogs(IServiceCollection services) - { - services.AddSingleton(); - } - - private static void ConfigureViewModels(IServiceCollection services) - { - services.AddSingleton(); - // Add other ViewModels - } - - private static void ConfigureDataLayer(IServiceCollection services) - { - // Configure data layer services if needed - } - - private static void ConfigureAppServices(IServiceCollection services) - { - services.AddSingleton(); - services.AddSingleton(); - // Add other services as needed - } - - private static void ConfigureModules(IServiceCollection services) - { - services.AddSingleton(); - services.AddSingleton(provider => provider.GetRequiredService()); - services.AddSingleton>(provider => provider.GetRequiredService()); - // Register other modules similarly - } - - private static void ConfigureLogging(IServiceCollection services) - { - Log.Logger = new LoggerConfiguration() - .MinimumLevel.Debug() - .WriteTo.Console() - .WriteTo.File("logs/log.txt", rollingInterval: RollingInterval.Day) - .CreateLogger(); - - services.AddSingleton(Log.Logger); - } - } -} diff --git a/MagicChatboxV2/Startup/Windows/LoadingWindow.xaml b/MagicChatboxV2/Startup/Windows/LoadingWindow.xaml deleted file mode 100644 index d5104ec..0000000 --- a/MagicChatboxV2/Startup/Windows/LoadingWindow.xaml +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/MagicChatboxV2/Startup/Windows/LoadingWindow.xaml.cs b/MagicChatboxV2/Startup/Windows/LoadingWindow.xaml.cs deleted file mode 100644 index 71d7e62..0000000 --- a/MagicChatboxV2/Startup/Windows/LoadingWindow.xaml.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Windows; -using System.Windows.Input; - -namespace MagicChatboxV2.Startup.Windows -{ - public partial class LoadingWindow : Window - { - public LoadingWindow(LoadingWindowViewModel viewModel) - { - InitializeComponent(); - DataContext = viewModel; - } - - private void DraggableGrid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) - { - if (e.ChangedButton == MouseButton.Left) - { - this.DragMove(); - } - } - } -} diff --git a/MagicChatboxV2/Startup/Windows/LoadingWindowViewModel.cs b/MagicChatboxV2/Startup/Windows/LoadingWindowViewModel.cs deleted file mode 100644 index 38c95a8..0000000 --- a/MagicChatboxV2/Startup/Windows/LoadingWindowViewModel.cs +++ /dev/null @@ -1,26 +0,0 @@ -using CommunityToolkit.Mvvm.ComponentModel; -using CommunityToolkit.Mvvm.Input; - -namespace MagicChatboxV2.Startup.Windows -{ - public partial class LoadingWindowViewModel : ObservableObject - { - [ObservableProperty] - private string progressMessage; - - [ObservableProperty] - private double progressValue; - - public LoadingWindowViewModel() - { - CancelCommand = new RelayCommand(Cancel); - } - - public IRelayCommand CancelCommand { get; } - - private void Cancel() - { - Environment.Exit(1); - } - } -} diff --git a/MagicChatboxV2/UI/MagicOSC_icon.ico b/MagicChatboxV2/UI/MagicOSC_icon.ico deleted file mode 100644 index 8508831..0000000 Binary files a/MagicChatboxV2/UI/MagicOSC_icon.ico and /dev/null differ diff --git a/MagicChatboxV2/UI/MagicOSC_icon.png b/MagicChatboxV2/UI/MagicOSC_icon.png deleted file mode 100644 index 7a55c39..0000000 Binary files a/MagicChatboxV2/UI/MagicOSC_icon.png and /dev/null differ diff --git a/vrcosc-magicchatbox.sln b/vrcosc-magicchatbox.sln index 49a3484..8a98bee 100644 --- a/vrcosc-magicchatbox.sln +++ b/vrcosc-magicchatbox.sln @@ -5,8 +5,6 @@ VisualStudioVersion = 17.0.32112.339 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MagicChatbox", "vrcosc-magicchatbox\MagicChatbox.csproj", "{76FB3E35-94A5-445C-87F2-D75E9F701E5F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicChatboxV2", "MagicChatboxV2\MagicChatboxV2.csproj", "{B1E75696-1878-43C8-A542-6B32CED72888}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Beta|Any CPU = Beta|Any CPU @@ -20,12 +18,6 @@ Global {76FB3E35-94A5-445C-87F2-D75E9F701E5F}.Debug|Any CPU.Build.0 = Debug|Any CPU {76FB3E35-94A5-445C-87F2-D75E9F701E5F}.Release|Any CPU.ActiveCfg = Release|Any CPU {76FB3E35-94A5-445C-87F2-D75E9F701E5F}.Release|Any CPU.Build.0 = Release|Any CPU - {B1E75696-1878-43C8-A542-6B32CED72888}.Beta|Any CPU.ActiveCfg = Debug|Any CPU - {B1E75696-1878-43C8-A542-6B32CED72888}.Beta|Any CPU.Build.0 = Debug|Any CPU - {B1E75696-1878-43C8-A542-6B32CED72888}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B1E75696-1878-43C8-A542-6B32CED72888}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B1E75696-1878-43C8-A542-6B32CED72888}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B1E75696-1878-43C8-A542-6B32CED72888}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE