终端一体化运控平台
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

129 lines
10 KiB

  1. <UserControl x:Class="FryPot_DosingSystem.View.RecipeSendDownView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:FryPot_DosingSystem.View"
  8. xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel"
  9. mc:Ignorable="d"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <UserControl.DataContext>
  12. <vm:RecipeSetDownViewModel/>
  13. </UserControl.DataContext>
  14. <UserControl.Resources>
  15. <ResourceDictionary>
  16. <ResourceDictionary.MergedDictionaries>
  17. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  18. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  19. </ResourceDictionary.MergedDictionaries>
  20. </ResourceDictionary>
  21. </UserControl.Resources>
  22. <Grid>
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="50"/>
  25. <RowDefinition/>
  26. </Grid.RowDefinitions>
  27. <Button HorizontalAlignment="Right" VerticalAlignment="Center" Content="配方一键下发" Width="110" Height="30" Margin="0,0,10,0" Cursor="Hand" Command="{Binding AllRecipeSetDownCommand}"></Button>
  28. <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  29. <ItemsControl ItemsSource="{Binding Recipes}">
  30. <ItemsControl.ItemsPanel>
  31. <ItemsPanelTemplate>
  32. <StackPanel></StackPanel>
  33. </ItemsPanelTemplate>
  34. </ItemsControl.ItemsPanel>
  35. <ItemsControl.ItemTemplate>
  36. <DataTemplate>
  37. <Border BorderBrush="Aqua" BorderThickness="2" CornerRadius="14" Height="120" Margin="5,5">
  38. <RadioButton>
  39. <RadioButton.Template>
  40. <ControlTemplate>
  41. <Grid>
  42. <Grid.ColumnDefinitions>
  43. <ColumnDefinition Width="*"></ColumnDefinition>
  44. <ColumnDefinition Width="0.01*"></ColumnDefinition>
  45. <ColumnDefinition Width="4*"></ColumnDefinition>
  46. <ColumnDefinition Width="1.2*"/>
  47. </Grid.ColumnDefinitions>
  48. <Grid>
  49. <Grid.RowDefinitions>
  50. <RowDefinition Height="70"></RowDefinition>
  51. <RowDefinition></RowDefinition>
  52. </Grid.RowDefinitions>
  53. <Viewbox Stretch="Fill" HorizontalAlignment="Center" Width="200">
  54. <TextBlock Text="{Binding RecipeName}" HorizontalAlignment="Center"></TextBlock>
  55. </Viewbox>
  56. <Button Grid.Row="1" Width="100" Content="配方下发" Command="{Binding DataContext.RecipeSetDownCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
  57. CommandParameter="{Binding RecipeId}" Cursor="Hand"></Button>
  58. </Grid>
  59. <Line StrokeThickness="3" Grid.Column="1" HorizontalAlignment="Left" Stroke="LawnGreen" X1="0" Y1="5" X2="0" Y2="110"></Line>
  60. <Grid Grid.Column="2">
  61. <!--后续添加内容-->
  62. <ScrollViewer VerticalScrollBarVisibility="Hidden" >
  63. <ItemsControl ItemsSource="{Binding materialCollection}" HorizontalAlignment="Center">
  64. <ItemsControl.ItemsPanel>
  65. <ItemsPanelTemplate>
  66. <StackPanel></StackPanel>
  67. </ItemsPanelTemplate>
  68. </ItemsControl.ItemsPanel>
  69. <ItemsControl.ItemTemplate>
  70. <DataTemplate>
  71. <RadioButton
  72. HorizontalAlignment="Center" >
  73. <RadioButton.Template>
  74. <ControlTemplate>
  75. <Grid ShowGridLines="True" HorizontalAlignment="Center" Width="600">
  76. <Grid.ColumnDefinitions>
  77. <ColumnDefinition Width="0.1*"/>
  78. <ColumnDefinition Width="0.3*"/>
  79. <ColumnDefinition Width="0.3*"/>
  80. <ColumnDefinition Width="0.3*"/>
  81. </Grid.ColumnDefinitions>
  82. <Border Width="15" Height="15" CornerRadius="15">
  83. <Border.Background>
  84. <RadialGradientBrush>
  85. <GradientStop Color="#99e6ff" Offset="0.5"/>
  86. <GradientStop Color="white"/>
  87. </RadialGradientBrush>
  88. </Border.Background>
  89. </Border>
  90. <TextBlock Grid.Column="1" Text="{Binding MaterialName }" Margin="30,5,0,5" FontSize="20" HorizontalAlignment="Left"></TextBlock>
  91. <TextBlock Grid.Column="2" Text="{Binding MaterialLoc}" Margin="30,5,0,5" FontSize="20" HorizontalAlignment="Left"></TextBlock>
  92. <StackPanel Orientation="Horizontal" Grid.Column="3">
  93. <TextBlock Text="{Binding MaterialWeight}" Margin="30,5,2,5" FontSize="20" HorizontalAlignment="Center"></TextBlock>
  94. <TextBlock Foreground="LightSeaGreen" Text="g" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
  95. </StackPanel>
  96. </Grid>
  97. </ControlTemplate>
  98. </RadioButton.Template>
  99. </RadioButton>
  100. </DataTemplate>
  101. </ItemsControl.ItemTemplate>
  102. </ItemsControl>
  103. </ScrollViewer>
  104. </Grid>
  105. <Grid Grid.Column="3">
  106. <Grid.ColumnDefinitions>
  107. <ColumnDefinition Width="3"/>
  108. <ColumnDefinition/>
  109. </Grid.ColumnDefinitions>
  110. <Line StrokeThickness="3" Grid.Column="0" HorizontalAlignment="Left" Stroke="LawnGreen" X1="0" Y1="5" X2="0" Y2="110"></Line>
  111. <TextBlock Grid.Column="1" FontSize="16" Text="{Binding RecipeSetInfo}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
  112. </Grid>
  113. </Grid>
  114. </ControlTemplate>
  115. </RadioButton.Template>
  116. </RadioButton>
  117. </Border>
  118. </DataTemplate>
  119. </ItemsControl.ItemTemplate>
  120. </ItemsControl>
  121. </ScrollViewer>
  122. </Grid>
  123. </UserControl>