ReplenControl.xaml 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <UserControl x:Class="CyberX8_Themes.UserControls.ReplenControl"
  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" x:Name="self"
  9. d:DesignHeight="312" d:DesignWidth="160">
  10. <UserControl.Resources>
  11. <converters:StringToString2 x:Key="stringToString2"/>
  12. <converters:StringToColorConverter2 x:Key="stringToColor2"/>
  13. </UserControl.Resources>
  14. <Grid>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="89"/>
  17. <RowDefinition Height="122"/>
  18. <RowDefinition Height="101"/>
  19. </Grid.RowDefinitions>
  20. <StackPanel Grid.Row="0" Grid.Column="0" Orientation="Vertical" >
  21. <Label Content="Volume" FontSize="16" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" HorizontalAlignment="Center" Height="41"/>
  22. <Border Background="Black" Margin="14,5,14,0" Height="36" >
  23. <TextBlock Text="{Binding ElementName=self,Path=CurrentDosingVolume,StringFormat=\{0:F2\} mL}" Foreground="Lime" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  24. </Border>
  25. </StackPanel>
  26. <Rectangle Grid.Row="1" RadiusX="10" RadiusY="10" StrokeThickness="4" Opacity="0.7" Width="78" Fill="{Binding ElementName=self,Path=BottleLevel,Converter={StaticResource stringToColor2}}" Height="107" Margin="0,15,0,0">
  27. <Rectangle.Stroke>
  28. <LinearGradientBrush >
  29. <GradientStop Color="LightGray" Offset="0.35" />
  30. <GradientStop Color="Gray" Offset="1" />
  31. </LinearGradientBrush>
  32. </Rectangle.Stroke>
  33. </Rectangle>
  34. <Label Grid.Row="1" Content="{Binding ElementName=self,Path=ReplenName,Converter={StaticResource stringToString2}}" FontSize="19" FontWeight="Bold" Grid.Column="0" Height="61" VerticalAlignment="Top" Margin="30,10,62,0" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" RenderTransformOrigin="0.417,0.878"/>
  35. <local:FlowPipe Grid.Row="2" IsFlowing="{Binding ElementName=replenPump,Path=IsOpenPump}" IsReverse="True" Height="8" Width="102" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="36,43,0,0" RenderTransformOrigin="0.529,0.5" >
  36. <local:FlowPipe.RenderTransform>
  37. <TransformGroup>
  38. <ScaleTransform/>
  39. <SkewTransform/>
  40. <RotateTransform Angle="-90.366"/>
  41. <TranslateTransform/>
  42. </TransformGroup>
  43. </local:FlowPipe.RenderTransform>
  44. </local:FlowPipe>
  45. <local:ReservoirPump x:Name="replenPump" Grid.Row="2" IsOpenPump="{Binding ElementName=self,Path=IsPumpOpen}" ModuleName="{Binding ElementName=self,Path=ModuleName}" PumpType="{Binding ElementName=self,Path=ReplenName}" RotateTransformValue="-90" Height="55" Width="56" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="42,19,0,0"/>
  46. <Canvas Width="40" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Margin="89,35,0,0" Grid.Row="2" >
  47. <Canvas.RenderTransform>
  48. <TransformGroup>
  49. <ScaleTransform/>
  50. <SkewTransform/>
  51. <RotateTransform Angle="-90"/>
  52. <TranslateTransform/>
  53. </TransformGroup>
  54. </Canvas.RenderTransform>
  55. <Polygon Width="10" Points="0,10 20,0 20,20" Fill="Black" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center"></Polygon>
  56. <Polygon Points="0,0 30,0 30,4 0,4" Fill="Black" StrokeThickness="1" Canvas.Left="10" Canvas.Top="8" HorizontalAlignment="Left" VerticalAlignment="Center"></Polygon>
  57. </Canvas>
  58. </Grid>
  59. </UserControl>