From b704258b784c1253533d5ce92bfaea9d0e8d447b Mon Sep 17 00:00:00 2001 From: "Matthew Parker [SSW]" <61717342+MattParkerDev@users.noreply.github.com> Date: Sun, 21 Jan 2024 13:46:14 +1000 Subject: [PATCH] Fix commands --- .../ViewModels/MainWindowViewModel.cs | 9 ++++++--- DotNetSolutionTools.App/Views/MainWindow.axaml | 2 +- DotNetSolutionTools.Core/SolutionProjectParity.cs | 7 +++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/DotNetSolutionTools.App/ViewModels/MainWindowViewModel.cs b/DotNetSolutionTools.App/ViewModels/MainWindowViewModel.cs index 3eac83e..cbde896 100644 --- a/DotNetSolutionTools.App/ViewModels/MainWindowViewModel.cs +++ b/DotNetSolutionTools.App/ViewModels/MainWindowViewModel.cs @@ -45,8 +45,9 @@ public partial class MainWindowViewModel : ViewModelBase } catch (Exception e) { - ResultsLabel = "Error"; + ResultsLabel = "Failed to compare solution and csharp projects"; OperationResults?.Add(e.Message); + OperationResults?.Add(e.ToString()); } } @@ -83,12 +84,14 @@ public partial class MainWindowViewModel : ViewModelBase ResultsLabel = "Running..."; await Task.Run(() => { - var csprojList = SolutionProjectParity.RetrieveAllCSharpProjectFullPathsFromFolder(SolutionFolderPath); + var solutionFile = SolutionProjectParity.ParseSolutionFileFromPath(SolutionFilePath); + var csprojList = SolutionProjectParity.RetrieveAllCSharpProjectFullPathsFromSolution(solutionFile); foreach (var csproj in csprojList) { FormatCsproj.FormatCsprojFile(csproj); } }, token); + ResultsLabel = "Successfully formatted all csproj files in solution file"; } catch (Exception e) { @@ -113,7 +116,7 @@ public partial class MainWindowViewModel : ViewModelBase FormatCsproj.FormatCsprojFile(csproj); } }, token); - + ResultsLabel = "Successfully formatted all csproj files in folder"; } catch (Exception e) { diff --git a/DotNetSolutionTools.App/Views/MainWindow.axaml b/DotNetSolutionTools.App/Views/MainWindow.axaml index 855e520..d5b0699 100644 --- a/DotNetSolutionTools.App/Views/MainWindow.axaml +++ b/DotNetSolutionTools.App/Views/MainWindow.axaml @@ -110,7 +110,7 @@