VPWMainPurgeControl.xaml 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <UserControl x:Class="PunkHPX8_Themes.UserControls.VPWMainPurgeControl"
  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:PunkHPX8_Themes.Converters"
  7. xmlns:UserControls="clr-namespace:PunkHPX8_Themes.UserControls"
  8. xmlns:Control="clr-namespace:MECF.Framework.UI.Core.Control;assembly=MECF.Framework.UI.Core"
  9. xmlns:local="clr-namespace:PunkHPX8_Themes.UserControls"
  10. mc:Ignorable="d" x:Name="self"
  11. d:DesignHeight="110" d:DesignWidth="420">
  12. <UserControl.Resources>
  13. <converters:BoolToYellowColor x:Key="boolToYellowColor"></converters:BoolToYellowColor>
  14. <converters:BoolToColor x:Key="boolToColor"></converters:BoolToColor>
  15. <converters:BoolToColor2 x:Key="boolToColor2"></converters:BoolToColor2>
  16. <converters:BoolToColor6 x:Key="boolToColor6"></converters:BoolToColor6>
  17. <converters:BoolToBool x:Key="boolToBool"></converters:BoolToBool>
  18. </UserControl.Resources>
  19. <Border BorderBrush="Gray">
  20. <Grid>
  21. <GroupBox Header="Purge" BorderBrush="DarkGray">
  22. <Grid>
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="40"/>
  25. <RowDefinition Height="40"/>
  26. <RowDefinition/>
  27. </Grid.RowDefinitions>
  28. <Grid.ColumnDefinitions>
  29. <ColumnDefinition Width="180"/>
  30. <ColumnDefinition Width="30"/>
  31. <ColumnDefinition Width="80"/>
  32. <ColumnDefinition Width="80"/>
  33. <ColumnDefinition Width="30"/>
  34. <ColumnDefinition Width="60"/>
  35. <ColumnDefinition/>
  36. </Grid.ColumnDefinitions>
  37. <Grid Grid.Row="0" Grid.Column="0">
  38. <Label Content="Purge Valve" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
  39. </Grid>
  40. <Grid Grid.Row="1" Grid.Column="0">
  41. <Button Style="{StaticResource SysBtnStyle}" Margin="15,0,0,0" Grid.Column="1" Height="25" Width="90" HorizontalAlignment="Left" Content="Purge" Click="Purge_Click"></Button>
  42. </Grid>
  43. <Grid Grid.Row="1" Grid.Column="1">
  44. <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
  45. Fill="{Binding IsPurge, Converter={StaticResource boolToColor}, ElementName=self}"/>
  46. </Grid>
  47. <Grid Grid.Row="0" Grid.Column="1">
  48. <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
  49. Fill="{Binding PurgeValveEnable, Converter={StaticResource boolToColor}, ElementName=self}"/>
  50. </Grid>
  51. <Grid Grid.Row="0" Grid.Column="2" >
  52. <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="On" Click="PurgeValveOn_Click"></Button>
  53. </Grid>
  54. <Grid Grid.Row="0" Grid.Column="3" >
  55. <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="Off" Click="PurgeValveOff_Click"></Button>
  56. </Grid>
  57. <Grid Grid.Row="0" Grid.Column="4">
  58. <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
  59. Fill="{Binding PurgeValveEnable, Converter={StaticResource boolToColor2}, ElementName=self}"/>
  60. </Grid>
  61. </Grid>
  62. </GroupBox >
  63. </Grid>
  64. </Border >
  65. </UserControl>