终端一体化运控平台
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

153 linhas
12 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,10,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="*"/>
  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. <Viewbox Stretch="Uniform" HorizontalAlignment="Center" Width="200">
  60. <TextBlock Text="{Binding RecipeName}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
  61. </Viewbox>
  62. <Line StrokeThickness="3" Grid.Column="1" HorizontalAlignment="Left" Stroke="LawnGreen" X1="0" Y1="5" X2="0" Y2="110"></Line>
  63. <Grid Grid.Column="2">
  64. <!--后续添加内容-->
  65. <ScrollViewer VerticalScrollBarVisibility="Hidden" >
  66. <ItemsControl ItemsSource="{Binding materialCollection}" HorizontalAlignment="Center">
  67. <ItemsControl.ItemsPanel>
  68. <ItemsPanelTemplate>
  69. <StackPanel></StackPanel>
  70. </ItemsPanelTemplate>
  71. </ItemsControl.ItemsPanel>
  72. <ItemsControl.ItemTemplate>
  73. <DataTemplate>
  74. <RadioButton
  75. HorizontalAlignment="Center" >
  76. <RadioButton.Template>
  77. <ControlTemplate>
  78. <Grid ShowGridLines="True" HorizontalAlignment="Center" Width="600">
  79. <Grid.ColumnDefinitions>
  80. <ColumnDefinition Width="0.1*"/>
  81. <ColumnDefinition Width="0.3*"/>
  82. <ColumnDefinition Width="0.3*"/>
  83. <ColumnDefinition Width="0.3*"/>
  84. </Grid.ColumnDefinitions>
  85. <Border Width="15" Height="15" CornerRadius="15">
  86. <Border.Background>
  87. <RadialGradientBrush>
  88. <GradientStop Color="#99e6ff" Offset="0.5"/>
  89. <GradientStop Color="white"/>
  90. </RadialGradientBrush>
  91. </Border.Background>
  92. </Border>
  93. <TextBlock Grid.Column="1" Text="{Binding MaterialName }" Margin="30,5,0,5" FontSize="20" HorizontalAlignment="Left"></TextBlock>
  94. <TextBlock Grid.Column="2" Text="{Binding MaterialLoc}" Margin="30,5,0,5" FontSize="20" HorizontalAlignment="Left"></TextBlock>
  95. <StackPanel Orientation="Horizontal" Grid.Column="3">
  96. <TextBlock Text="{Binding MaterialWeight}" Margin="30,5,2,5" FontSize="20" HorizontalAlignment="Center"></TextBlock>
  97. <TextBlock Foreground="LightSeaGreen" Text="g" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
  98. </StackPanel>
  99. </Grid>
  100. </ControlTemplate>
  101. </RadioButton.Template>
  102. </RadioButton>
  103. </DataTemplate>
  104. </ItemsControl.ItemTemplate>
  105. </ItemsControl>
  106. </ScrollViewer>
  107. </Grid>
  108. <Grid Grid.Column="3">
  109. <Grid.ColumnDefinitions>
  110. <ColumnDefinition Width="3"/>
  111. <ColumnDefinition/>
  112. </Grid.ColumnDefinitions>
  113. <Line StrokeThickness="3" Grid.Column="0" HorizontalAlignment="Left" Stroke="LawnGreen" X1="0" Y1="5" X2="0" Y2="110"></Line>
  114. <StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
  115. <TextBlock FontSize="16" Text="{Binding RecipeSetInfo}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
  116. <Button Margin="0,5,0,0" Height="27" Command="{Binding DataContext.RecipeSetDownCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" CommandParameter="{Binding RecipeId}" Cursor="Hand" >
  117. <Button.Template>
  118. <ControlTemplate TargetType="{x:Type Button}">
  119. <StackPanel Orientation="Horizontal" >
  120. <TextBlock Name="title" FontFamily="../Resources/fonts/#iconfont" Text="&#xe622;" FontSize="21" VerticalAlignment="Bottom"></TextBlock>
  121. <TextBlock Name="text" Text="配方下发" Height="Auto" FontSize="24"></TextBlock>
  122. </StackPanel>
  123. <ControlTemplate.Triggers>
  124. <Trigger Property="IsMouseOver" Value="True">
  125. <Setter TargetName="title" Property="Foreground" Value="Cyan"/>
  126. <Setter TargetName="text" Property="Foreground" Value="Cyan"/>
  127. </Trigger>
  128. </ControlTemplate.Triggers>
  129. </ControlTemplate>
  130. </Button.Template>
  131. </Button>
  132. </StackPanel>
  133. </Grid>
  134. </Grid>
  135. </ControlTemplate>
  136. </RadioButton.Template>
  137. </RadioButton>
  138. </Border>
  139. </DataTemplate>
  140. </ItemsControl.ItemTemplate>
  141. </ItemsControl>
  142. </ScrollViewer>
  143. </Grid>
  144. </UserControl>