From 99dbe350eec43c7e8e8376fd906bfe3c964554e9 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 24 May 2023 20:39:31 -0700 Subject: [PATCH] addressed PR feedback & removed unused usings --- StabilityMatrix/Helper/ProcessRunner.cs | 6 +++++- StabilityMatrix/SettingsPage.xaml.cs | 1 - StabilityMatrix/ViewModels/SettingsViewModel.cs | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/StabilityMatrix/Helper/ProcessRunner.cs b/StabilityMatrix/Helper/ProcessRunner.cs index 7c220e2d..d78f0b7e 100644 --- a/StabilityMatrix/Helper/ProcessRunner.cs +++ b/StabilityMatrix/Helper/ProcessRunner.cs @@ -37,7 +37,11 @@ public static class ProcessRunner } process.Start(); - process.BeginOutputReadLine(); + + if (outputDataReceived != null) + { + process.BeginOutputReadLine(); + } return process; } diff --git a/StabilityMatrix/SettingsPage.xaml.cs b/StabilityMatrix/SettingsPage.xaml.cs index d0a0a5d1..830f9e32 100644 --- a/StabilityMatrix/SettingsPage.xaml.cs +++ b/StabilityMatrix/SettingsPage.xaml.cs @@ -1,5 +1,4 @@ using System.Windows; -using System.Windows.Controls; using StabilityMatrix.ViewModels; using Wpf.Ui.Controls.Navigation; diff --git a/StabilityMatrix/ViewModels/SettingsViewModel.cs b/StabilityMatrix/ViewModels/SettingsViewModel.cs index f032478b..6df706f1 100644 --- a/StabilityMatrix/ViewModels/SettingsViewModel.cs +++ b/StabilityMatrix/ViewModels/SettingsViewModel.cs @@ -1,7 +1,4 @@ using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.CompilerServices; using System.Threading.Tasks; using CommunityToolkit.Mvvm.ComponentModel; using StabilityMatrix.Helper;