From b61a7fa83379ee469d3a6de6a25b3a6df7189662 Mon Sep 17 00:00:00 2001 From: Flaky Date: Thu, 16 Apr 2026 12:54:51 +0100 Subject: [PATCH] Move Controls outside of Views --- UI/{Views => }/Controls/HierarchyTree.axaml | 0 UI/{Views => }/Controls/HierarchyTree.axaml.cs | 2 +- UI/{Views => }/Controls/SearchPane.axaml | 0 UI/{Views => }/Controls/SearchPane.axaml.cs | 2 +- UI/{Views => }/Controls/TagEditor.axaml | 0 UI/{Views => }/Controls/TagEditor.axaml.cs | 0 UI/TagHierarchyManager.UI.csproj | 9 +++------ 7 files changed, 5 insertions(+), 8 deletions(-) rename UI/{Views => }/Controls/HierarchyTree.axaml (100%) rename UI/{Views => }/Controls/HierarchyTree.axaml.cs (92%) rename UI/{Views => }/Controls/SearchPane.axaml (100%) rename UI/{Views => }/Controls/SearchPane.axaml.cs (92%) rename UI/{Views => }/Controls/TagEditor.axaml (100%) rename UI/{Views => }/Controls/TagEditor.axaml.cs (100%) diff --git a/UI/Views/Controls/HierarchyTree.axaml b/UI/Controls/HierarchyTree.axaml similarity index 100% rename from UI/Views/Controls/HierarchyTree.axaml rename to UI/Controls/HierarchyTree.axaml diff --git a/UI/Views/Controls/HierarchyTree.axaml.cs b/UI/Controls/HierarchyTree.axaml.cs similarity index 92% rename from UI/Views/Controls/HierarchyTree.axaml.cs rename to UI/Controls/HierarchyTree.axaml.cs index 4159ba0..dd06789 100644 --- a/UI/Views/Controls/HierarchyTree.axaml.cs +++ b/UI/Controls/HierarchyTree.axaml.cs @@ -14,7 +14,7 @@ public partial class HierarchyTree : UserControl this.TagTree.AddHandler(PointerPressedEvent, OnTagTreeItemRightClick, RoutingStrategies.Tunnel); } - private static void OnTagTreeItemRightClick(object sender, PointerPressedEventArgs e) + private static void OnTagTreeItemRightClick(object? sender, PointerPressedEventArgs e) { if (!e.GetCurrentPoint(null).Properties.IsRightButtonPressed) return; if (e.Source is not Control source) return; diff --git a/UI/Views/Controls/SearchPane.axaml b/UI/Controls/SearchPane.axaml similarity index 100% rename from UI/Views/Controls/SearchPane.axaml rename to UI/Controls/SearchPane.axaml diff --git a/UI/Views/Controls/SearchPane.axaml.cs b/UI/Controls/SearchPane.axaml.cs similarity index 92% rename from UI/Views/Controls/SearchPane.axaml.cs rename to UI/Controls/SearchPane.axaml.cs index 6c6251e..b4d7898 100644 --- a/UI/Views/Controls/SearchPane.axaml.cs +++ b/UI/Controls/SearchPane.axaml.cs @@ -24,7 +24,7 @@ public partial class SearchPane : UserControl this.SearchAliasesCheckBox.IsChecked ?? false }; - this.ViewModel.StartSearchCommand.Execute(args); + this.ViewModel?.StartSearchCommand.Execute(args); e.Handled = true; } } \ No newline at end of file diff --git a/UI/Views/Controls/TagEditor.axaml b/UI/Controls/TagEditor.axaml similarity index 100% rename from UI/Views/Controls/TagEditor.axaml rename to UI/Controls/TagEditor.axaml diff --git a/UI/Views/Controls/TagEditor.axaml.cs b/UI/Controls/TagEditor.axaml.cs similarity index 100% rename from UI/Views/Controls/TagEditor.axaml.cs rename to UI/Controls/TagEditor.axaml.cs diff --git a/UI/TagHierarchyManager.UI.csproj b/UI/TagHierarchyManager.UI.csproj index 7a0f5c4..d726768 100644 --- a/UI/TagHierarchyManager.UI.csproj +++ b/UI/TagHierarchyManager.UI.csproj @@ -20,11 +20,6 @@ UnsavedCancelDialog.axaml Code - - - SearchPane.axaml - Code - @@ -76,6 +71,8 @@ - + + + -- 2.51.2