From 0147e010d30dc3105796a77dc6b1714ada387baa Mon Sep 17 00:00:00 2001 From: Miguel Date: Fri, 5 Sep 2025 15:41:17 +0200 Subject: [PATCH] Refactor hydraulic components: Updated osHydPump and added osHydTank class with dynamic level and pressure management. Enhanced XAML for tank visualization and implemented converters for UI binding. Improved error handling in converters and added tests for hydraulic component detection. --- App.xaml | 12 +- Controls/osVisFilter.xaml.cs | 22 +- Converters/TankLevelToHeightConverter.cs | 121 +++ Documentation/MemoriadeEvolucion.md | 98 ++- FilterDebugTest.cs | 43 + .../Tests/QuickHydraulicTest.cs | 46 - ObjetosSim/HydraulicComponents/osHydPipe.cs | 1 + ObjetosSim/HydraulicComponents/osHydPump.cs | 40 +- ObjetosSim/HydraulicComponents/osHydTank.cs | 790 ++++++++++++++++++ ObjetosSim/HydraulicComponents/ucHydTank.xaml | 135 +++ .../HydraulicComponents/ucHydTank.xaml.cs | 126 +++ XAMLhelpers.cs | 74 +- test_osBaseItemsSource.cs | 7 + 13 files changed, 1436 insertions(+), 79 deletions(-) create mode 100644 Converters/TankLevelToHeightConverter.cs create mode 100644 FilterDebugTest.cs delete mode 100644 HydraulicSimulator/Tests/QuickHydraulicTest.cs create mode 100644 ObjetosSim/HydraulicComponents/ucHydTank.xaml create mode 100644 ObjetosSim/HydraulicComponents/ucHydTank.xaml.cs diff --git a/App.xaml b/App.xaml index 2da8429..bd9f193 100644 --- a/App.xaml +++ b/App.xaml @@ -1,7 +1,9 @@  + xmlns:os="clr-namespace:CtrEditor.ObjetosSim" + xmlns:converters="clr-namespace:CtrEditor.Converters" + StartupUri="MainWindow.xaml"> @@ -24,6 +26,14 @@ + + + +