DMReservoirUIControl.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <UserControl x:Class="PunkHPX8_Themes.UserControls.DMReservoirUIControl"
  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:userControls="clr-namespace:PunkHPX8_Themes.UserControls"
  7. xmlns:customControls="clr-namespace:PunkHPX8_Themes.CustomControls"
  8. xmlns:ctrls="clr-namespace:PunkHPX8_Themes.UserControls"
  9. xmlns:converters="clr-namespace:PunkHPX8_Themes.Converters"
  10. xmlns:local="clr-namespace:PunkHPX8_Themes.UserControls"
  11. mc:Ignorable="d" Name="self"
  12. d:DesignHeight="700" d:DesignWidth="1000">
  13. <UserControl.Resources>
  14. <converters:BoolToVisibility2 x:Key="boolToVisibility2"></converters:BoolToVisibility2>
  15. <converters:BoolToVisibility x:Key="boolToVisibility"></converters:BoolToVisibility>
  16. <converters:BoolToOrientation x:Key="boolToOrientation"></converters:BoolToOrientation>
  17. <converters:BoolToRedGreenColor x:Key="boolToRedGreenColor"/>
  18. <converters:BoolToRedColor x:Key="boolToRedColor"/>
  19. <converters:MutiBoolToBool x:Key="mutiBoolToBool"/>
  20. <ContextMenu x:Key="ANIsolationValve">
  21. <MenuItem Header="Open" Click="OpenANIsolationValve_Click"/>
  22. <MenuItem Header="Close" Click="CloseANIsolationValve_Click"/>
  23. </ContextMenu>
  24. <ContextMenu x:Key="CAIsolationValve">
  25. <MenuItem Header="Open" Click="OpenCAIsolationValve_Click"/>
  26. <MenuItem Header="Close" Click="CloseCAIsolationValve_Click"/>
  27. </ContextMenu>
  28. <ContextMenu x:Key="ReturnFlowValve">
  29. <MenuItem Header="Open" Click="OpenReturnFlowValve_Click"/>
  30. <MenuItem Header="Close" Click="CloseReturnFlowValve_Click"/>
  31. </ContextMenu>
  32. <ContextMenu x:Key="DegasValve">
  33. <MenuItem Header="Open" Click="OpenDegasValve_Click"/>
  34. <MenuItem Header="Close" Click="CloseDegasValve_Click"/>
  35. </ContextMenu>
  36. <ContextMenu x:Key="SampleValve">
  37. <MenuItem Header="Open" Click="OpenSampleValve_Click"/>
  38. <MenuItem Header="Close" Click="CloseSampleValve_Click"/>
  39. </ContextMenu>
  40. </UserControl.Resources>
  41. <Canvas>
  42. <userControls:ReservoirPump IsEnabled="True" ModuleName="{Binding ModuleName,ElementName=self}" PumpType="VacuumPump" RotateTransformValue="0" IsOpenPump="{Binding IsANPumpOpen,Mode=TwoWay,ElementName=self}" Height="60" Width="60" Tag="26" HorizontalAlignment="Center" VerticalAlignment="Top" Canvas.Left="96" Canvas.Top="170" RenderTransformOrigin="0.25,0.517" >
  43. <local:ReservoirPump.RenderTransform>
  44. <TransformGroup>
  45. <ScaleTransform/>
  46. <SkewTransform/>
  47. <RotateTransform Angle="-89.495"/>
  48. <TranslateTransform/>
  49. </TransformGroup>
  50. </local:ReservoirPump.RenderTransform>
  51. </userControls:ReservoirPump>
  52. <userControls:ReservoirPump IsEnabled="True" ModuleName="{Binding ModuleName,ElementName=self}" PumpType="BoosterPump" RotateTransformValue="0" IsOpenPump="{Binding IsCAPumpOpen,Mode=TwoWay,ElementName=self}" Height="60" Width="60" Tag="26" HorizontalAlignment="Center" VerticalAlignment="Top" Canvas.Left="400" Canvas.Top="550" />
  53. <Grid Height="50" Width="100" Canvas.Left="206" Canvas.Top="83" HorizontalAlignment="Center" VerticalAlignment="Top" >
  54. <Grid.RowDefinitions>
  55. <RowDefinition Height="30"></RowDefinition>
  56. <RowDefinition Height="20"></RowDefinition>
  57. </Grid.RowDefinitions>
  58. <Grid Grid.Row="0">
  59. <customControls:CommonValveControl Height="16" Width="16" ValveOrientation="Horizontal"
  60. Status="{Binding ElementName=self,Path=ANIsolationValve}"
  61. IsCanEdit="True"
  62. ContextMenu="{StaticResource ANIsolationValve}"/>
  63. </Grid>
  64. <Grid Grid.Row="1">
  65. <Label Margin="12,0,0,0" Height="20" Width="100" FontSize="10" FontWeight="Bold" Content="AN Isolation" />
  66. </Grid>
  67. </Grid>
  68. <Grid Height="50" Width="100" Canvas.Left="500" Canvas.Top="60" HorizontalAlignment="Center" VerticalAlignment="Top" >
  69. <Grid.RowDefinitions>
  70. <RowDefinition Height="30"></RowDefinition>
  71. <RowDefinition Height="20"></RowDefinition>
  72. </Grid.RowDefinitions>
  73. <Grid Grid.Row="0">
  74. <customControls:CommonValveControl Height="16" Width="16" ValveOrientation="Horizontal"
  75. Status="{Binding ElementName=self,Path=CAIsolationValve}"
  76. IsCanEdit="True"
  77. ContextMenu="{StaticResource CAIsolationValve}"/>
  78. </Grid>
  79. <Grid Grid.Row="1">
  80. <Label Margin="12,0,0,0" Height="20" Width="100" FontSize="10" FontWeight="Bold" Content="CA Isolation" />
  81. </Grid>
  82. </Grid>
  83. <Grid Height="50" Width="100" Canvas.Left="600" Canvas.Top="460" HorizontalAlignment="Center" VerticalAlignment="Top" >
  84. <Grid.RowDefinitions>
  85. <RowDefinition Height="30"></RowDefinition>
  86. <RowDefinition Height="20"></RowDefinition>
  87. </Grid.RowDefinitions>
  88. <Grid Grid.Row="0">
  89. <customControls:CommonValveControl Height="16" Width="16" ValveOrientation="Horizontal"
  90. Status="{Binding ElementName=self,Path=DegasValve}"
  91. IsCanEdit="True"
  92. ContextMenu="{StaticResource DegasValve}"/>
  93. </Grid>
  94. <Grid Grid.Row="1">
  95. <Label Margin="12,0,0,0" Height="20" Width="100" FontSize="10" FontWeight="Bold" Content="Degas Valve" />
  96. </Grid>
  97. </Grid>
  98. <Grid Height="50" Width="100" Canvas.Left="500" Canvas.Top="600" HorizontalAlignment="Center" VerticalAlignment="Top" >
  99. <Grid.RowDefinitions>
  100. <RowDefinition Height="30"></RowDefinition>
  101. <RowDefinition Height="20"></RowDefinition>
  102. </Grid.RowDefinitions>
  103. <Grid Grid.Row="0">
  104. <customControls:CommonValveControl Height="16" Width="16" ValveOrientation="Horizontal"
  105. Status="{Binding ElementName=self,Path=SampleValve}"
  106. IsCanEdit="True"
  107. ContextMenu="{StaticResource SampleValve}"/>
  108. </Grid>
  109. <Grid Grid.Row="1">
  110. <Label Margin="12,0,0,0" Height="20" Width="100" FontSize="10" FontWeight="Bold" Content="Sample Valve" />
  111. </Grid>
  112. </Grid>
  113. <Grid Height="50" Width="120" Canvas.Left="300" Canvas.Top="260" HorizontalAlignment="Center" VerticalAlignment="Top" >
  114. <Grid.RowDefinitions>
  115. <RowDefinition Height="30"></RowDefinition>
  116. <RowDefinition Height="20"></RowDefinition>
  117. </Grid.RowDefinitions>
  118. <Grid Grid.Row="0">
  119. <customControls:CommonValveControl Height="16" Width="16" ValveOrientation="Horizontal"
  120. Status="{Binding ElementName=self,Path=ReturnFlowValve}"
  121. IsCanEdit="True"
  122. ContextMenu="{StaticResource ReturnFlowValve}"/>
  123. </Grid>
  124. <Grid Grid.Row="1">
  125. <Label Margin="12,0,0,0" Height="20" Width="100" FontSize="10" FontWeight="Bold" Content="ReturnFlow Valve" />
  126. </Grid>
  127. </Grid>
  128. <Canvas Width="150" Height="100" Canvas.Left="778" Canvas.Top="476" HorizontalAlignment="Center" VerticalAlignment="Top">
  129. <userControls:TempControl TempValue="{Binding ReservoirTemperature}" Status="{Binding TCStatus}"
  130. DisableStatus="{Binding TCEnableStatus}">
  131. </userControls:TempControl>
  132. </Canvas>
  133. <Grid Canvas.Left="205" Canvas.Top="470">
  134. <Grid.ColumnDefinitions>
  135. <ColumnDefinition Width="140"/>
  136. </Grid.ColumnDefinitions>
  137. <Grid.RowDefinitions>
  138. <RowDefinition Height="25"/>
  139. <RowDefinition Height="25"/>
  140. <RowDefinition Height="25"/>
  141. <RowDefinition Height="25"/>
  142. <RowDefinition Height="25"/>
  143. <RowDefinition Height="25"/>
  144. </Grid.RowDefinitions>
  145. <Grid Grid.Row="0" Grid.Column="0">
  146. <Label Content="CA Level" FontSize="12" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  147. </Grid>
  148. <Border Grid.Row="1" Grid.Column="0" Margin="5,0,15,5" Background="Black" Width="100">
  149. <TextBlock Text="{Binding ElementName=self,Path=CALevel, StringFormat={}{0:F2} L}" Foreground="Lime" FontSize="12" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  150. </Border>
  151. <Grid Grid.Row="2" Grid.Column="0">
  152. <Label Content="CA LevelRaw" FontSize="12" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  153. </Grid>
  154. <Border Grid.Row="3" Grid.Column="0" Margin="5,0,15,5" Background="Black" Width="100">
  155. <TextBlock Text="{Binding ElementName=self,Path=CALevelRaw, StringFormat={}{0:F2} %}" Foreground="Lime" FontSize="12" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  156. </Border>
  157. <Grid Grid.Row="4" Grid.Column="0">
  158. <Label Content="High" FontSize="12" FontWeight="Bold" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,25,0"/>
  159. <Ellipse Margin="61,2,20,2" Width="16" Height="16" Stroke="Silver"
  160. Fill="{Binding ElementName=self,Path=IsCALevelHigh,Converter={StaticResource boolToRedGreenColor}}"/>
  161. </Grid>
  162. <Grid Grid.Row="5" Grid.Column="0">
  163. <Label Content="Low" FontSize="12" FontWeight="Bold" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,25,0"/>
  164. <Ellipse Margin="61,2,20,2" Width="16" Height="16" Fill="{Binding ElementName=self,Path=IsCALevelLow,Converter={StaticResource boolToRedGreenColor}}" Stroke="Gray"/>
  165. </Grid>
  166. </Grid>
  167. <ctrls:TextboxWithLabel Canvas.Top="368" Canvas.Left="274" LabelValue="AN Flow" TextBoxValue="{Binding ANFlow, StringFormat={}{0:F2} L/min}" TextBoxColor="Black" HorizontalAlignment="Center" VerticalAlignment="Top" />
  168. <ctrls:TextboxWithLabel Canvas.Top="268" Canvas.Left="474" LabelValue="CA Flow" TextBoxValue="{Binding ANFlow, StringFormat={}{0:F2} L/min}" TextBoxColor="Black" HorizontalAlignment="Center" VerticalAlignment="Top" />
  169. <Ellipse Canvas.Left="100" Canvas.Top="20" Width="16" Height="16" Fill="{Binding IsANLevelHigh, Converter={StaticResource boolToRedColor}}" Stroke="Silver"/>
  170. <Ellipse Canvas.Left="100" Canvas.Top="120" Width="16" Height="16" Fill="{Binding IsANLevelLow, Converter={StaticResource boolToRedColor}}" Stroke="Silver"/>
  171. </Canvas>
  172. </UserControl>