终端一体化运控平台
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

2 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <Window
  2. x:Class="BPASmartClient.DosingSystemSingle.View.NewOutletView"
  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.CustomResource.Converters;assembly=BPASmartClient.CustomResource"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:BPASmartClient.DosingSystemSingle.View"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:vm="clr-namespace:BPASmartClient.DosingSystemSingle.ViewModel"
  10. Title="NewOutletView"
  11. Width="600"
  12. Height="400"
  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:NewOutletViewModel />
  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. <StackPanel Orientation="Horizontal">
  43. <TextBlock
  44. Margin="15,0,0,0"
  45. HorizontalAlignment="Left"
  46. FontSize="16"
  47. Style="{StaticResource TextBlockStyle}"
  48. Text="出料口名称:" />
  49. <TextBox
  50. Name="outName"
  51. Width="180"
  52. Height="35"
  53. FontSize="20"
  54. Style="{StaticResource TextBoxStyle}"
  55. Text="{Binding OutletName}" />
  56. <TextBlock
  57. Margin="15,0,0,0"
  58. HorizontalAlignment="Left"
  59. FontSize="16"
  60. Style="{StaticResource TextBlockStyle}"
  61. Text="出料口位置:" />
  62. <TextBox
  63. Name="outLoc"
  64. Width="180"
  65. Height="35"
  66. Margin="5,0,0,0"
  67. FontSize="20"
  68. Style="{StaticResource TextBoxStyle}"
  69. Text="{Binding OutletLoc}" />
  70. </StackPanel>
  71. <StackPanel
  72. Grid.Row="1"
  73. Margin="10,0,0,0"
  74. HorizontalAlignment="Right"
  75. Orientation="Horizontal">
  76. <!--<TextBox
  77. Name="outName"
  78. Width="180"
  79. Height="35"
  80. Margin="5,0,0,0"
  81. FontSize="20"
  82. Style="{StaticResource TextBoxStyle}" />-->
  83. <TextBlock
  84. Margin="0,0,5,0"
  85. HorizontalAlignment="Center"
  86. VerticalAlignment="Center"
  87. FontSize="20"
  88. Foreground="#FFF53F62"
  89. Text="{Binding ErrorInfo}" />
  90. <Button
  91. Width="90"
  92. Height="30"
  93. Margin="5,0,5,0"
  94. Command="{Binding AddCommand}"
  95. Content="添加原料"
  96. FontSize="20"
  97. Style="{StaticResource ImageButtonStyle}" />
  98. <Button
  99. Width="90"
  100. Height="30"
  101. Margin="5,0,5,0"
  102. Command="{Binding CancelCommand}"
  103. Content="取消"
  104. FontSize="20"
  105. Style="{StaticResource ImageButtonStyle}" />
  106. <Button
  107. Grid.Column="1"
  108. Width="90"
  109. Height="30"
  110. Margin="5,0,5,0"
  111. Command="{Binding SaveCommand}"
  112. Content="保存"
  113. FontSize="20"
  114. Style="{StaticResource ImageButtonStyle}" />
  115. </StackPanel>
  116. <Grid Grid.Row="2" Margin="15,0,10,10">
  117. <Grid.RowDefinitions>
  118. <RowDefinition Height="35" />
  119. <RowDefinition />
  120. </Grid.RowDefinitions>
  121. <!--#region 表格标题栏设置-->
  122. <Grid Margin="0,10,0,0" Background="#ff0C255F">
  123. <Grid.ColumnDefinitions>
  124. <ColumnDefinition />
  125. <ColumnDefinition Width="0.68*" />
  126. </Grid.ColumnDefinitions>
  127. <TextBlock
  128. Grid.Column="0"
  129. Style="{StaticResource TitleTextblockStyle}"
  130. Text="原料" />
  131. <Grid Grid.Column="1">
  132. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="功能操作" />
  133. <Border
  134. BorderBrush="{StaticResource bordColor}"
  135. BorderThickness="1,0,1,0"
  136. Cursor="SizeWE" />
  137. </Grid>
  138. <Border
  139. Grid.ColumnSpan="2"
  140. BorderBrush="{StaticResource bordColor}"
  141. BorderThickness="1,0,1,0" />
  142. </Grid>
  143. <!--#endregion-->
  144. <ScrollViewer
  145. Grid.Row="1"
  146. HorizontalScrollBarVisibility="Hidden"
  147. VerticalScrollBarVisibility="Hidden">
  148. <ItemsControl ItemsSource="{Binding SiloInfos}">
  149. <ItemsControl.ItemTemplate>
  150. <DataTemplate>
  151. <!--<RadioButton Content="{Binding RawMaterialName}" Name="rb" GroupName="all">
  152. <RadioButton.Template>
  153. <ControlTemplate TargetType="RadioButton">-->
  154. <Grid Name="gr" Height="30">
  155. <Grid.ColumnDefinitions>
  156. <ColumnDefinition />
  157. <ColumnDefinition Width="0.68*" />
  158. </Grid.ColumnDefinitions>
  159. <ComboBox
  160. Name="cb"
  161. Grid.Column="0"
  162. Height="{Binding ElementName=gr, Path=ActualHeight}"
  163. VerticalAlignment="Center"
  164. HorizontalContentAlignment="Left"
  165. BorderBrush="#FF074B92"
  166. BorderThickness="1"
  167. FontFamily="楷体"
  168. FontSize="20"
  169. Foreground="#FF2AB2E7"
  170. IsEditable="False"
  171. ItemsSource="{Binding DataContext.SileName, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  172. SelectedIndex="{Binding SelectIndex}"
  173. Style="{StaticResource ComboBoxStyle}"
  174. Text="{Binding RawMaterialName}" />
  175. <Button
  176. Grid.Column="1"
  177. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  178. CommandParameter="{Binding RawMaterialName}"
  179. Content="删除"
  180. FontSize="16"
  181. Style="{StaticResource ControlButtonStyle}" />
  182. <!--<Button
  183. Grid.Column="1"
  184. Width="80"
  185. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  186. CommandParameter="{Binding RawMaterialName}"
  187. Content="删除" />-->
  188. </Grid>
  189. <!--</ControlTemplate>
  190. </RadioButton.Template>
  191. </RadioButton>-->
  192. </DataTemplate>
  193. </ItemsControl.ItemTemplate>
  194. </ItemsControl>
  195. </ScrollViewer>
  196. </Grid>
  197. </Grid>
  198. </Grid>
  199. </Window>