From 5c1d16b95bbeff62c6b52ae08a27c6eec121b58b Mon Sep 17 00:00:00 2001 From: JT Date: Thu, 25 May 2023 18:42:43 -0700 Subject: [PATCH] Fix initial ListView selection (now shows highlight like it's selected) --- StabilityMatrix/App.xaml.cs | 1 + StabilityMatrix/Helper/ProcessRunner.cs | 3 ++ StabilityMatrix/InstallPage.xaml | 33 +++++++++++------ StabilityMatrix/InstallPage.xaml.cs | 11 +++--- StabilityMatrix/Models/Packages/A3WebUI.cs | 29 ++++++++++++--- StabilityMatrix/PyVenvRunner.cs | 6 ++-- .../ViewModels/InstallerViewModel.cs | 36 ++++++++++++++----- 7 files changed, 88 insertions(+), 31 deletions(-) diff --git a/StabilityMatrix/App.xaml.cs b/StabilityMatrix/App.xaml.cs index 99a39d9b..1f7736ef 100644 --- a/StabilityMatrix/App.xaml.cs +++ b/StabilityMatrix/App.xaml.cs @@ -31,6 +31,7 @@ namespace StabilityMatrix serviceCollection.AddTransient(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); diff --git a/StabilityMatrix/Helper/ProcessRunner.cs b/StabilityMatrix/Helper/ProcessRunner.cs index 109f033d..104e9ac9 100644 --- a/StabilityMatrix/Helper/ProcessRunner.cs +++ b/StabilityMatrix/Helper/ProcessRunner.cs @@ -36,11 +36,13 @@ public static class ProcessRunner process.StartInfo.Arguments = arguments; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.RedirectStandardError = true; process.StartInfo.CreateNoWindow = true; if (outputDataReceived != null) { process.OutputDataReceived += (_, args) => outputDataReceived(args.Data); + process.ErrorDataReceived += (_, args) => outputDataReceived(args.Data); } process.Start(); @@ -48,6 +50,7 @@ public static class ProcessRunner if (outputDataReceived != null) { process.BeginOutputReadLine(); + process.BeginErrorReadLine(); } return process; diff --git a/StabilityMatrix/InstallPage.xaml b/StabilityMatrix/InstallPage.xaml index 7c0f5c0d..1885a09f 100644 --- a/StabilityMatrix/InstallPage.xaml +++ b/StabilityMatrix/InstallPage.xaml @@ -20,14 +20,32 @@ - - + + + + + +