From 006b2dddaa061ada6a3393363ab148655775f462 Mon Sep 17 00:00:00 2001 From: "Matt Parker [SSW]" <61717342+MattParkerDev@users.noreply.github.com> Date: Fri, 10 Jan 2025 20:14:19 +1000 Subject: [PATCH] styling --- .../Components/SolutionExplorer.razor | 17 +++++++++++------ src/SharpIDE.Photino/Layout/MainLayout.razor | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/SharpIDE.Photino/Components/SolutionExplorer.razor b/src/SharpIDE.Photino/Components/SolutionExplorer.razor index 5a9d736..9d7b408 100644 --- a/src/SharpIDE.Photino/Components/SolutionExplorer.razor +++ b/src/SharpIDE.Photino/Components/SolutionExplorer.razor @@ -6,7 +6,7 @@ return; } - + @foreach(var project in _rootNodes) { @GetProjectFragment(project) @@ -18,11 +18,11 @@ private SolutionFile _solutionFile = null!; private List _rootNodes = []; - private Dictionary _folders = new(); + private Dictionary _folders = new(); private RenderFragment GetProjectFragment(ProjectInSolution project) => @ - + @foreach(var child in _solutionFile.ProjectsByGuid.Values.Where(s => s.ParentProjectGuid == project.ProjectGuid).OrderBy(s => s.ProjectName)) { @GetProjectFragment(child) @@ -38,7 +38,7 @@ @ @foreach (var subFolder in folder.Folders) { - + @if (subFolder.Expanded) { @GetFolderFragment(subFolder) @@ -47,11 +47,16 @@ } @foreach (var file in folder.Files) { - + } ; protected override async Task OnInitializedAsync() + { + await Task.Run(() => LoadSolution("D:/matth/Documents/Git/amazon/ClientPortal.sln")); + } + + private void LoadSolution(string solutionPath) { var solutionFile = GetNodesInSolution.ParseSolutionFileFromPath("D:/matth/Documents/Git/amazon/ClientPortal.sln"); ArgumentNullException.ThrowIfNull(solutionFile); @@ -74,7 +79,7 @@ return (s, rootFolder); }) .ToDictionary(s => s.s.ProjectGuid, s => s.Item2); - _folders = folders2; + _folders = folders2!; } } diff --git a/src/SharpIDE.Photino/Layout/MainLayout.razor b/src/SharpIDE.Photino/Layout/MainLayout.razor index 2a46481..04f7c7e 100644 --- a/src/SharpIDE.Photino/Layout/MainLayout.razor +++ b/src/SharpIDE.Photino/Layout/MainLayout.razor @@ -9,7 +9,7 @@ - + @* *@