AITPump.xaml 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <UserControl x:Class="Aitex.Core.UI.DeviceControl.AITPump"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:converters="clr-namespace:Aitex.Core.UI.Converters"
  7. mc:Ignorable="d" x:Name="Self" >
  8. <UserControl.Resources>
  9. <converters:bool2VisibilityConverter x:Key="Bool2VisibilityConvert"/>
  10. </UserControl.Resources>
  11. <Grid>
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="150"></ColumnDefinition>
  14. <ColumnDefinition Width="110"></ColumnDefinition>
  15. <ColumnDefinition Width="150"></ColumnDefinition>
  16. </Grid.ColumnDefinitions>
  17. <StackPanel Orientation="Vertical" HorizontalAlignment="Right" Margin="0,0,10,0" x:Name="StackPanelDryPump" Visibility="{Binding ElementName=Self, Path=IsShowSensor,Converter= {StaticResource Bool2VisibilityConvert}, Mode=OneWay}">
  18. <StackPanel Orientation="Horizontal" Height="22.5" HorizontalAlignment="Right" x:Name="StackPanelWaterFlow">
  19. <TextBlock Text="Water Flow" Padding="0,0,5,0"/>
  20. <Ellipse HorizontalAlignment="Left" Stroke="Gray" StrokeThickness="2" Width="15" Height="15"
  21. Fill="{Binding ElementName=Self, Path=WaterFlowStatusColor, Mode=OneWay}" Style="{x:Null}"/>
  22. </StackPanel>
  23. <StackPanel Orientation="Horizontal" Height="22.5" HorizontalAlignment="Right" x:Name="StackPanelN2Pressure">
  24. <TextBlock Text="N2 Purge" Padding="0,0,5,0"/>
  25. <Ellipse HorizontalAlignment="Left" Stroke="Gray" StrokeThickness="2" Width="15" Height="15"
  26. Fill="{Binding ElementName=Self, Path=N2PressureStatusColor, Mode=OneWay}" Style="{x:Null}"/>
  27. </StackPanel>
  28. </StackPanel>
  29. <Image Grid.Column="1" Width="109" Height="45" x:Name="imagePicture" Source="/MECF.Framework.Common;component/Resources/Pump/pump_off.png" >
  30. <Image.ContextMenu>
  31. <ContextMenu Visibility="{Binding ElementName=Self, Path=EnableControl,Converter= {StaticResource Bool2VisibilityConvert}, Mode=OneWay}">
  32. <MenuItem Header="Pump On" IsEnabled="{Binding ElementName=Self, Path=EnableControl,Mode=OneWay}" Click="PumpOn"/>
  33. <MenuItem Header="Pump Off" IsEnabled="{Binding ElementName=Self, Path=EnableControl,Mode=OneWay}" Click="PumpOff" />
  34. </ContextMenu>
  35. </Image.ContextMenu>
  36. </Image>
  37. <StackPanel Grid.Column="2" Orientation="Vertical" HorizontalAlignment="Left" Margin="0,5,5,0" Visibility="{Binding ElementName=Self, Path=IsShowSpeed,Converter= {StaticResource Bool2VisibilityConvert}, Mode=OneWay}">
  38. <Border BorderBrush="black" BorderThickness="1,1,1,1" >
  39. <StackPanel Orientation="Horizontal" Height="18" HorizontalAlignment="Right" >
  40. <Border BorderBrush="black" BorderThickness="0,0,1,0" Background="DarkGray" >
  41. <TextBlock Text="Speed(rpm):" Width="80" Padding="0,0,5,0" VerticalAlignment="Center"/>
  42. </Border>
  43. <TextBlock x:Name="txtSpeed" Text="{Binding ElementName=Self, Path=DeviceData.Speed, Mode=OneWay}" VerticalAlignment="Stretch" Width="60" Padding="0,0,5,0"/>
  44. </StackPanel>
  45. </Border>
  46. <Border BorderBrush="black" BorderThickness="1,0,1,1" >
  47. <StackPanel Orientation="Horizontal" Height="18" HorizontalAlignment="Right" VerticalAlignment="Center" >
  48. <Border BorderBrush="black" BorderThickness="0,0,1,0" Background="DarkGray" >
  49. <TextBlock Text="Temp.(°C):" Width="80" Padding="0,0,5,0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
  50. </Border>
  51. <TextBlock x:Name="txtTemp" VerticalAlignment="Center" Text="{Binding ElementName=Self, Path=DeviceData.Temperature, Mode=OneWay}" Width="60" Padding="0,0,5,0"/>
  52. </StackPanel>
  53. </Border>
  54. </StackPanel>
  55. </Grid>
  56. </UserControl>