From 8a7596d66a0ce386cd78645898badf0eb4a99478 Mon Sep 17 00:00:00 2001 From: Ionite Date: Sun, 28 May 2023 16:47:35 -0400 Subject: [PATCH 01/15] Add NLog config target - debug console --- StabilityMatrix/App.xaml.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/StabilityMatrix/App.xaml.cs b/StabilityMatrix/App.xaml.cs index 82e6640d..8335b1be 100644 --- a/StabilityMatrix/App.xaml.cs +++ b/StabilityMatrix/App.xaml.cs @@ -48,6 +48,7 @@ namespace StabilityMatrix serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); @@ -70,10 +71,15 @@ namespace StabilityMatrix client.BaseAddress = new Uri("http://localhost:7860"); }); + // Logging configuration var logPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "log.txt"); var logConfig = new NLog.Config.LoggingConfiguration(); + // File logging var fileTarget = new NLog.Targets.FileTarget("logfile") { FileName = logPath }; - logConfig.AddRule(NLog.LogLevel.Trace, NLog.LogLevel.Fatal, fileTarget); + // Log trace+ to debug console + var debugTarget = new NLog.Targets.DebuggerTarget("debugger") { Layout = "${message}" }; + logConfig.AddRule(NLog.LogLevel.Info, NLog.LogLevel.Fatal, fileTarget); + logConfig.AddRule(NLog.LogLevel.Trace, NLog.LogLevel.Fatal, debugTarget); NLog.LogManager.Configuration = logConfig; serviceCollection.AddLogging(log => From f1a40d3c07d72d742d1acfd01706eec7ae9e2866 Mon Sep 17 00:00:00 2001 From: Ionite Date: Sun, 28 May 2023 16:48:20 -0400 Subject: [PATCH 02/15] Add launch options popup --- StabilityMatrix/LaunchOptionsDialog.xaml | 90 +++++++++++++++++++ StabilityMatrix/LaunchOptionsDialog.xaml.cs | 13 +++ StabilityMatrix/LaunchPage.xaml | 66 +++++++++----- StabilityMatrix/Models/BasePackage.cs | 2 + StabilityMatrix/Models/InstalledPackage.cs | 4 +- StabilityMatrix/Models/LaunchOptionCard.cs | 11 +++ .../Models/LaunchOptionDefinition.cs | 17 ++++ StabilityMatrix/Models/Packages/A3WebUI.cs | 20 +++++ .../Models/Packages/DankDiffusion.cs | 22 ++++- .../LaunchOptionsDialogViewModel.cs | 22 +++++ StabilityMatrix/ViewModels/LaunchViewModel.cs | 37 +++++++- 11 files changed, 279 insertions(+), 25 deletions(-) create mode 100644 StabilityMatrix/LaunchOptionsDialog.xaml create mode 100644 StabilityMatrix/LaunchOptionsDialog.xaml.cs create mode 100644 StabilityMatrix/Models/LaunchOptionCard.cs create mode 100644 StabilityMatrix/Models/LaunchOptionDefinition.cs create mode 100644 StabilityMatrix/ViewModels/LaunchOptionsDialogViewModel.cs diff --git a/StabilityMatrix/LaunchOptionsDialog.xaml b/StabilityMatrix/LaunchOptionsDialog.xaml new file mode 100644 index 00000000..c14fcdfa --- /dev/null +++ b/StabilityMatrix/LaunchOptionsDialog.xaml @@ -0,0 +1,90 @@ + + + +