终端一体化运控平台
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

126 строки
9.6 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. <TextBlock Text="{Binding RecipeName}" FontSize="35" HorizontalAlignment="Center"></TextBlock>
  54. <Button Grid.Row="1" Width="100" Content="配方下发" Command="{Binding DataContext.RecipeSetDownCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
  55. CommandParameter="{Binding RecipeId}" Cursor="Hand"></Button>
  56. </Grid>
  57. <Line StrokeThickness="3" Grid.Column="1" HorizontalAlignment="Left" Stroke="LawnGreen" X1="0" Y1="5" X2="0" Y2="110"></Line>
  58. <Grid Grid.Column="2">
  59. <!--后续添加内容-->
  60. <ScrollViewer VerticalScrollBarVisibility="Hidden" >
  61. <ItemsControl ItemsSource="{Binding materialCollection}">
  62. <ItemsControl.ItemsPanel>
  63. <ItemsPanelTemplate>
  64. <StackPanel></StackPanel>
  65. </ItemsPanelTemplate>
  66. </ItemsControl.ItemsPanel>
  67. <ItemsControl.ItemTemplate>
  68. <DataTemplate>
  69. <RadioButton
  70. HorizontalAlignment="Center" >
  71. <RadioButton.Template>
  72. <ControlTemplate>
  73. <Grid>
  74. <Grid.ColumnDefinitions>
  75. <ColumnDefinition/>
  76. <ColumnDefinition/>
  77. <ColumnDefinition/>
  78. <ColumnDefinition/>
  79. </Grid.ColumnDefinitions>
  80. <Border Width="15" Height="15" CornerRadius="15">
  81. <Border.Background>
  82. <RadialGradientBrush>
  83. <GradientStop Color="#99e6ff" Offset="0.5"/>
  84. <GradientStop Color="white"/>
  85. </RadialGradientBrush>
  86. </Border.Background>
  87. </Border>
  88. <TextBlock Grid.Column="1" Text="{Binding MaterialName }" Margin="30,5" FontSize="20"></TextBlock>
  89. <TextBlock Grid.Column="2" Text="{Binding MaterialLoc}" Margin="30,5" FontSize="20"></TextBlock>
  90. <StackPanel Orientation="Horizontal" Grid.Column="3">
  91. <TextBlock Text="{Binding MaterialWeight}" Margin="30,5,2,5" FontSize="20"></TextBlock>
  92. <TextBlock Foreground="LightSeaGreen" Text="g" FontSize="20" VerticalAlignment="Center"></TextBlock>
  93. </StackPanel>
  94. </Grid>
  95. </ControlTemplate>
  96. </RadioButton.Template>
  97. </RadioButton>
  98. </DataTemplate>
  99. </ItemsControl.ItemTemplate>
  100. </ItemsControl>
  101. </ScrollViewer>
  102. </Grid>
  103. <Grid Grid.Column="3">
  104. <Grid.ColumnDefinitions>
  105. <ColumnDefinition Width="3"/>
  106. <ColumnDefinition/>
  107. </Grid.ColumnDefinitions>
  108. <Line StrokeThickness="3" Grid.Column="0" HorizontalAlignment="Left" Stroke="LawnGreen" X1="0" Y1="5" X2="0" Y2="110"></Line>
  109. <TextBlock Grid.Column="1" FontSize="16" Text="{Binding RecipeSetInfo}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
  110. </Grid>
  111. </Grid>
  112. </ControlTemplate>
  113. </RadioButton.Template>
  114. </RadioButton>
  115. </Border>
  116. </DataTemplate>
  117. </ItemsControl.ItemTemplate>
  118. </ItemsControl>
  119. </ScrollViewer>
  120. </Grid>
  121. </UserControl>