AITPump.xaml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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,0,5,0" Visibility="{Binding ElementName=Self, Path=IsShowSpeed,Converter= {StaticResource Bool2VisibilityConvert}, Mode=OneWay}">
  38. <StackPanel Orientation="Horizontal" Height="22.5" HorizontalAlignment="Right" >
  39. <TextBlock Text="Speed(rpm):" Width="80" Padding="0,0,5,0"/>
  40. <TextBlock x:Name="txtSpeed" Text="{Binding ElementName=Self, Path=DeviceData.Speed, Mode=OneWay}" Width="60" Padding="0,0,5,0"/>
  41. </StackPanel>
  42. <StackPanel Orientation="Horizontal" Height="22.5" HorizontalAlignment="Right" >
  43. <TextBlock Text="Temp.(°C):" Width="80" Padding="0,0,5,0"/>
  44. <TextBlock x:Name="txtTemp" Text="{Binding ElementName=Self, Path=DeviceData.Temperature, Mode=OneWay}" Width="60" Padding="0,0,5,0"/>
  45. </StackPanel>
  46. </StackPanel>
  47. </Grid>
  48. </UserControl>