AITPump25.xaml 4.5 KB

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