RdsRecipeView.xaml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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. </Grid>
  64. </Grid>
  65. <GroupBox Header="Description" Grid.Row="1" Grid.ColumnSpan="3">
  66. <TextBlock Text="{Binding Recipe.Description}" FontSize="18" VerticalAlignment="Center" TextAlignment="Center">
  67. </TextBlock>
  68. </GroupBox>
  69. <GroupBox Header="Author" Grid.Row="2" Grid.Column="0">
  70. <Label Content="{Binding Recipe.Author}" Height="30" Width="195" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="White" Background="Gray"
  71. HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.Column="1" Margin="6,0,0,0"></Label>
  72. </GroupBox>
  73. <GroupBox Header="CreateDate" Grid.Row="2" Grid.Column="1">
  74. <Label Content="{Binding Recipe.CreateDate}" Height="30" Width="195" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="White" Background="Gray"
  75. HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.Column="1" Margin="6,0,0,0"></Label>
  76. </GroupBox>
  77. <GroupBox Header="SaveDate" Grid.Row="2" Grid.Column="2">
  78. <Label Content="{Binding Recipe.SaveDate}" Height="30" Width="195" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="White" Background="Gray"
  79. HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.Column="1" Margin="6,0,0,0"></Label>
  80. </GroupBox>
  81. </Grid>
  82. <Grid Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2">
  83. <Grid>
  84. <Grid.RowDefinitions>
  85. <RowDefinition Height="Auto"></RowDefinition>
  86. <RowDefinition Height="Auto"></RowDefinition>
  87. <RowDefinition/>
  88. </Grid.RowDefinitions>
  89. <Grid.ColumnDefinitions>
  90. <ColumnDefinition Width="Auto"></ColumnDefinition>
  91. <ColumnDefinition Width="Auto"/>
  92. </Grid.ColumnDefinitions>
  93. <GroupBox Header="Chem Replen" Grid.Row="0" Grid.Column="0" Padding="10" Margin="10 0 10 10" >
  94. <Grid>
  95. <Grid.RowDefinitions>
  96. <RowDefinition Height="75"></RowDefinition>
  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. </Grid.RowDefinitions>
  103. <Grid.ColumnDefinitions>
  104. <ColumnDefinition Width="220"></ColumnDefinition>
  105. <ColumnDefinition Width="10"></ColumnDefinition>
  106. </Grid.ColumnDefinitions>
  107. <GroupBox Header="Enable" Grid.Column="0" Grid.Row="0" IsEnabled="{Binding Enable}">
  108. <Grid>
  109. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  110. Command ="{Binding ChemReplenEnableFalseCommand}" IsChecked="{Binding Recipe.ReplenEnable,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,15,40,0"></RadioButton>
  111. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  112. Command ="{Binding ChemReplenEnableTrueCommand}" IsChecked="{Binding Recipe.ReplenEnable,Mode=TwoWay}" Margin="40,15,0,0" ></RadioButton>
  113. </Grid>
  114. </GroupBox>
  115. <GroupBox Header="Current Based" Grid.Column="0" Grid.Row="1" IsEnabled="{Binding Enable}">
  116. <Grid>
  117. <Grid.ColumnDefinitions>
  118. <ColumnDefinition Width="73*"/>
  119. <ColumnDefinition Width="135*"/>
  120. </Grid.ColumnDefinitions>
  121. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  122. Command="{Binding CurrentBasedFalseCommand}" IsChecked="{Binding Recipe.ReplenCurrentBased,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,16,40,2" Grid.Column="1"></RadioButton>
  123. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  124. Command="{Binding CurrentBasedTrueCommand}" IsChecked="{Binding Recipe.ReplenCurrentBased,Mode=TwoWay}" Margin="40,16,0,2" Grid.ColumnSpan="2" ></RadioButton>
  125. </Grid>
  126. </GroupBox>
  127. <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"/>
  128. <GroupBox Header="Time Based" Grid.Column="0" Grid.Row="3" IsEnabled="{Binding Enable}">
  129. <Grid>
  130. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  131. Command="{Binding TimeBasedFalseCommand}" IsChecked="{Binding Recipe.ReplenTimeBased,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,15,40,0"></RadioButton>
  132. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  133. Command="{Binding TimeBasedTrueCommand}" IsChecked="{Binding Recipe.ReplenTimeBased,Mode=TwoWay}" Margin="40,15,0,0" ></RadioButton>
  134. </Grid>
  135. </GroupBox>
  136. <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"/>
  137. <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"/>
  138. </Grid>
  139. </GroupBox>
  140. <GroupBox Header="AutoDose" Grid.Row="0" Grid.Column="1" Margin="135 0 0 10" Padding="10">
  141. <Grid>
  142. <Grid.RowDefinitions>
  143. <RowDefinition Height="75"></RowDefinition>
  144. <RowDefinition Height="75"></RowDefinition>
  145. <RowDefinition Height="75"></RowDefinition>
  146. <RowDefinition Height="75"></RowDefinition>
  147. <RowDefinition Height="75"></RowDefinition>
  148. </Grid.RowDefinitions>
  149. <Grid.ColumnDefinitions>
  150. <ColumnDefinition Width="220"></ColumnDefinition>
  151. </Grid.ColumnDefinitions>
  152. <GroupBox Header="AutoDoseEnable" Grid.Column="0" Grid.Row="0" IsEnabled="{Binding Enable}">
  153. <Grid>
  154. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  155. Command="{Binding AutoCrossDoseFalseCommand}" IsChecked="{Binding Recipe.AutoDoseEnable,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,15,40,0"></RadioButton>
  156. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  157. Command="{Binding AutoCrossDoseTrueCommand}" IsChecked="{Binding Recipe.AutoDoseEnable,Mode=TwoWay}" Margin="40,15,0,0" ></RadioButton>
  158. </Grid>
  159. </GroupBox>
  160. <GroupBox Header="Auto Time Based" Grid.Column="0" Grid.Row="1" IsEnabled="{Binding Enable}">
  161. <Grid>
  162. <Grid.ColumnDefinitions>
  163. <ColumnDefinition Width="73*"/>
  164. <ColumnDefinition Width="135*"/>
  165. </Grid.ColumnDefinitions>
  166. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  167. Command="{Binding AutoTimeBasedFalseCommand}" IsChecked="{Binding Recipe.AutoTimeBased,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,16,40,2" Grid.Column="1"></RadioButton>
  168. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  169. Command="{Binding AutoTimeBasedTrueCommand}" IsChecked="{Binding Recipe.AutoTimeBased,Mode=TwoWay}" Margin="40,16,0,2" Grid.ColumnSpan="2" ></RadioButton>
  170. </Grid>
  171. </GroupBox>
  172. <GroupBox Grid.Row="2" Header="AutoDoseIdleStartTime" IsEnabled="{Binding Enable}">
  173. <Grid>
  174. <Rectangle Fill="Transparent" Stroke="Transparent" StrokeThickness="1" HorizontalAlignment="Left"
  175. VerticalAlignment="Top" Width="435" Height="36" Margin="10,0,0,0"/>
  176. <Control:NumbericTextBox Value="{Binding Recipe.AutoDoseIdleStartTime,Mode=TwoWay}" Height="30" VerticalAlignment="Top" Margin="18,3,30,0" Width="200"/>
  177. <Label Content="hr" HorizontalAlignment="Right" VerticalAlignment="Top" Height="30" Width="30" Margin="0,3,0,0"></Label>
  178. </Grid>
  179. </GroupBox>
  180. <GroupBox Header="Auto Current Based" Grid.Column="0" Grid.Row="3" IsEnabled="{Binding Enable}">
  181. <Grid>
  182. <RadioButton Content="False" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Right"
  183. Command="{Binding AutoCurrentBasedFalseCommand}" IsChecked="{Binding Recipe.AutoCurrentBased,Converter={StaticResource boolReverseConverter},Mode=TwoWay}" Margin="0,15,40,0"></RadioButton>
  184. <RadioButton Content="True" Height="35" Width="60" VerticalContentAlignment="Center" HorizontalAlignment="Left"
  185. Command="{Binding AutoCurrentBasedTrueCommand}" IsChecked="{Binding Recipe.AutoCurrentBased,Mode=TwoWay}" Margin="40,15,0,0" ></RadioButton>
  186. </Grid>
  187. </GroupBox>
  188. <GroupBox Grid.Row="4" Header="AutoDoseFrequency" IsEnabled="{Binding Enable}">
  189. <Grid>
  190. <Rectangle Fill="Transparent" Stroke="Transparent" StrokeThickness="1" HorizontalAlignment="Left"
  191. VerticalAlignment="Top" Width="435" Height="36" Margin="10,0,0,0"/>
  192. <Control:NumbericTextBox Value="{Binding Recipe.AutoDoseFrequency,Mode=TwoWay}" Height="30" VerticalAlignment="Top" Margin="18,3,30,0" Width="200"/>
  193. <Label Content="Ah" HorizontalAlignment="Right" VerticalAlignment="Top" Height="30" Width="30" Margin="0,3,0,0"></Label>
  194. </Grid>
  195. </GroupBox>
  196. <!--<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"/>
  197. <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"/>-->
  198. </Grid>
  199. </GroupBox>
  200. </Grid>
  201. </Grid>
  202. </Grid>
  203. </UserControl>