终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NewRecipeView.xaml 9.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <Window
  2. x:Class="BPASmartClient.SmallBatchingSystem.Views.NewRecipeView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:con="clr-namespace:BPASmartClient.SmallBatchingSystem.Converter"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:BPASmartClient.SmallBatchingSystem.Views"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:vm="clr-namespace:BPASmartClient.SmallBatchingSystem.ViewModels"
  10. Title="NewPfView"
  11. Width="500"
  12. Height="300"
  13. AllowsTransparency="True"
  14. Background="{x:Null}"
  15. Topmost="True"
  16. WindowStartupLocation="CenterScreen"
  17. WindowStyle="None"
  18. mc:Ignorable="d">
  19. <Window.DataContext>
  20. <vm:NewRecipeViewModel />
  21. </Window.DataContext>
  22. <Grid>
  23. <Grid.Background>
  24. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/容器边框.png" />
  25. </Grid.Background>
  26. <Grid.RowDefinitions>
  27. <RowDefinition Height="0.18*" />
  28. <RowDefinition />
  29. </Grid.RowDefinitions>
  30. <TextBlock
  31. HorizontalAlignment="Center"
  32. VerticalAlignment="Center"
  33. FontSize="20"
  34. Foreground="{StaticResource FontColor}"
  35. Text="新建配方" />
  36. <Grid Grid.Row="1">
  37. <Grid.RowDefinitions>
  38. <RowDefinition Height="0.2*" />
  39. <RowDefinition Height="0.2*" />
  40. <RowDefinition />
  41. </Grid.RowDefinitions>
  42. <TextBlock
  43. Margin="15,0,0,0"
  44. HorizontalAlignment="Left"
  45. Style="{StaticResource TextBlockStyle}"
  46. Text="配方名称:" />
  47. <TextBlock
  48. Margin="0,0,10,0"
  49. HorizontalAlignment="Right"
  50. VerticalAlignment="Center"
  51. FontSize="20"
  52. Foreground="#FFF53F62"
  53. Text="{Binding ErrorInfo}" />
  54. <StackPanel
  55. Grid.Row="1"
  56. Margin="10,0,0,0"
  57. Orientation="Horizontal">
  58. <TextBox
  59. Name="outName"
  60. Width="180"
  61. Height="35"
  62. Margin="5,0,0,0"
  63. FontSize="20"
  64. Style="{StaticResource TextBoxStyle}"
  65. Text="{Binding RecipeName}" />
  66. <Button
  67. Width="90"
  68. Height="30"
  69. Margin="5,0,5,0"
  70. Command="{Binding AddCommand}"
  71. Content="添加原料"
  72. FontSize="20"
  73. Style="{StaticResource ImageButtonStyle}" />
  74. <Button
  75. Width="90"
  76. Height="30"
  77. Margin="5,0,5,0"
  78. Command="{Binding CancelCommand}"
  79. Content="取消"
  80. FontSize="20"
  81. Style="{StaticResource ImageButtonStyle}" />
  82. <Button
  83. Grid.Column="1"
  84. Width="90"
  85. Height="30"
  86. Margin="5,0,5,0"
  87. Command="{Binding SaveCommand}"
  88. Content="保存"
  89. FontSize="20"
  90. Style="{StaticResource ImageButtonStyle}" />
  91. </StackPanel>
  92. <Grid Grid.Row="2" Margin="15,0,10,10">
  93. <Grid.RowDefinitions>
  94. <RowDefinition Height="35" />
  95. <RowDefinition />
  96. </Grid.RowDefinitions>
  97. <!--#region 表格标题栏设置-->
  98. <Grid Margin="0,10,0,0" Background="#ff0C255F">
  99. <Grid.ColumnDefinitions>
  100. <ColumnDefinition />
  101. <ColumnDefinition />
  102. <ColumnDefinition Width="0.68*" />
  103. </Grid.ColumnDefinitions>
  104. <TextBlock
  105. Grid.Column="0"
  106. Style="{StaticResource TitleTextblockStyle}"
  107. Text="选择料仓" />
  108. <Grid Grid.Column="1">
  109. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="重量( g )" />
  110. <Border
  111. BorderBrush="{StaticResource bordColor}"
  112. BorderThickness="1,0,1,0"
  113. Cursor="SizeWE" />
  114. </Grid>
  115. <TextBlock
  116. Grid.Column="2"
  117. Style="{StaticResource TitleTextblockStyle}"
  118. Text="功能操作" />
  119. <Border
  120. Grid.ColumnSpan="2"
  121. BorderBrush="{StaticResource bordColor}"
  122. BorderThickness="1,0,1,0" />
  123. </Grid>
  124. <!--#endregion-->
  125. <ScrollViewer
  126. Grid.Row="1"
  127. HorizontalScrollBarVisibility="Hidden"
  128. VerticalScrollBarVisibility="Hidden">
  129. <ItemsControl ItemsSource="{Binding SiloInfos}">
  130. <ItemsControl.ItemTemplate>
  131. <DataTemplate>
  132. <RadioButton GroupName="all">
  133. <RadioButton.Template>
  134. <ControlTemplate TargetType="RadioButton">
  135. <Grid Name="gr" Height="30">
  136. <Grid.ColumnDefinitions>
  137. <ColumnDefinition />
  138. <ColumnDefinition />
  139. <ColumnDefinition Width="0.68*" />
  140. </Grid.ColumnDefinitions>
  141. <ComboBox
  142. Name="cb"
  143. Grid.Column="0"
  144. Height="{Binding ElementName=gr, Path=ActualHeight}"
  145. VerticalAlignment="Center"
  146. BorderBrush="#FF074B92"
  147. BorderThickness="1"
  148. FontFamily="楷体"
  149. FontSize="20"
  150. Foreground="#FF2AB2E7"
  151. IsEditable="False"
  152. ItemsSource="{Binding DataContext.SileName, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  153. SelectedIndex="{Binding SelectIndex}"
  154. Style="{StaticResource ComboBoxStyle}"
  155. Text="{Binding SiloName}" />
  156. <Grid Grid.Column="1">
  157. <TextBox
  158. Height="{Binding ElementName=gr, Path=ActualHeight}"
  159. FontSize="20"
  160. Style="{StaticResource InputTextboxStyle}"
  161. Text="{Binding SiloWeight}" />
  162. <Border
  163. BorderBrush="#FF074B92"
  164. BorderThickness="1,0,1,1"
  165. Cursor="SizeWE" />
  166. </Grid>
  167. <Button
  168. Grid.Column="2"
  169. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  170. CommandParameter="{Binding SiloName}"
  171. Content="删除"
  172. FontSize="16"
  173. Style="{StaticResource ControlButtonStyle}" />
  174. <!--<Button
  175. Grid.Column="2"
  176. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  177. CommandParameter="{Binding SiloName}"
  178. Content="删除" />-->
  179. </Grid>
  180. </ControlTemplate>
  181. </RadioButton.Template>
  182. </RadioButton>
  183. </DataTemplate>
  184. </ItemsControl.ItemTemplate>
  185. </ItemsControl>
  186. </ScrollViewer>
  187. </Grid>
  188. </Grid>
  189. </Grid>
  190. </Window>