CatholyteGroove.xaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <UserControl x:Class="CyberX8_Themes.UserControls.CatholyteGroove"
  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:local="clr-namespace:CyberX8_Themes.UserControls"
  7. xmlns:converters="clr-namespace:CyberX8_Themes.Converters"
  8. mc:Ignorable="d" Name="self"
  9. d:DesignHeight="400" d:DesignWidth="450">
  10. <UserControl.Resources>
  11. <converters:BoolToColor x:Key="boolToColor"/>
  12. <converters:BoolToRedColor x:Key="boolToRedColor"/>
  13. <converters:BoolToRedGreenColor x:Key="boolToRedGreenColor"/>
  14. <converters:BoolToVisibility2 x:Key="boolToVisibility2"></converters:BoolToVisibility2>
  15. </UserControl.Resources>
  16. <Grid>
  17. <Viewbox Stretch="Fill">
  18. <Canvas Width="450" Height="400">
  19. <Viewbox Width="450" Height="400">
  20. <Image Source="pack://application:,,,/CyberX8_Themes;component/Themes/Images/parts/Catholyte.png"></Image>
  21. </Viewbox>
  22. <Frame Name="MainFrame" />
  23. <TextBlock FontSize="18" Canvas.Top="44" Canvas.Left="11" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Top">Catholyte</TextBlock>
  24. <Viewbox Canvas.Left="30" Canvas.Top="-3">
  25. <Image Width="50" Height="30" Source="pack://application:,,,/CyberX8_Themes;component/Themes/Images/parts/Valve1.png"></Image>
  26. </Viewbox>
  27. <Grid Canvas.Left="305" Canvas.Top="70">
  28. <Grid.ColumnDefinitions>
  29. <ColumnDefinition Width="140"/>
  30. </Grid.ColumnDefinitions>
  31. <Grid.RowDefinitions>
  32. <RowDefinition Height="25"/>
  33. <RowDefinition Height="25"/>
  34. <RowDefinition Height="25"/>
  35. <RowDefinition Height="25"/>
  36. <RowDefinition Height="25"/>
  37. <RowDefinition Height="25"/>
  38. <RowDefinition Height="25"/>
  39. </Grid.RowDefinitions>
  40. <Grid Grid.Row="0" Grid.Column="0">
  41. <Label Content="CA Level" FontSize="12" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  42. </Grid>
  43. <Border Grid.Row="1" Grid.Column="0" Margin="5,0,15,5" Background="Black" Width="100">
  44. <TextBlock Text="{Binding ElementName=self,Path=CALevel, StringFormat={}{0:F2} L}" Foreground="Lime" FontSize="12" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  45. </Border>
  46. <Grid Grid.Row="2" Grid.Column="0">
  47. <Label Content="CA LevelRaw" FontSize="12" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  48. </Grid>
  49. <Border Grid.Row="3" Grid.Column="0" Margin="5,0,15,5" Background="Black" Width="100">
  50. <TextBlock Text="{Binding ElementName=self,Path=CALevelRaw, StringFormat={}{0:F2} %}" Foreground="Lime" FontSize="12" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  51. </Border>
  52. <Grid Grid.Row="4" Grid.Column="0">
  53. <Label Content="High" FontSize="12" FontWeight="Bold" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,25,0"/>
  54. <Ellipse Margin="61,2,20,2" Width="16" Height="16" Stroke="Silver"
  55. Fill="{Binding ElementName=self,Path=IsHighLevel,Converter={StaticResource boolToRedGreenColor}}"/>
  56. </Grid>
  57. <Grid Grid.Row="5" Grid.Column="0">
  58. <Label Content="Low" FontSize="12" FontWeight="Bold" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,25,0"/>
  59. <Ellipse Margin="61,2,20,2" Width="16" Height="16" Fill="{Binding ElementName=self,Path=IsLowLevel,Converter={StaticResource boolToRedGreenColor}}" Stroke="Gray"/>
  60. </Grid>
  61. <Grid Grid.Row="6" Grid.Column="0" Visibility="{Binding ElementName=self,Path=IsShowHighSafety,Converter={StaticResource bool2VisibilityConverter}}">
  62. <Ellipse Margin="61,2,20,2" Width="16" Height="16" Fill="{Binding ElementName=self,Path=IsSafetyHighLevel,Converter={StaticResource boolToRedColor}}" Stroke="Gray"/>
  63. <Label Content="High Safety" FontSize="12" FontWeight="Bold" Margin="0,0,50,0" />
  64. </Grid>
  65. </Grid>
  66. <Rectangle x:Name="ErrorRectangle" Fill="Red" Height="268" Width="389" VerticalAlignment="Center" Opacity="0.5" Panel.ZIndex="3"
  67. Visibility="{Binding ElementName=self,Path=IsError,Converter={StaticResource boolToVisibility2}}" Canvas.Left="30" Canvas.Top="77" HorizontalAlignment="Center"/>
  68. </Canvas>
  69. </Viewbox>
  70. </Grid>
  71. </UserControl>