CalibrateControl.xaml 6.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <UserControl x:Class="CyberX8_Themes.UserControls.CalibrateControl"
  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="150" d:DesignWidth="300">
  10. <UserControl.Resources>
  11. <Converters:IntToTargetNumber4 x:Key="intToTargetNumber4"/>
  12. </UserControl.Resources>
  13. <Grid Height="{Binding ElementName=self,Path=ReplenNum,Converter={StaticResource intToTargetNumber4}}" Width="300">
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="37"/>
  16. <RowDefinition Height="37"/>
  17. <RowDefinition/>
  18. </Grid.RowDefinitions>
  19. <Grid.ColumnDefinitions>
  20. <ColumnDefinition Width="0.53*"/>
  21. <ColumnDefinition Width="0.35*"/>
  22. <ColumnDefinition Width="0.25*"/>
  23. </Grid.ColumnDefinitions>
  24. <Label Grid.Row="0" Grid.Column="0" Content="Calibrate Volume" FontWeight="Bold" FontSize="14" HorizontalAlignment="Left" VerticalAlignment="Center"></Label>
  25. <TextBox x:Name="TargetVolumeBox" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding Replen1,Mode=TwoWay}" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Left" Height="26" Width="110" Margin="9,0,0,0"/>
  26. <Label Grid.Row="0" Grid.Column="2" Content="(mL)" FontWeight="Bold" FontSize="14" HorizontalAlignment="Left" VerticalAlignment="Center" Width="40" Margin="26,0,0,0"></Label>
  27. <Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="Measured Volume" FontWeight="Bold" FontSize="14" HorizontalAlignment="Left" VerticalAlignment="Center"></Label>
  28. <TextBox x:Name="MeasuredVolumeBox" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding Replen1,Mode=TwoWay}" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Left" Height="26" Width="110" Margin="9,0,0,0"/>
  29. <Label Grid.Row="1" Grid.Column="2" Content="(mL)" FontWeight="Bold" FontSize="14" HorizontalAlignment="Left" VerticalAlignment="Center" Width="40" Margin="26,0,0,0"></Label>
  30. <StackPanel Grid.Row="2" Grid.ColumnSpan="3">
  31. <Grid Height="37.5">
  32. <Grid.ColumnDefinitions>
  33. <ColumnDefinition Width="0.53*"/>
  34. <ColumnDefinition Width="0.35*"/>
  35. <ColumnDefinition Width="0.25*"/>
  36. </Grid.ColumnDefinitions>
  37. <Label Content="Replen1 Pump Factor" FontWeight="Bold" FontSize="14" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  38. <Border Background="Black" Margin="20,6,5,6" Grid.Column="1">
  39. <TextBlock x:Name="PumpFactorBlock1" Text="{Binding ElementName=self,Path=ReplensPersistentCollection[0].ReplenPumpFactor,StringFormat=\{0:F3\}}" Foreground="Lime" FontSize="15" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  40. </Border>
  41. <Button Grid.Column="2" FontSize="12" Content="Calibrate" Click="Calibrate1_Click" Style="{StaticResource SysBtnStyle}" Height="32" Width="58" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="6,0,0,0" />
  42. </Grid>
  43. <Grid Height="37.5">
  44. <Grid.ColumnDefinitions>
  45. <ColumnDefinition Width="0.53*"/>
  46. <ColumnDefinition Width="0.35*"/>
  47. <ColumnDefinition Width="0.25*"/>
  48. </Grid.ColumnDefinitions>
  49. <Label Content="Replen2 Pump Factor" FontWeight="Bold" FontSize="14" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  50. <Border Background="Black" Margin="20,6,5,6" Grid.Column="1">
  51. <TextBlock x:Name="PumpFactorBlock2" Text="{Binding ElementName=self,Path=ReplensPersistentCollection[1].ReplenPumpFactor,StringFormat=\{0:F3\}}" Foreground="Lime" FontSize="15" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  52. </Border>
  53. <Button Grid.Column="2" FontSize="12" Content="Calibrate" Click="Calibrate2_Click" Style="{StaticResource SysBtnStyle}" Height="32" Width="58" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="6,0,0,0" />
  54. </Grid>
  55. <Grid Height="37.5">
  56. <Grid.ColumnDefinitions>
  57. <ColumnDefinition Width="0.53*"/>
  58. <ColumnDefinition Width="0.35*"/>
  59. <ColumnDefinition Width="0.25*"/>
  60. </Grid.ColumnDefinitions>
  61. <Label Content="Replen3 Pump Factor" FontWeight="Bold" FontSize="14" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  62. <Border Background="Black" Margin="20,6,5,6" Grid.Column="1">
  63. <TextBlock x:Name="PumpFactorBlock3" Text="{Binding ElementName=self,Path=ReplensPersistentCollection[2].ReplenPumpFactor,StringFormat=\{0:F3\}}" Foreground="Lime" FontSize="15" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  64. </Border>
  65. <Button Grid.Column="2" FontSize="12" Content="Calibrate" Click="Calibrate3_Click" Style="{StaticResource SysBtnStyle}" Height="32" Width="58" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="6,0,0,0" />
  66. </Grid>
  67. <Grid Height="37.5">
  68. <Grid.ColumnDefinitions>
  69. <ColumnDefinition Width="0.53*"/>
  70. <ColumnDefinition Width="0.35*"/>
  71. <ColumnDefinition Width="0.25*"/>
  72. </Grid.ColumnDefinitions>
  73. <Label Content="Replen4 Pump Factor" FontWeight="Bold" FontSize="14" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  74. <Border Background="Black" Margin="20,6,5,6" Grid.Column="1">
  75. <TextBlock x:Name="PumpFactorBlock4" Text="{Binding ElementName=self,Path=ReplensPersistentCollection[3].ReplenPumpFactor,StringFormat=\{0:F3\}}" Foreground="Lime" FontSize="15" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  76. </Border>
  77. <Button Grid.Column="2" FontSize="12" Content="Calibrate" Click="Calibrate4_Click" Style="{StaticResource SysBtnStyle}" Height="32" Width="58" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="6,0,0,0" />
  78. </Grid>
  79. </StackPanel>
  80. </Grid>
  81. </UserControl>