终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 11 mēnešiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 11 mēnešiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 11 mēnešiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <Window
  2. x:Class="BPASmartClient.DosingSystem.View.NewRecipeView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
  9. xmlns:i ="http://schemas.microsoft.com/expression/2010/interactivity"
  10. Title="NewRecipeView"
  11. Width="550"
  12. Height="600"
  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. <Window.Resources>
  23. <ResourceDictionary>
  24. <ResourceDictionary.MergedDictionaries>
  25. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  26. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  27. <ResourceDictionary>
  28. <!--#region ListBox样式-->
  29. <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  30. <Setter Property="OverridesDefaultStyle" Value="True" />
  31. <Setter Property="SnapsToDevicePixels" Value="True" />
  32. <Setter Property="BorderBrush" Value="{x:Null}" />
  33. <Setter Property="Foreground" Value="White" />
  34. <Setter Property="FontSize" Value="20" />
  35. <Setter Property="HorizontalContentAlignment" Value="Center" />
  36. <Setter Property="VerticalContentAlignment" Value="Center" />
  37. <Setter Property="Template">
  38. <Setter.Value>
  39. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  40. <Border x:Name="border" CornerRadius="8">
  41. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  42. </Border>
  43. </ControlTemplate>
  44. </Setter.Value>
  45. </Setter>
  46. </Style>
  47. <!--#endregion-->
  48. </ResourceDictionary>
  49. </ResourceDictionary.MergedDictionaries>
  50. </ResourceDictionary>
  51. </Window.Resources>
  52. <Border
  53. Name="br"
  54. BorderBrush="#0CADF5"
  55. BorderThickness="2">
  56. <Border.Background>
  57. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  58. <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹窗2.png" />-->
  59. </Border.Background>
  60. <Grid>
  61. <!--<Grid.Background>
  62. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹窗.png" />
  63. </Grid.Background>-->
  64. <Grid.RowDefinitions>
  65. <RowDefinition Height="5" />
  66. <RowDefinition />
  67. </Grid.RowDefinitions>
  68. <!--<Button
  69. Name="btClose"
  70. Margin="0,0,5,0"
  71. Padding="10,5"
  72. HorizontalAlignment="Right"
  73. VerticalAlignment="Center"
  74. Background="Transparent"
  75. BorderThickness="0"
  76. Content="X"
  77. FontSize="18"
  78. Foreground="White" />
  79. <Border BorderBrush="#88DDDDDD" BorderThickness="0,0,0,1" />-->
  80. <Grid Grid.Row="1">
  81. <Grid.RowDefinitions>
  82. <RowDefinition Height="40" />
  83. <RowDefinition Height="40" />
  84. <RowDefinition Height="30" />
  85. <RowDefinition />
  86. </Grid.RowDefinitions>
  87. <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
  88. <TextBlock
  89. Margin="10,0,0,0"
  90. Background="Transparent"
  91. FontSize="20"
  92. Foreground="#FF2AB2E7"
  93. Text="请输入配方名称:"
  94. />
  95. <TextBlock
  96. Margin="100,0,0,0"
  97. Background="Transparent"
  98. Text="配方总量:"
  99. Foreground="#FF2AB2E7"
  100. />
  101. <TextBox
  102. Width="160"
  103. Height="30"
  104. Margin="0,0,7,0"
  105. FontSize="16"
  106. IsReadOnly="True"
  107. Text="{Binding All_RawMt_weight}"
  108. />
  109. </StackPanel>
  110. <TextBlock
  111. Margin="0,0,10,0"
  112. HorizontalAlignment="Right"
  113. Background="Transparent"
  114. FontSize="16"
  115. Foreground="Red"
  116. Text="{Binding ErrorInfo}" />
  117. <StackPanel
  118. Grid.Row="1"
  119. Margin="10,0,0,0"
  120. Orientation="Horizontal">
  121. <TextBox
  122. Grid.Column="1"
  123. Width="200"
  124. Height="30"
  125. Margin="0,0,7,0"
  126. FontSize="16"
  127. Text="{Binding RecipeName}" />
  128. <Button
  129. Width="148"
  130. Height="30"
  131. Margin="0,0,7,0"
  132. Command="{Binding AddCommand}"
  133. Content="添加原料"
  134. Cursor="Hand" />
  135. <Button
  136. Width="80"
  137. Height="30"
  138. Command="{Binding SaveCommand}"
  139. Content="确认" />
  140. <Button
  141. Name="btClose"
  142. Width="80"
  143. Height="30"
  144. Margin="7,0,0,0"
  145. Content="取消" />
  146. </StackPanel>
  147. <!--#region 表格标题栏设置-->
  148. <Grid
  149. Grid.Row="2"
  150. Margin="5,0"
  151. Background="#ff0C255F">
  152. <Grid.ColumnDefinitions>
  153. <ColumnDefinition />
  154. <ColumnDefinition Width="0.7*" />
  155. <ColumnDefinition Width="0.7*" />
  156. <ColumnDefinition Width="0.7*" />
  157. </Grid.ColumnDefinitions>
  158. <TextBlock
  159. Grid.Column="0"
  160. Style="{StaticResource TitleTextblockStyle}"
  161. Text="原料名称" />
  162. <Grid Grid.Column="1">
  163. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="桶号" />
  164. <Border
  165. BorderBrush="{StaticResource bordColor}"
  166. BorderThickness="1,0,1,0"
  167. Cursor="SizeWE" />
  168. </Grid>
  169. <TextBlock
  170. Grid.Column="2"
  171. Style="{StaticResource TitleTextblockStyle}"
  172. Text="重量" />
  173. <Grid Grid.Column="3">
  174. <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="删除" />
  175. <Border
  176. BorderBrush="{StaticResource bordColor}"
  177. BorderThickness="1,0,1,0"
  178. Cursor="SizeWE" />
  179. </Grid>
  180. <Border
  181. Grid.ColumnSpan="10"
  182. BorderBrush="{StaticResource bordColor}"
  183. BorderThickness="1,0,1,0" />
  184. </Grid>
  185. <!--#endregion-->
  186. <ScrollViewer
  187. Grid.Row="3"
  188. Margin="5,0"
  189. HorizontalScrollBarVisibility="Hidden"
  190. VerticalScrollBarVisibility="Hidden">
  191. <ItemsControl ItemsSource="{Binding RawMaterials}">
  192. <ItemsControl.ItemTemplate>
  193. <DataTemplate>
  194. <RadioButton GroupName="all">
  195. <RadioButton.Template>
  196. <ControlTemplate TargetType="RadioButton">
  197. <Grid Name="gr" Height="35">
  198. <Grid.ColumnDefinitions>
  199. <ColumnDefinition />
  200. <ColumnDefinition Width="0.7*" />
  201. <ColumnDefinition Width="0.7*" />
  202. <ColumnDefinition Width="0.7*" />
  203. </Grid.ColumnDefinitions>
  204. <ComboBox
  205. Name="cb"
  206. Grid.Column="0"
  207. Height="{Binding ElementName=gr, Path=ActualHeight}"
  208. VerticalAlignment="Center"
  209. BorderBrush="#FF074B92"
  210. BorderThickness="1"
  211. FontFamily="楷体"
  212. FontSize="20"
  213. Foreground="#FF2AB2E7"
  214. IsEditable="False"
  215. ItemsSource="{Binding DataContext.RawMaterialNames, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  216. SelectedIndex="{Binding SelectIndex}"
  217. SelectionChanged="cb_SelectionChanged"
  218. Style="{StaticResource ComboBoxStyle}"
  219. Text="{Binding RawMaterialName}" />
  220. <TextBox
  221. Grid.Column="1"
  222. Height="{Binding ElementName=gr, Path=ActualHeight}"
  223. VerticalAlignment="Center"
  224. FontSize="20"
  225. Foreground="#FF2AB2E7"
  226. Text="{Binding Loc}" />
  227. <TextBox
  228. Name="tb"
  229. Grid.Column="2"
  230. Height="{Binding ElementName=gr, Path=ActualHeight}"
  231. VerticalAlignment="Center"
  232. FontSize="20"
  233. Foreground="#FF2AB2E7"
  234. Text="{Binding RawMaterialWeight}">
  235. <i:Interaction.Triggers>
  236. <i:EventTrigger EventName="TextChanged">
  237. <i:InvokeCommandAction Command="{Binding DataContext.TextChanged, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"/>
  238. </i:EventTrigger>
  239. <i:EventTrigger EventName="LostFocus">
  240. <i:InvokeCommandAction Command="{Binding DataContext.TextChanged, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"/>
  241. </i:EventTrigger>
  242. </i:Interaction.Triggers>
  243. </TextBox>
  244. <TextBlock
  245. Grid.Column="2"
  246. Margin="0,0,8,4"
  247. HorizontalAlignment="Right"
  248. VerticalAlignment="Center"
  249. FontSize="20"
  250. Foreground="#FF2AB2E7"
  251. Text="g" />
  252. <Button
  253. Grid.Column="3"
  254. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  255. CommandParameter="{Binding RawMaterialId}"
  256. Content="删除"
  257. FontSize="16"
  258. Style="{StaticResource ControlButtonStyle}" />
  259. </Grid>
  260. </ControlTemplate>
  261. </RadioButton.Template>
  262. </RadioButton>
  263. </DataTemplate>
  264. </ItemsControl.ItemTemplate>
  265. </ItemsControl>
  266. </ScrollViewer>
  267. </Grid>
  268. </Grid>
  269. </Border>
  270. </Window>