<UserControl
    x:Class="SicUI.Controls.AITPumpSIC"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converters="clr-namespace:Aitex.Core.UI.Converters;assembly=MECF.Framework.UI.Core"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:SicUI.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    x:Name="Self"
    mc:Ignorable="d">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="110" />
            <ColumnDefinition Width="150" />
        </Grid.ColumnDefinitions>
        <StackPanel
            x:Name="StackPanelDryPump"
            Margin="0,0,10,0"
            HorizontalAlignment="Right"
            Orientation="Vertical"
            Visibility="{Binding ElementName=Self, Path=IsShowSensor, Converter={StaticResource BoolVisibilityConverter}, Mode=OneWay}">
            <StackPanel
                x:Name="StackPanelWaterFlow"
                Height="22.5"
                HorizontalAlignment="Right"
                Orientation="Horizontal">
                <TextBlock Padding="0,0,5,0" Text="Water Flow" />
                <Ellipse
                    Width="15"
                    Height="15"
                    HorizontalAlignment="Left"
                    Fill="{Binding ElementName=Self, Path=WaterFlowStatusColor, Mode=OneWay}"
                    Stroke="Gray"
                    StrokeThickness="2"
                    Style="{x:Null}" />
            </StackPanel>
            <StackPanel
                x:Name="StackPanelN2Pressure"
                Height="22.5"
                HorizontalAlignment="Right"
                Orientation="Horizontal">
                <TextBlock Padding="0,0,5,0" Text="N2 Purge" />
                <Ellipse
                    Width="15"
                    Height="15"
                    HorizontalAlignment="Left"
                    Fill="{Binding ElementName=Self, Path=N2PressureStatusColor, Mode=OneWay}"
                    Stroke="Gray"
                    StrokeThickness="2"
                    Style="{x:Null}" />
            </StackPanel>
        </StackPanel>
        <Image
            x:Name="imagePicture"
            Grid.Column="1"
            Width="109"
            Height="45"
            Source="/MECF.Framework.Common;component/Resources/Pump/pump_off.png" />
        <!-- <Image.ContextMenu>
                <ContextMenu Visibility="{Binding ElementName=Self, Path=EnableControl,Converter= {StaticResource BoolVisibilityConverter}, Mode=OneWay}">
                    <MenuItem Header="Pump On" IsEnabled="{Binding ElementName=Self, Path=EnableControl,Mode=OneWay}" Click="PumpOn"/>
                    <MenuItem Header="Pump Off" IsEnabled="{Binding ElementName=Self, Path=EnableControl,Mode=OneWay}" Click="PumpOff" />
                    <MenuItem Header="Pump Utility" IsEnabled="{Binding ElementName=Self, Path=EnableControl,Mode=OneWay}" Click="PumpUtility" />
                </ContextMenu>
            </Image.ContextMenu>-->

        <StackPanel
            Grid.Column="2"
            Margin="0,5,5,0"
            HorizontalAlignment="Left"
            Orientation="Vertical"
            Visibility="{Binding ElementName=Self, Path=IsShowSpeed, Converter={StaticResource BoolVisibilityConverter}, Mode=OneWay}">

            <Border BorderBrush="black" BorderThickness="1,1,1,1">
                <StackPanel
                    Height="18"
                    HorizontalAlignment="Right"
                    Orientation="Horizontal">
                    <Border
                        Background="DarkGray"
                        BorderBrush="black"
                        BorderThickness="0,0,1,0">
                        <TextBlock
                            Width="80"
                            Padding="0,0,5,0"
                            VerticalAlignment="Center"
                            Text="Speed(rpm):" />
                    </Border>
                    <TextBlock
                        x:Name="txtSpeed"
                        Width="60"
                        Padding="0,0,5,0"
                        VerticalAlignment="Stretch"
                        Text="{Binding ElementName=Self, Path=DeviceData.Speed, Mode=OneWay}" />
                </StackPanel>
            </Border>
            <Border BorderBrush="black" BorderThickness="1,0,1,1">
                <StackPanel
                    Height="18"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    Orientation="Horizontal">
                    <Border
                        Background="DarkGray"
                        BorderBrush="black"
                        BorderThickness="0,0,1,0">
                        <TextBlock
                            Width="80"
                            Padding="0,0,5,0"
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Text="Temp.(°C):" />
                    </Border>
                    <TextBlock
                        x:Name="txtTemp"
                        Width="60"
                        Padding="0,0,5,0"
                        VerticalAlignment="Center"
                        Text="{Binding ElementName=Self, Path=DeviceData.Temperature, Mode=OneWay}" />
                </StackPanel>
            </Border>
        </StackPanel>
    </Grid>
</UserControl>
