195 lines
11 KiB
XML
195 lines
11 KiB
XML
<UserControl x:Class="HC_APTBS.Views.UserControls.PumpControlView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="260" d:DesignWidth="440"
|
|
IsEnabled="{Binding IsEnabled}">
|
|
|
|
<UserControl.Resources>
|
|
<BooleanToVisibilityConverter x:Key="BoolToVis"/>
|
|
|
|
<!-- Shared style for the settings popup min/max/step text boxes -->
|
|
<Style x:Key="SettingsTextBox" TargetType="TextBox">
|
|
<Setter Property="Width" Value="40"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
|
<Setter Property="FontSize" Value="14"/>
|
|
</Style>
|
|
|
|
<!-- Label inside settings popup -->
|
|
<Style x:Key="SettingsLabel" TargetType="TextBlock">
|
|
<Setter Property="VerticalAlignment" Value="Bottom"/>
|
|
<Setter Property="FontSize" Value="12"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="Margin" Value="0,2,0,0"/>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
|
|
<StackPanel>
|
|
|
|
<!-- ═══ FBKW — Advance Control ═══════════════════════════════════════ -->
|
|
<Grid Margin="6,6,6,2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="FBKW - Advance Control" HorizontalAlignment="Center"
|
|
FontSize="13" Foreground="Black" Margin="0,0,0,2"/>
|
|
|
|
<DockPanel Grid.Row="1" Margin="4,0,4,2">
|
|
<!-- Settings button -->
|
|
<ToggleButton x:Name="FbkwSettingsToggle" DockPanel.Dock="Left"
|
|
Width="28" Height="28" Margin="0,0,4,0"
|
|
Background="Transparent" BorderBrush="Transparent"
|
|
Content="..." FontWeight="Bold" FontSize="14"
|
|
ToolTip="Min / Step / Max"/>
|
|
<!-- Numeric text box -->
|
|
<TextBox DockPanel.Dock="Right" Width="50" Height="28" Margin="4,0,0,0"
|
|
TextAlignment="Center" VerticalContentAlignment="Center"
|
|
FontWeight="Bold" FontSize="13"
|
|
Text="{Binding FbkwValue, UpdateSourceTrigger=PropertyChanged, StringFormat=F2}"/>
|
|
<!-- Slider -->
|
|
<Slider Minimum="{Binding FbkwMin}" Maximum="{Binding FbkwMax}"
|
|
Value="{Binding FbkwValue}" TickFrequency="{Binding FbkwStep}"
|
|
TickPlacement="BottomRight" AutoToolTipPrecision="2"
|
|
IsSnapToTickEnabled="True" VerticalAlignment="Center"
|
|
Focusable="False" Foreground="Black"/>
|
|
</DockPanel>
|
|
|
|
<!-- Settings popup -->
|
|
<Popup IsOpen="{Binding IsChecked, ElementName=FbkwSettingsToggle}"
|
|
StaysOpen="False" Placement="Bottom" AllowsTransparency="True"
|
|
HorizontalOffset="30">
|
|
<Border Background="#BB000000" Padding="8,6" CornerRadius="3">
|
|
<UniformGrid Columns="3" Width="180">
|
|
<StackPanel HorizontalAlignment="Center">
|
|
<TextBox Text="{Binding FbkwMin, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource SettingsTextBox}"/>
|
|
<TextBlock Text="Min" Style="{StaticResource SettingsLabel}" HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
<StackPanel HorizontalAlignment="Center">
|
|
<TextBox Text="{Binding FbkwStep, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource SettingsTextBox}"/>
|
|
<TextBlock Text="Step" Style="{StaticResource SettingsLabel}" HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
<StackPanel HorizontalAlignment="Center">
|
|
<TextBox Text="{Binding FbkwMax, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource SettingsTextBox}"/>
|
|
<TextBlock Text="Max" Style="{StaticResource SettingsLabel}" HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
</UniformGrid>
|
|
</Border>
|
|
</Popup>
|
|
</Grid>
|
|
|
|
<!-- ═══ ME — Quantity Control ════════════════════════════════════════ -->
|
|
<Grid Margin="6,4,6,2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="ME - Quantity Control" HorizontalAlignment="Center"
|
|
FontSize="13" Foreground="Black" Margin="0,0,0,2"/>
|
|
|
|
<DockPanel Grid.Row="1" Margin="4,0,4,2">
|
|
<ToggleButton x:Name="MeSettingsToggle" DockPanel.Dock="Left"
|
|
Width="28" Height="28" Margin="0,0,4,0"
|
|
Background="Transparent" BorderBrush="Transparent"
|
|
Content="..." FontWeight="Bold" FontSize="14"
|
|
ToolTip="Min / Step / Max"/>
|
|
<TextBox DockPanel.Dock="Right" Width="50" Height="28" Margin="4,0,0,0"
|
|
TextAlignment="Center" VerticalContentAlignment="Center"
|
|
FontWeight="Bold" FontSize="13"
|
|
Text="{Binding MeValue, UpdateSourceTrigger=PropertyChanged, StringFormat=F2}"/>
|
|
<Slider Minimum="{Binding MeMin}" Maximum="{Binding MeMax}"
|
|
Value="{Binding MeValue}" TickFrequency="{Binding MeStep}"
|
|
TickPlacement="BottomRight" AutoToolTipPrecision="2"
|
|
IsSnapToTickEnabled="False" VerticalAlignment="Center"
|
|
Focusable="False" Foreground="Black"/>
|
|
</DockPanel>
|
|
|
|
<Popup IsOpen="{Binding IsChecked, ElementName=MeSettingsToggle}"
|
|
StaysOpen="False" Placement="Bottom" AllowsTransparency="True"
|
|
HorizontalOffset="30">
|
|
<Border Background="#BB000000" Padding="8,6" CornerRadius="3">
|
|
<UniformGrid Columns="3" Width="180">
|
|
<StackPanel HorizontalAlignment="Center">
|
|
<TextBox Text="{Binding MeMin, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource SettingsTextBox}"/>
|
|
<TextBlock Text="Min" Style="{StaticResource SettingsLabel}" HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
<StackPanel HorizontalAlignment="Center">
|
|
<TextBox Text="{Binding MeStep, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource SettingsTextBox}"/>
|
|
<TextBlock Text="Step" Style="{StaticResource SettingsLabel}" HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
<StackPanel HorizontalAlignment="Center">
|
|
<TextBox Text="{Binding MeMax, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource SettingsTextBox}"/>
|
|
<TextBlock Text="Max" Style="{StaticResource SettingsLabel}" HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
</UniformGrid>
|
|
</Border>
|
|
</Popup>
|
|
</Grid>
|
|
|
|
<!-- ═══ PreIn — Pre-injection Quantity ═══════════════════════════════ -->
|
|
<Grid Margin="6,4,6,2"
|
|
Visibility="{Binding IsPreInVisible, Converter={StaticResource BoolToVis}}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Text="ME - Pre-inj Quantity" HorizontalAlignment="Center"
|
|
FontSize="13" Foreground="Black" Margin="0,0,0,2"/>
|
|
|
|
<DockPanel Grid.Row="1" Margin="4,0,4,2">
|
|
<ToggleButton x:Name="PreInSettingsToggle" DockPanel.Dock="Left"
|
|
Width="28" Height="28" Margin="0,0,4,0"
|
|
Background="Transparent" BorderBrush="Transparent"
|
|
Content="..." FontWeight="Bold" FontSize="14"
|
|
ToolTip="Min / Step / Max"/>
|
|
<TextBox DockPanel.Dock="Right" Width="50" Height="28" Margin="4,0,0,0"
|
|
TextAlignment="Center" VerticalContentAlignment="Center"
|
|
FontWeight="Bold" FontSize="13"
|
|
Text="{Binding PreInValue, UpdateSourceTrigger=PropertyChanged, StringFormat=F2}"/>
|
|
<Slider Minimum="{Binding PreInMin}" Maximum="{Binding PreInMax}"
|
|
Value="{Binding PreInValue}" TickFrequency="{Binding PreInStep}"
|
|
TickPlacement="BottomRight" AutoToolTipPrecision="2"
|
|
IsSnapToTickEnabled="True" VerticalAlignment="Center"
|
|
Focusable="False" Foreground="Black"/>
|
|
</DockPanel>
|
|
|
|
<Popup IsOpen="{Binding IsChecked, ElementName=PreInSettingsToggle}"
|
|
StaysOpen="False" Placement="Bottom" AllowsTransparency="True"
|
|
HorizontalOffset="30">
|
|
<Border Background="#BB000000" Padding="8,6" CornerRadius="3">
|
|
<UniformGrid Columns="3" Width="180">
|
|
<StackPanel HorizontalAlignment="Center">
|
|
<TextBox Text="{Binding PreInMin, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource SettingsTextBox}"/>
|
|
<TextBlock Text="Min" Style="{StaticResource SettingsLabel}" HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
<StackPanel HorizontalAlignment="Center">
|
|
<TextBox Text="{Binding PreInStep, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource SettingsTextBox}"/>
|
|
<TextBlock Text="Step" Style="{StaticResource SettingsLabel}" HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
<StackPanel HorizontalAlignment="Center">
|
|
<TextBox Text="{Binding PreInMax, UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource SettingsTextBox}"/>
|
|
<TextBlock Text="Max" Style="{StaticResource SettingsLabel}" HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
</UniformGrid>
|
|
</Border>
|
|
</Popup>
|
|
</Grid>
|
|
|
|
</StackPanel>
|
|
</UserControl>
|