CrossDoseControl.xaml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <UserControl x:Class="CyberX8_Themes.UserControls.CrossDoseControl"
  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:Control="clr-namespace:MECF.Framework.UI.Core.Control;assembly=MECF.Framework.UI.Core"
  8. xmlns:Converters="clr-namespace:CyberX8_Themes.Converters"
  9. mc:Ignorable="d" x:Name="self"
  10. d:DesignHeight="202" d:DesignWidth="333">
  11. <UserControl.Resources>
  12. <Converters:BoolToVisibility2 x:Key="boolToVisibility2"/>
  13. <Converters:BoolToVisibility x:Key="boolToVisibility"/>
  14. </UserControl.Resources>
  15. <GroupBox Header="Cross Dose" FontWeight="Bold" FontSize="15">
  16. <Grid>
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="25"></RowDefinition>
  19. <RowDefinition Height="30"></RowDefinition>
  20. <RowDefinition Height="30"></RowDefinition>
  21. <RowDefinition Height="30"></RowDefinition>
  22. <RowDefinition Height="30"></RowDefinition>
  23. <RowDefinition Height="30"></RowDefinition>
  24. </Grid.RowDefinitions>
  25. <Grid.ColumnDefinitions>
  26. <ColumnDefinition Width="100"/>
  27. <ColumnDefinition Width="100"/>
  28. <ColumnDefinition Width="120"/>
  29. </Grid.ColumnDefinitions>
  30. <Grid Grid.Column="2" Grid.Row="0">
  31. <Label FontSize="14" FontWeight="Bold" VerticalAlignment="Bottom" Content="Request(mL)" HorizontalAlignment="Center"></Label>
  32. </Grid>
  33. <Grid Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center">
  34. <Button Style="{StaticResource SysBtnStyle}" Click="Start_Click" Height="30" Width="80" HorizontalAlignment="Center" VerticalAlignment="Bottom" Content="Start"></Button>
  35. </Grid>
  36. <Grid Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
  37. <Button Style="{StaticResource SysBtnStyle}" Click="Halt_Click" Height="30" Width="80" HorizontalAlignment="Center" VerticalAlignment="Bottom" Content="Halt"></Button>
  38. </Grid>
  39. <Grid Grid.Row="1" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center">
  40. <TextBox x:Name="requestVolume" VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" PreviewTextInput="OnPreviewTextInput" InputMethod.IsInputMethodEnabled="False" HorizontalAlignment="Center" FontSize="15" FontWeight="Bold" Height="30" Width="110"/>
  41. </Grid>
  42. <Grid Grid.Row="2" Grid.Column="0">
  43. <Label Content="Remaining" FontSize="14" FontWeight="Bold" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
  44. </Grid>
  45. <Border Grid.Row="3" Background="Black" Width="80">
  46. <TextBlock Text="{Binding ElementName=self,Path=ReservoirData.RemainingCrossDoseVolume,StringFormat=\{0:F2\} mL}" Foreground="Lime" FontSize="14" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  47. </Border>
  48. <Grid Grid.Row="4" Grid.RowSpan="2" Grid.Column="0" Margin="0 10 0 0" HorizontalAlignment="Center" VerticalAlignment="Center">
  49. <Button Style="{StaticResource SysBtnStyle}" Click="Calibrate_Click" IsEnabled="{Binding ElementName=self,Path=IsCalibrateEnable}" Grid.Column="1" Height="30" Width="80" HorizontalAlignment="Center" VerticalAlignment="Bottom" Content="Calibrate"></Button>
  50. </Grid>
  51. <Grid Grid.Row="2" Grid.Column="1">
  52. <Label Content="Flow" FontSize="14" FontWeight="Bold" VerticalAlignment="Bottom" HorizontalAlignment="Center" />
  53. </Grid>
  54. <Border Grid.Row="3" Grid.Column="1" Background="Black" Width="80">
  55. <TextBlock Text="{Binding ElementName=self,Path=ANTransferFlow,StringFormat=\{0:F2\} L/min}" Foreground="Lime" FontSize="14" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  56. </Border>
  57. <Grid Grid.Column="2" Grid.Row="2">
  58. <Label FontSize="14" FontWeight="Bold" VerticalAlignment="Bottom" HorizontalAlignment="Center" Content="Counter(mL)"></Label>
  59. </Grid>
  60. <Grid Grid.Row="3" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center">
  61. <Grid.ColumnDefinitions>
  62. <ColumnDefinition Width="12*"/>
  63. <ColumnDefinition Width="43*"/>
  64. </Grid.ColumnDefinitions>
  65. <TextBox x:Name="counterVolume" Visibility="{Binding ElementName=self,Path=IsAutoMode, Converter={StaticResource boolToVisibility}}" VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" PreviewTextInput="OnPreviewTextInput" InputMethod.IsInputMethodEnabled="False" HorizontalAlignment="Left" FontSize="15" FontWeight="Bold" Height="30" Width="110" Grid.ColumnSpan="2"/>
  66. <TextBox IsEnabled="False" Visibility="{Binding ElementName=self,Path=IsAutoMode,Converter={StaticResource boolToVisibility2}}"
  67. Text="{Binding ElementName=self,Path=TargetDosingVolume,StringFormat=\{0:F2\}}" VerticalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" HorizontalAlignment="Left" FontSize="15" FontWeight="Bold" Height="30" Width="110" Grid.ColumnSpan="2"/>
  68. </Grid>
  69. <Grid Grid.Row="4" Grid.Column="1">
  70. <Label FontSize="14" FontWeight="Bold" VerticalAlignment="Bottom" HorizontalAlignment="Center" Content="Pump Factor"></Label>
  71. </Grid>
  72. <Border Grid.Row="5" Grid.Column="1" Background="Black" Width="80">
  73. <TextBlock Text="{Binding ElementName=self,Path=PumpFactor,StringFormat=\{0:F3\}}" Foreground="Lime" FontSize="14" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  74. </Border>
  75. <Grid Grid.Row="4" Grid.RowSpan="2" Grid.Column="2" Margin="0 10 0 0" HorizontalAlignment="Center" VerticalAlignment="Center">
  76. <Button Style="{StaticResource SysBtnStyle}" IsEnabled="{Binding ElementName=self,Path=IsCalibrateEnable}" Click="Reset_Click" Grid.Column="1" Height="30" Width="80" HorizontalAlignment="Center" VerticalAlignment="Bottom" Content="Reset"></Button>
  77. </Grid>
  78. </Grid>
  79. </GroupBox>
  80. </UserControl>