终端一体化运控平台
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.

RecipeControlView.xaml 31 KiB

2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. <UserControl
  2. x:Class="BPASmartClient.DosingSystem.View.RecipeControlView"
  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.DosingSystem.Converter"
  6. xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  11. xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
  12. d:DesignHeight="450"
  13. d:DesignWidth="800"
  14. mc:Ignorable="d">
  15. <UserControl.DataContext>
  16. <vm:RecipeControlViewModel x:Name="bingSource" />
  17. </UserControl.DataContext>
  18. <UserControl.Resources>
  19. <con:RunStatusConvert x:Key="RunStatusConvert" />
  20. <con:EnbleConvert x:Key="EnbleConvert"/>
  21. <con:IntToSourceConvert x:Key="IntToSourceConvert"/>
  22. <Style x:Key="UserItemContainerStyle" TargetType="ListBoxItem">
  23. <Style.Resources>
  24. <!-- SelectedItem with focus -->
  25. <SolidColorBrush
  26. x:Key="{x:Static SystemColors.HighlightBrushKey}"
  27. Opacity=".4"
  28. Color="White" />
  29. <!-- SelectedItem without focus -->
  30. <SolidColorBrush
  31. x:Key="{x:Static SystemColors.ControlBrushKey}"
  32. Opacity=".4"
  33. Color="White" />
  34. </Style.Resources>
  35. <!-- 设置触发器 -->
  36. <Style.Triggers>
  37. <Trigger Property="IsMouseOver" Value="true">
  38. <Setter Property="Background" Value="White" />
  39. <Setter Property="Foreground" Value="White" />
  40. </Trigger>
  41. <Trigger Property="IsFocused" Value="true">
  42. <Setter Property="Background" Value="White" />
  43. <Setter Property="Foreground" Value="White" />
  44. </Trigger>
  45. </Style.Triggers>
  46. </Style>
  47. <Style x:Key="RadioState" TargetType="RadioButton">
  48. <Setter Property="Margin" Value="1"/>
  49. <Setter Property="Background" Value="#002060" />
  50. <Setter Property="Foreground" Value="White" />
  51. <Setter Property="VerticalContentAlignment" Value="Bottom"/>
  52. <Setter Property="Margin" Value="2,5"/>
  53. <Setter Property="FontSize" Value="16" />
  54. <Setter Property="FontFamily" Value="Consolas" />
  55. <Setter Property="Template">
  56. <Setter.Value>
  57. <ControlTemplate TargetType="RadioButton">
  58. <Border CornerRadius="5" Background="{TemplateBinding Background}" Name="radiobutton" >
  59. <Grid>
  60. <Border x:Name="back_border" BorderThickness="0" BorderBrush="Black" CornerRadius="1">
  61. <Border.Effect>
  62. <BlurEffect Radius="2" KernelType="Gaussian"/>
  63. </Border.Effect>
  64. </Border>
  65. <Border x:Name="fore_border" BorderThickness="0" BorderBrush="White" Margin="2" Opacity="0.7" CornerRadius="{Binding ElementName=button, Path=CornerRadius}">
  66. <Border.Effect>
  67. <BlurEffect Radius="2" KernelType="Gaussian"/>
  68. </Border.Effect>
  69. </Border>
  70. <ContentPresenter TextBlock.FontSize="{TemplateBinding FontSize}" TextBlock.FontFamily="{TemplateBinding FontFamily}" TextBlock.Foreground="{TemplateBinding Foreground}" VerticalAlignment="Center" HorizontalAlignment="Center" Content="{TemplateBinding Content}"></ContentPresenter>
  71. </Grid>
  72. </Border>
  73. <ControlTemplate.Triggers>
  74. <Trigger Property="IsChecked" Value="True">
  75. <Setter TargetName="back_border" Property="BorderThickness" Value="1,0,1,1"/>
  76. <Setter TargetName="back_border" Property="CornerRadius" Value="5"/>
  77. <Setter TargetName="fore_border" Property="BorderThickness" Value="0,2,0,0"/>
  78. <Setter Property="Background" Value=" #4169E1"/>
  79. </Trigger>
  80. <Trigger Property="IsMouseOver" Value="True">
  81. <Setter Property="BorderBrush" TargetName="back_border" Value="white"/>
  82. <Setter TargetName="back_border" Property="BorderThickness" Value="1,1,1,1"/>
  83. </Trigger>
  84. </ControlTemplate.Triggers>
  85. </ControlTemplate>
  86. </Setter.Value>
  87. </Setter>
  88. </Style>
  89. <Style TargetType="Button" x:Key="materialMakingButton">
  90. <Setter Property="Background" Value="Transparent"/>
  91. <Setter Property="FontSize" Value="16"/>
  92. <Setter Property="Foreground" Value="#CD5555"/>
  93. <Setter Property="BorderThickness" Value="0"/>
  94. <Setter Property="HorizontalAlignment" Value="Left"/>
  95. <Setter Property="Template">
  96. <Setter.Value>
  97. <ControlTemplate>
  98. <Border x:Name="brState" BorderBrush="White" BorderThickness="0" Padding="2">
  99. <TextBlock x:Name="txState" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="1"
  100. Text="{Binding RecipeStatus, Converter={StaticResource RunStatusConvert} }" />
  101. </Border>
  102. <ControlTemplate.Triggers>
  103. <Trigger Property="IsEnabled" Value="True">
  104. <Setter TargetName="brState" Property="BorderThickness" Value="0" />
  105. <Setter TargetName="brState" Property="CornerRadius" Value="5" />
  106. <Setter TargetName="brState" Property="Background" Value="#F0FFFF"/>
  107. <Setter TargetName="txState" Property="Foreground" Value="#CD5555"/>
  108. </Trigger>
  109. <DataTrigger Binding="{Binding RecipeStatus}" Value="3">
  110. <Setter TargetName="brState" Property="Background" Value="#F0FFFF"/>
  111. <Setter TargetName="txState" Property="Foreground" Value="#3CB371"/>
  112. </DataTrigger>
  113. <DataTrigger Binding="{Binding RecipeStatus}" Value="2">
  114. <Setter TargetName="txState" Property="Foreground" Value="Aqua"/>
  115. </DataTrigger>
  116. <MultiTrigger>
  117. <MultiTrigger.Conditions>
  118. <Condition Property="IsMouseOver" Value="True"/>
  119. <Condition Property="IsEnabled" Value="True"/>
  120. </MultiTrigger.Conditions>
  121. <Setter Property="FontSize" TargetName="txState" Value="17 "/>
  122. </MultiTrigger>
  123. </ControlTemplate.Triggers>
  124. </ControlTemplate>
  125. </Setter.Value>
  126. </Setter>
  127. <Style.Triggers>
  128. </Style.Triggers>
  129. </Style>
  130. <DataTemplate x:Key="TreeItemTemplate" DataType="TreeViewItem">
  131. <Grid Margin="50,0,0,0" Height="28">
  132. <Grid.ColumnDefinitions>
  133. <ColumnDefinition Width="*"></ColumnDefinition>
  134. <ColumnDefinition Width="*"></ColumnDefinition>
  135. </Grid.ColumnDefinitions>
  136. <TextBlock Text="原料:" Foreground="Aqua" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0"/>
  137. <TextBlock Grid.Column="1" Text="{Binding RawMaterialName}" Foreground="Aqua" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0"/>
  138. </Grid>
  139. </DataTemplate>
  140. <Style TargetType="TreeViewItem" x:Key="recipeTreeItem">
  141. <Setter Property="Background" Value="Transparent" />
  142. <Setter Property="IsExpanded" Value="True"></Setter>
  143. <Setter Property="HeaderTemplate">
  144. <Setter.Value>
  145. <HierarchicalDataTemplate ItemsSource="{Binding RawMaterials,Mode=TwoWay}" ItemTemplate="{StaticResource TreeItemTemplate}">
  146. <StackPanel Orientation="Horizontal" Height="28" VerticalAlignment="Center" HorizontalAlignment="Left">
  147. <TextBlock Text="配方:" Margin="5,0,0,0" FontSize="15" VerticalAlignment="Center" Foreground="White"/>
  148. <TextBlock Text="{Binding RecipeName}" Margin="5,0,0,0" FontSize="15" VerticalAlignment="Center" Foreground="White"/>
  149. </StackPanel>
  150. </HierarchicalDataTemplate>
  151. </Setter.Value>
  152. </Setter>
  153. <Setter Property="Template">
  154. <Setter.Value>
  155. <ControlTemplate TargetType="{x:Type TreeViewItem}">
  156. <Grid>
  157. <Grid.ColumnDefinitions>
  158. <ColumnDefinition Width="Auto" />
  159. <ColumnDefinition Width="*" />
  160. </Grid.ColumnDefinitions>
  161. <Grid.RowDefinitions>
  162. <RowDefinition Height="Auto" />
  163. <RowDefinition />
  164. </Grid.RowDefinitions>
  165. <VisualStateManager.VisualStateGroups>
  166. <VisualStateGroup x:Name="SelectionStates">
  167. <VisualState x:Name="Selected">
  168. <Storyboard>
  169. <ColorAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" >
  170. <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
  171. </ColorAnimationUsingKeyFrames>
  172. </Storyboard>
  173. </VisualState>
  174. <VisualState x:Name="Unselected" />
  175. <VisualState x:Name="SelectedInactive">
  176. <Storyboard>
  177. <ColorAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
  178. <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
  179. </ColorAnimationUsingKeyFrames>
  180. </Storyboard>
  181. </VisualState>
  182. </VisualStateGroup>
  183. <VisualStateGroup x:Name="ExpansionStates">
  184. <VisualState x:Name="Expanded">
  185. <Storyboard>
  186. <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ItemsHost">
  187. <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
  188. </ObjectAnimationUsingKeyFrames>
  189. </Storyboard>
  190. </VisualState>
  191. <VisualState x:Name="Collapsed" />
  192. </VisualStateGroup>
  193. </VisualStateManager.VisualStateGroups>
  194. <Border x:Name="Bd" Grid.Column="0" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
  195. <ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
  196. </Border>
  197. <ItemsPresenter x:Name="ItemsHost" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Visibility="Collapsed" />
  198. </Grid>
  199. <ControlTemplate.Triggers>
  200. <MultiTrigger>
  201. <MultiTrigger.Conditions>
  202. <Condition Property="HasHeader" Value="false" />
  203. <Condition Property="Width" Value="Auto" />
  204. </MultiTrigger.Conditions>
  205. <Setter TargetName="PART_Header" Property="MinWidth" Value="75" />
  206. </MultiTrigger>
  207. <MultiTrigger>
  208. <MultiTrigger.Conditions>
  209. <Condition Property="HasHeader" Value="false" />
  210. <Condition Property="Height" Value="Auto" />
  211. </MultiTrigger.Conditions>
  212. <Setter TargetName="PART_Header" Property="MinHeight" Value="19" />
  213. </MultiTrigger>
  214. </ControlTemplate.Triggers>
  215. </ControlTemplate>
  216. </Setter.Value>
  217. </Setter>
  218. </Style>
  219. </UserControl.Resources>
  220. <Grid Margin="20">
  221. <Grid.ColumnDefinitions>
  222. <ColumnDefinition />
  223. <ColumnDefinition Width="0.2*" />
  224. </Grid.ColumnDefinitions>
  225. <ScrollViewer Grid.Column="0" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  226. <ListView
  227. Margin="5"
  228. VerticalAlignment="Top"
  229. Background="Transparent"
  230. BorderThickness="0"
  231. ItemsSource="{Binding Recipes}"
  232. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  233. <ListView.ItemsPanel>
  234. <ItemsPanelTemplate>
  235. <UniformGrid
  236. HorizontalAlignment="Left"
  237. VerticalAlignment="Top"
  238. Columns="6" />
  239. </ItemsPanelTemplate>
  240. </ListView.ItemsPanel>
  241. <ListView.ItemTemplate>
  242. <DataTemplate>
  243. <Border Margin="5" Background="LightSkyBlue" Width="210">
  244. <Grid>
  245. <Grid.RowDefinitions>
  246. <RowDefinition />
  247. <RowDefinition Height="0.25*" />
  248. <RowDefinition Height="0.2*" />
  249. </Grid.RowDefinitions>
  250. <Image Source="/BPASmartClient.CustomResource;component/Image/AGV/炒锅.png" />
  251. <TextBlock
  252. Grid.Row="1"
  253. Margin="2,0,0,0"
  254. HorizontalAlignment="Center"
  255. VerticalAlignment="Center"
  256. Foreground="#dd000000"
  257. Text="{Binding RecipeName}" />
  258. <Grid
  259. Name="gr"
  260. Grid.Row="2"
  261. Height="30"
  262. Background="#00BEFA">
  263. <pry:IcoButton
  264. Width="{Binding ElementName=gr, Path=ActualWidth}"
  265. Height="{Binding ElementName=gr, Path=ActualHeight}"
  266. HorizontalAlignment="Center"
  267. VerticalAlignment="Center"
  268. BorderThickness="0"
  269. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  270. CommandParameter="{Binding RecipeName}"
  271. Content="订单下发"
  272. EnterBackground="Red"
  273. FontStyle="Normal"
  274. Foreground="#dd000000"
  275. IcoText="&#xe6cf;"
  276. IsEnabled="{Binding IsEnable}"
  277. Style="{StaticResource IcoButtonStyle}" />
  278. </Grid>
  279. </Grid>
  280. </Border>
  281. </DataTemplate>
  282. </ListView.ItemTemplate>
  283. </ListView>
  284. <!--<ItemsControl ItemsSource="{Binding Recipes}">
  285. <ItemsControl.ItemTemplate>
  286. <DataTemplate>
  287. <Grid
  288. Height="150"
  289. Margin="0,0,0,50"
  290. VerticalAlignment="Top">
  291. <Border
  292. Name="ShadowElement"
  293. Height="150"
  294. VerticalAlignment="Top"
  295. BorderBrush="#00BEFA"
  296. BorderThickness="2"
  297. ClipToBounds="True"
  298. CornerRadius="8">
  299. <Border.Effect>
  300. <DropShadowEffect
  301. BlurRadius="18"
  302. ShadowDepth="0"
  303. Color="#00BEFA" />
  304. </Border.Effect>
  305. </Border>
  306. <Grid>
  307. <Grid.ColumnDefinitions>
  308. <ColumnDefinition Width="200" />
  309. <ColumnDefinition />
  310. <ColumnDefinition Width="100" />
  311. </Grid.ColumnDefinitions>
  312. <Grid Margin="20,0,0,0">
  313. <Grid.RowDefinitions>
  314. <RowDefinition />
  315. <RowDefinition />
  316. </Grid.RowDefinitions>
  317. <TextBlock
  318. FontSize="40"
  319. Foreground="White"
  320. Text="{Binding RecipeName}" />
  321. <Button
  322. Grid.Row="1"
  323. Width="80"
  324. Height="30"
  325. HorizontalAlignment="Left"
  326. Background="#00BEFA"
  327. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  328. CommandParameter="{Binding RecipeName}"
  329. Content="配方下发"
  330. IsEnabled="{Binding IsEnable}" />
  331. </Grid>
  332. <ListView
  333. Grid.Column="1"
  334. Margin="10"
  335. Background="Transparent"
  336. BorderBrush="#00BEFA"
  337. BorderThickness="2,0,2,0"
  338. ItemsSource="{Binding RawMaterials}"
  339. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  340. <ListView.ItemsPanel>
  341. <ItemsPanelTemplate>
  342. <UniformGrid
  343. HorizontalAlignment="Left"
  344. VerticalAlignment="Top"
  345. Columns="4" />
  346. </ItemsPanelTemplate>
  347. </ListView.ItemsPanel>
  348. <ListView.ItemTemplate>
  349. <DataTemplate>
  350. <StackPanel
  351. Grid.Column="1"
  352. Height="20"
  353. Margin="20,0,0,0"
  354. VerticalAlignment="Top"
  355. Orientation="Horizontal">
  356. <Ellipse
  357. Width="{Binding ElementName=n, Path=ActualHeight}"
  358. Margin="0,0,5,0"
  359. Fill="{Binding RecipeStatus, Converter={StaticResource StatusConverter}}" />
  360. <TextBlock
  361. Name="n"
  362. FontSize="16"
  363. Foreground="White"
  364. Text="{Binding RawMaterialName}" />
  365. </StackPanel>
  366. </DataTemplate>
  367. </ListView.ItemTemplate>
  368. </ListView>
  369. <StackPanel
  370. Grid.Column="2"
  371. Margin="5,0"
  372. VerticalAlignment="Center">
  373. <StackPanel Margin="0,0,0,5" Orientation="Horizontal">
  374. <Ellipse
  375. Width="{Binding ElementName=tb, Path=ActualHeight}"
  376. Margin="0,0,5,0"
  377. Fill="Green" />
  378. <TextBlock
  379. Name="tb"
  380. Foreground="#ddd"
  381. Text="准备就绪" />
  382. </StackPanel>
  383. <StackPanel Margin="0,0,0,5" Orientation="Horizontal">
  384. <Ellipse
  385. Width="{Binding ElementName=tb, Path=ActualHeight}"
  386. Margin="0,0,5,0"
  387. Fill="Yellow" />
  388. <TextBlock
  389. Name="tb1"
  390. Foreground="#ddd"
  391. Text="等待接料" />
  392. </StackPanel>
  393. <StackPanel Margin="0,0,0,5" Orientation="Horizontal">
  394. <Ellipse
  395. Width="{Binding ElementName=tb, Path=ActualHeight}"
  396. Margin="0,0,5,0"
  397. Fill="Aqua" />
  398. <TextBlock
  399. Name="tb2"
  400. Foreground="#ddd"
  401. Text="接料完成" />
  402. </StackPanel>
  403. <StackPanel Margin="0,0,0,5" Orientation="Horizontal">
  404. <Ellipse
  405. Width="{Binding ElementName=tb, Path=ActualHeight}"
  406. Margin="0,0,5,0"
  407. Fill="Red" />
  408. <TextBlock
  409. Name="tb3"
  410. Foreground="#ddd"
  411. Text="设备异常" />
  412. </StackPanel>
  413. </StackPanel>
  414. </Grid>
  415. </Grid>
  416. </DataTemplate>
  417. </ItemsControl.ItemTemplate>
  418. </ItemsControl>-->
  419. </ScrollViewer>
  420. <Grid Grid.Column="1">
  421. <Grid.RowDefinitions>
  422. <RowDefinition Height="40" />
  423. <RowDefinition />
  424. </Grid.RowDefinitions>
  425. <Grid>
  426. <Grid.ColumnDefinitions>
  427. <ColumnDefinition/>
  428. <ColumnDefinition/>
  429. <ColumnDefinition/>
  430. </Grid.ColumnDefinitions>
  431. <RadioButton Content="等待中"
  432. Style="{DynamicResource RadioState}"
  433. GroupName="state"
  434. IsChecked="True"
  435. Command="{Binding ChangeRecipeStateCommand}"
  436. Click="RadioButtonWait_Click"/>
  437. <RadioButton Grid.Column="1"
  438. Content="执行中"
  439. Style="{DynamicResource RadioState}"
  440. GroupName="state"
  441. Click="RadioButtonMaking_Click"/>
  442. <RadioButton Grid.Column="2"
  443. Content="已完成"
  444. Style="{DynamicResource RadioState}"
  445. GroupName="state"
  446. Click="RadioButtonCompelete_Click"/>
  447. </Grid>
  448. <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" >
  449. <Border Background="Transparent" BorderThickness="1" BorderBrush="White">
  450. <Grid Grid.Row="1">
  451. <Grid x:Name="repiceListMaking" Margin="5">
  452. <Grid.RowDefinitions>
  453. <RowDefinition Height="30"/>
  454. <RowDefinition/>
  455. </Grid.RowDefinitions>
  456. <TextBlock Text="{Binding CurrentRecipeName}" Foreground="White" FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0"/>
  457. <ItemsControl Grid.Row="1" ItemsSource="{Binding recipeProcesses}" Margin="50,0" Background="Transparent" BorderThickness="0">
  458. <ItemsControl.ItemTemplate>
  459. <DataTemplate>
  460. <Grid Margin="5">
  461. <Grid.ColumnDefinitions>
  462. <ColumnDefinition/>
  463. <ColumnDefinition Width="16"/>
  464. <ColumnDefinition/>
  465. </Grid.ColumnDefinitions>
  466. <TextBlock Text="{Binding RawMaterialName}"
  467. Foreground="Aqua"
  468. FontSize="15"
  469. VerticalAlignment="Center"
  470. HorizontalAlignment="Left"
  471. Margin="10,0,5,0"
  472. ToolTip="{Binding RawMaterialSource,Converter={StaticResource IntToSourceConvert}}" />
  473. <TextBlock Grid.Column="1" Text=":" Foreground="Aqua" FontSize="15" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,5,0"/>
  474. <Button Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center"
  475. Content="{Binding RecipeStatus, Converter={StaticResource RunStatusConvert}}"
  476. IsEnabled="{Binding RawMaterialSource, Converter={StaticResource EnbleConvert}}"
  477. Style="{StaticResource materialMakingButton}"
  478. Command="{Binding DataContext.ChangeRecipeStateCommand,RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  479. CommandParameter="{Binding RawMaterialId}"/>
  480. </Grid>
  481. </DataTemplate>
  482. </ItemsControl.ItemTemplate>
  483. </ItemsControl>
  484. </Grid>
  485. <!--<TreeView x:Name="repiceListMaking" ItemsSource="{Binding RecipeProcesse}"
  486. ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" Background="Wheat" ItemContainerStyle="{StaticResource recipeTreeItem}">
  487. </TreeView>-->
  488. <!--等待和已完成-->
  489. <TreeView x:Name="repiceList" ItemsSource="{Binding UserTreeWait}"
  490. ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" Background="Transparent" ItemContainerStyle="{StaticResource recipeTreeItem}">
  491. </TreeView>
  492. </Grid>
  493. </Border>
  494. </ScrollViewer>
  495. </Grid>
  496. </Grid>
  497. </UserControl>