RdsRecipeView.xaml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <UserControl x:Class="CyberX8_MainPages.Views.RdsRecipeView"
  2. xmlns:UserControls="clr-namespace:CyberX8_Themes.UserControls;assembly=CyberX8_Themes"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:CyberX8_MainPages.Views"
  8. xmlns:prism="http://prismlibrary.com/"
  9. xmlns:Control="clr-namespace:MECF.Framework.UI.Core.Control;assembly=MECF.Framework.UI.Core"
  10. xmlns:converters="clr-namespace:CyberX8_MainPages.Converters"
  11. xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
  12. xmlns:wf ="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
  13. prism:ViewModelLocator.AutoWireViewModel="True"
  14. mc:Ignorable="d"
  15. d:DesignHeight="800" d:DesignWidth="1800" Loaded="UserControl_Loaded">
  16. <UserControl.Resources>
  17. <converters:BoolReverseConverter x:Key="boolReverseConverter"/>
  18. <converters:BoolVisibilityConverter x:Key="boolVisibilityConverter"/>
  19. </UserControl.Resources>
  20. <Grid>
  21. <Grid.RowDefinitions>
  22. <RowDefinition Height="100"></RowDefinition>
  23. <RowDefinition Height="210"></RowDefinition>
  24. <RowDefinition Height="*"/>
  25. </Grid.RowDefinitions>
  26. <Grid.ColumnDefinitions>
  27. <ColumnDefinition Width="50"></ColumnDefinition>
  28. <ColumnDefinition Width="400"></ColumnDefinition>
  29. <ColumnDefinition></ColumnDefinition>
  30. </Grid.ColumnDefinitions>
  31. <UserControls:RecipeFileLoadControl Grid.Row="1" Grid.RowSpan="2" Grid.Column="1" Title="Rds Recipe" RecipeNodes="{Binding RecipeNodes}" OperationCommand="{Binding OperationCommand}"
  32. RecipeLocation="{Binding CurrentNode.RecipeLocation}" EditEnable="{Binding EditEnable}" CreateEnable="{Binding CreateEnable}" RecipeFileName="{Binding CurrentNode.FileName}"
  33. CreateCommand="{Binding CreateCommand}" EditCommand="{Binding EditCommand}"/>
  34. <Grid Grid.Row="1" Grid.Column="2" Margin="10 0 0 0">
  35. <Grid.RowDefinitions>
  36. <RowDefinition Height="70"></RowDefinition>
  37. <RowDefinition Height="70"></RowDefinition>
  38. <RowDefinition Height="70"></RowDefinition>
  39. <RowDefinition/>
  40. </Grid.RowDefinitions>
  41. <Grid.ColumnDefinitions>
  42. <ColumnDefinition Width="220"></ColumnDefinition>
  43. <ColumnDefinition Width="220"></ColumnDefinition>
  44. <ColumnDefinition Width="220"></ColumnDefinition>
  45. <ColumnDefinition Width="220"></ColumnDefinition>
  46. <ColumnDefinition Width="220"></ColumnDefinition>
  47. </Grid.ColumnDefinitions>
  48. <GroupBox Header="PPID" Grid.Row="0" Grid.ColumnSpan="3">
  49. <TextBlock Text="{Binding Recipe.Ppid}" FontSize="20" VerticalAlignment="Center" TextAlignment="Center">
  50. </TextBlock>
  51. </GroupBox>
  52. <Grid Grid.Row="0" Grid.Column="3" Grid.ColumnSpan="2" Margin="10 0 0 0 ">
  53. <Grid.RowDefinitions>
  54. <RowDefinition Height="70"></RowDefinition>
  55. </Grid.RowDefinitions>
  56. <Grid Grid.Row="0" IsEnabled="{Binding Enable}">
  57. <Grid.ColumnDefinitions>
  58. <ColumnDefinition/>
  59. <ColumnDefinition/>
  60. <ColumnDefinition/>
  61. </Grid.ColumnDefinitions>
  62. <Button Grid.Column="0" Style="{StaticResource SysBtnStyle}" Content="Save" Height="35" Width="100" Command="{Binding SaveRecipeCommand}"></Button>
  63. <Button Grid.Column="1" Style="{StaticResource SysBtnStyle}" Content="SaveAs" Height="35" Width="100" Command="{Binding SaveAsRecipeCommand}"></Button>
  64. </Grid>
  65. </Grid>
  66. <GroupBox Header="Description" Grid.Row="1" Grid.ColumnSpan="3">
  67. <TextBlock Text="{Binding Recipe.Description}" FontSize="18" VerticalAlignment="Center" TextAlignment="Center">
  68. </TextBlock>
  69. </GroupBox>
  70. <GroupBox Header="Author" Grid.Row="2" Grid.Column="0">
  71. <Label Content="{Binding Recipe.Author}" Height="30" Width="195" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="White" Background="Gray"
  72. HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.Column="1" Margin="6,0,0,0"></Label>
  73. </GroupBox>
  74. <GroupBox Header="CreateDate" Grid.Row="2" Grid.Column="1">
  75. <Label Content="{Binding Recipe.CreateDate}" Height="30" Width="195" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="White" Background="Gray"
  76. HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.Column="1" Margin="6,0,0,0"></Label>
  77. </GroupBox>
  78. <GroupBox Header="SaveDate" Grid.Row="2" Grid.Column="2">
  79. <Label Content="{Binding Recipe.SaveDate}" Height="30" Width="195" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="White" Background="Gray"
  80. HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.Column="1" Margin="6,0,0,0"></Label>
  81. </GroupBox>
  82. </Grid>
  83. <Grid Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2">
  84. <Grid>
  85. <Grid.RowDefinitions>
  86. <RowDefinition Height="Auto"></RowDefinition>
  87. <RowDefinition Height="Auto"></RowDefinition>
  88. <RowDefinition/>
  89. </Grid.RowDefinitions>
  90. <Grid.ColumnDefinitions>
  91. <ColumnDefinition Width="Auto"></ColumnDefinition>
  92. <ColumnDefinition Width="Auto"/>
  93. </Grid.ColumnDefinitions>
  94. <GroupBox Header="Chem Replen" Grid.Row="0" Grid.Column="0" Padding="10" Margin="10 0 10 10" >
  95. <Grid>
  96. <Grid.RowDefinitions>
  97. <RowDefinition Height="75"></RowDefinition>
  98. <RowDefinition Height="75"></RowDefinition>
  99. <RowDefinition Height="75"></RowDefinition>
  100. <RowDefinition Height="75"></RowDefinition>
  101. <RowDefinition Height="75"></RowDefinition>
  102. <RowDefinition Height="75"></RowDefinition>
  103. </Grid.RowDefinitions>
  104. <Grid.ColumnDefinitions>
  105. <ColumnDefinition Width="220"></ColumnDefinition>
  106. <ColumnDefinition Width="10"></ColumnDefinition>
  107. </Grid.ColumnDefinitions>
  108. <GroupBox Header="Enable" Grid.Column="0" Grid.Row="0" IsEnabled="{Binding Enable}">
  109. <Grid>
  110. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  111. Command ="{Binding ChemReplenEnableFalseCommand}" IsChecked="{Binding Recipe.ReplenEnable,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,15,40,0"></RadioButton>
  112. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  113. Command ="{Binding ChemReplenEnableTrueCommand}" IsChecked="{Binding Recipe.ReplenEnable,Mode=TwoWay}" Margin="40,15,0,0" ></RadioButton>
  114. </Grid>
  115. </GroupBox>
  116. <GroupBox Header="Current Based" Grid.Column="0" Grid.Row="1" IsEnabled="{Binding Enable}">
  117. <Grid>
  118. <Grid.ColumnDefinitions>
  119. <ColumnDefinition Width="73*"/>
  120. <ColumnDefinition Width="135*"/>
  121. </Grid.ColumnDefinitions>
  122. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  123. Command="{Binding CurrentBasedFalseCommand}" IsChecked="{Binding Recipe.ReplenCurrentBased,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,16,40,2" Grid.Column="1"></RadioButton>
  124. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  125. Command="{Binding CurrentBasedTrueCommand}" IsChecked="{Binding Recipe.ReplenCurrentBased,Mode=TwoWay}" Margin="40,16,0,2" Grid.ColumnSpan="2" ></RadioButton>
  126. </Grid>
  127. </GroupBox>
  128. <UserControls:GroupTextBoxControl Grid.Column="0" Grid.Row="2" Title="Current Based Rate" Unit="mL/Ah" MinValue="0" MaxValue="9000" IntValue="{Binding Recipe.ReplenCurrentBasedRate,Mode=TwoWay}" ValidResult="{Binding PropertyValidResultDic[ReplenCurrentBasedRate],Mode=TwoWay}" Width="220"/>
  129. <GroupBox Header="Time Based" Grid.Column="0" Grid.Row="3" IsEnabled="{Binding Enable}">
  130. <Grid>
  131. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  132. Command="{Binding TimeBasedFalseCommand}" IsChecked="{Binding Recipe.ReplenTimeBased,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,15,40,0"></RadioButton>
  133. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  134. Command="{Binding TimeBasedTrueCommand}" IsChecked="{Binding Recipe.ReplenTimeBased,Mode=TwoWay}" Margin="40,15,0,0" ></RadioButton>
  135. </Grid>
  136. </GroupBox>
  137. <UserControls:GroupTextBoxControl Grid.Column="0" Grid.Row="4" Title="Time Based Rate" Unit="mL/Day" MinValue="0" MaxValue="9000" IntValue="{Binding Recipe.ReplenTimeBasedRate,Mode=TwoWay}" ValidResult="{Binding PropertyValidResultDic[ReplenTimeBasedRate],Mode=TwoWay}" Width="220"/>
  138. <UserControls:GroupTextBoxControl Grid.Column="0" Grid.Row="5" Title="ReplenNoCircFactor" MinValue="0" MaxValue="1" IntValue="{Binding Recipe.ReplenNoCircFactor,Mode=TwoWay}" ValidResult="{Binding PropertyValidResultDic[ReplenNoCircFactor],Mode=TwoWay}" Width="220"/>
  139. </Grid>
  140. </GroupBox>
  141. <GroupBox Header="AutoDose" Grid.Row="0" Grid.Column="1" Margin="135 0 0 10" Padding="10">
  142. <Grid>
  143. <Grid.RowDefinitions>
  144. <RowDefinition Height="75"></RowDefinition>
  145. <RowDefinition Height="75"></RowDefinition>
  146. <RowDefinition Height="75"></RowDefinition>
  147. <RowDefinition Height="75"></RowDefinition>
  148. <RowDefinition Height="75"></RowDefinition>
  149. </Grid.RowDefinitions>
  150. <Grid.ColumnDefinitions>
  151. <ColumnDefinition Width="220"></ColumnDefinition>
  152. </Grid.ColumnDefinitions>
  153. <GroupBox Header="AutoDoseEnable" Grid.Column="0" Grid.Row="0" IsEnabled="{Binding Enable}">
  154. <Grid>
  155. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  156. Command="{Binding AutoCrossDoseFalseCommand}" IsChecked="{Binding Recipe.AutoDoseEnable,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,15,40,0"></RadioButton>
  157. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  158. Command="{Binding AutoCrossDoseTrueCommand}" IsChecked="{Binding Recipe.AutoDoseEnable,Mode=TwoWay}" Margin="40,15,0,0" ></RadioButton>
  159. </Grid>
  160. </GroupBox>
  161. <GroupBox Header="Auto Time Based" Grid.Column="0" Grid.Row="1" IsEnabled="{Binding Enable}">
  162. <Grid>
  163. <Grid.ColumnDefinitions>
  164. <ColumnDefinition Width="73*"/>
  165. <ColumnDefinition Width="135*"/>
  166. </Grid.ColumnDefinitions>
  167. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  168. Command="{Binding AutoTimeBasedFalseCommand}" IsChecked="{Binding Recipe.AutoTimeBased,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,16,40,2" Grid.Column="1"></RadioButton>
  169. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  170. Command="{Binding AutoTimeBasedTrueCommand}" IsChecked="{Binding Recipe.AutoTimeBased,Mode=TwoWay}" Margin="40,16,0,2" Grid.ColumnSpan="2" ></RadioButton>
  171. </Grid>
  172. </GroupBox>
  173. <GroupBox Grid.Row="2" Header="AutoDoseIdleStartTime" IsEnabled="{Binding Enable}">
  174. <Grid>
  175. <Rectangle Fill="Transparent" Stroke="Transparent" StrokeThickness="1" HorizontalAlignment="Left"
  176. VerticalAlignment="Top" Width="435" Height="36" Margin="10,0,0,0"/>
  177. <Control:NumbericTextBox Value="{Binding Recipe.AutoDoseIdleStartTime,Mode=TwoWay}" Height="30" VerticalAlignment="Top" Margin="18,3,30,0" Width="200"/>
  178. <Label Content="hr" HorizontalAlignment="Right" VerticalAlignment="Top" Height="30" Width="30" Margin="0,3,0,0"></Label>
  179. </Grid>
  180. </GroupBox>
  181. <GroupBox Header="Auto Current Based" Grid.Column="0" Grid.Row="3" IsEnabled="{Binding Enable}">
  182. <Grid>
  183. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  184. Command="{Binding AutoCurrentBasedFalseCommand}" IsChecked="{Binding Recipe.AutoCurrentBased,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,15,40,0"></RadioButton>
  185. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  186. Command="{Binding AutoCurrentBasedTrueCommand}" IsChecked="{Binding Recipe.AutoCurrentBased,Mode=TwoWay}" Margin="40,15,0,0" ></RadioButton>
  187. </Grid>
  188. </GroupBox>
  189. <GroupBox Grid.Row="4" Header="AutoDoseFrequency" IsEnabled="{Binding Enable}">
  190. <Grid>
  191. <Rectangle Fill="Transparent" Stroke="Transparent" StrokeThickness="1" HorizontalAlignment="Left"
  192. VerticalAlignment="Top" Width="435" Height="36" Margin="10,0,0,0"/>
  193. <Control:NumbericTextBox Value="{Binding Recipe.AutoDoseFrequency,Mode=TwoWay}" Height="30" VerticalAlignment="Top" Margin="18,3,30,0" Width="200"/>
  194. <Label Content="Ah" HorizontalAlignment="Right" VerticalAlignment="Top" Height="30" Width="30" Margin="0,3,0,0"></Label>
  195. </Grid>
  196. </GroupBox>
  197. <!--<UserControls:GroupDigitalBoxControl Grid.Column="0" Grid.Row="1" Title="AutoDoseIdleStartTime" Unit="hr" MinValue="0" MaxValue="10" DigitalValue="{Binding Recipe.AutoDoseIdleStartTime,Mode=TwoWay}" ValidResult="{Binding PropertyValidResultDic[AutoDoseIdleStartTime],Mode=TwoWay}" Width="220"/>
  198. <UserControls:GroupDigitalBoxControl Grid.Column="0" Grid.Row="2" Title="AutoDoseFrequency" Unit="Ah" MinValue="0" MaxValue="10" DigitalValue="{Binding Recipe.AutoDoseFrequency,Mode=TwoWay}" ValidResult="{Binding PropertyValidResultDic[AutoDoseFrequency],Mode=TwoWay}" Width="220"/>-->
  199. </Grid>
  200. </GroupBox>
  201. </Grid>
  202. </Grid>
  203. </Grid>
  204. </UserControl>