refactor: Enhance ucHydTank layout and improve information panel with detailed flow metrics
This commit is contained in:
parent
c76e4c1749
commit
380fb5ba50
|
@ -44,9 +44,9 @@
|
||||||
VerticalAlignment="Bottom"
|
VerticalAlignment="Bottom"
|
||||||
Margin="4,4,4,4">
|
Margin="4,4,4,4">
|
||||||
<Rectangle.Height>
|
<Rectangle.Height>
|
||||||
<MultiBinding Converter="{StaticResource LevelToHeightMultiConverter}">
|
<MultiBinding Converter="{StaticResource TankLevelToHeightConverter}">
|
||||||
<Binding Path="FillPercentage"/>
|
<Binding Path="FillPercentage"/>
|
||||||
<Binding Path="Tamano" Converter="{StaticResource MeterToPixelConverter}"/>
|
<Binding Path="Tamano"/>
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</Rectangle.Height>
|
</Rectangle.Height>
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
|
@ -72,43 +72,106 @@
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Foreground="White"
|
Foreground="White"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="10"
|
FontSize="12"
|
||||||
Effect="{StaticResource DropShadowEffect}"/>
|
Effect="{StaticResource DropShadowEffect}"/>
|
||||||
|
|
||||||
<!-- Indicador de tipo de tanque -->
|
<!-- Indicador de tipo de tanque y fluido -->
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Margin="2,2,0,0">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- Tipo de tanque -->
|
||||||
|
<Border Grid.Row="0" Background="Navy" CornerRadius="2" Padding="3,1">
|
||||||
<TextBlock Text="{Binding TankTypeIndicator}"
|
<TextBlock Text="{Binding TankTypeIndicator}"
|
||||||
HorizontalAlignment="Left"
|
Foreground="White"
|
||||||
VerticalAlignment="Top"
|
|
||||||
Foreground="Navy"
|
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="8"
|
FontSize="8" />
|
||||||
Margin="2,0,0,0"/>
|
</Border>
|
||||||
|
|
||||||
|
<!-- Tipo de fluido -->
|
||||||
|
<Border Grid.Row="1" Background="DarkGreen" CornerRadius="2" Padding="2,1" Margin="0,1,0,0">
|
||||||
|
<TextBlock Text="{Binding CurrentFluidDescription}"
|
||||||
|
Foreground="White"
|
||||||
|
FontSize="6"
|
||||||
|
FontWeight="SemiBold"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
|
MaxWidth="40"/>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Panel de información -->
|
<!-- Panel de información mejorado -->
|
||||||
<Grid Canvas.Top="{Binding Tamano, Converter={StaticResource MeterToPixelConverter}, ConverterParameter=1.05}"
|
<Grid Canvas.Top="{Binding Tamano, Converter={StaticResource MeterToPixelConverter}, ConverterParameter=1.08}"
|
||||||
Width="{Binding Tamano, Converter={StaticResource MeterToPixelConverter}}">
|
Width="{Binding Tamano, Converter={StaticResource MeterToPixelConverter}}">
|
||||||
<StackPanel Orientation="Horizontal"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Margin="0,2,0,0">
|
|
||||||
|
|
||||||
|
<!-- Fondo semitransparente para el panel de información -->
|
||||||
|
<Border Background="#CC000000" CornerRadius="3" Margin="0,2,0,0" Padding="2">
|
||||||
|
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
|
||||||
|
|
||||||
|
<!-- Fila superior: Presión y Nivel -->
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,1">
|
||||||
<!-- Presión actual -->
|
<!-- Presión actual -->
|
||||||
<TextBlock Text="{Binding CurrentPressureBar, StringFormat='{}{0:F1} bar'}"
|
<Border Background="#FF1E90FF" CornerRadius="2" Padding="3,2" Margin="1">
|
||||||
Foreground="White" Background="Blue"
|
<StackPanel Orientation="Horizontal">
|
||||||
Padding="2" Margin="1" FontSize="8"/>
|
<TextBlock Text="P:" Foreground="White" FontSize="7" FontWeight="Bold"/>
|
||||||
|
<TextBlock Text="{Binding CurrentPressure, StringFormat='{}{0:F1}'}"
|
||||||
|
Foreground="White" FontSize="7" FontWeight="SemiBold" Margin="1,0,0,0"/>
|
||||||
|
<TextBlock Text="bar" Foreground="White" FontSize="6" Opacity="0.9" Margin="1,0,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<!-- Nivel actual -->
|
<!-- Nivel actual -->
|
||||||
<TextBlock Text="{Binding CurrentLevel, StringFormat='{}{0:F2} m'}"
|
<Border Background="#FF32CD32" CornerRadius="2" Padding="3,2" Margin="1">
|
||||||
Foreground="White" Background="Green"
|
<StackPanel Orientation="Horizontal">
|
||||||
Padding="2" Margin="1" FontSize="8"/>
|
<TextBlock Text="N:" Foreground="White" FontSize="7" FontWeight="Bold"/>
|
||||||
|
<TextBlock Text="{Binding CurrentLevelM, StringFormat='{}{0:F2}'}"
|
||||||
|
Foreground="White" FontSize="7" FontWeight="SemiBold" Margin="1,0,0,0"/>
|
||||||
|
<TextBlock Text="m" Foreground="White" FontSize="6" Opacity="0.9" Margin="1,0,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Fila inferior: Flujos -->
|
||||||
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,1">
|
||||||
|
<!-- Flujo de entrada -->
|
||||||
|
<Border Background="#FF228B22" CornerRadius="2" Padding="3,2" Margin="1">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="↓" Foreground="White" FontSize="8" FontWeight="Bold"/>
|
||||||
|
<TextBlock Text="{Binding InletFlow, StringFormat='{}{0:F1}'}"
|
||||||
|
Foreground="White" FontSize="7" FontWeight="SemiBold" Margin="1,0,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!-- Flujo de salida -->
|
||||||
|
<Border Background="#FFDC143C" CornerRadius="2" Padding="3,2" Margin="1">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="↑" Foreground="White" FontSize="8" FontWeight="Bold"/>
|
||||||
|
<TextBlock Text="{Binding OutletFlow, StringFormat='{}{0:F1}'}"
|
||||||
|
Foreground="White" FontSize="7" FontWeight="SemiBold" Margin="1,0,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<!-- Balance de flujo -->
|
<!-- Balance de flujo -->
|
||||||
<TextBlock Text="{Binding FlowBalanceLMin, StringFormat='{}{0:F1} L/min'}"
|
<Border Background="{Binding FlowBalanceColor}" CornerRadius="2" Padding="3,2" Margin="1">
|
||||||
Foreground="White"
|
<StackPanel Orientation="Horizontal">
|
||||||
Background="{Binding FlowBalanceColor}"
|
<TextBlock Text="Δ:" Foreground="White" FontSize="7" FontWeight="Bold"/>
|
||||||
Padding="2" Margin="1" FontSize="8"/>
|
<TextBlock Text="{Binding FlowBalance, StringFormat='{}{0:F1}'}"
|
||||||
|
Foreground="White" FontSize="7" FontWeight="SemiBold" Margin="1,0,0,0"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Unidades comunes -->
|
||||||
|
<TextBlock Text="L/min"
|
||||||
|
Foreground="White"
|
||||||
|
FontSize="6"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Opacity="0.8"
|
||||||
|
Margin="0,1,0,0"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue