终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

192 lines
12 KiB

  1. <UserControl x:Class="BPASmartClient.DosingSystem.View.MaterialDosageView"
  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:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
  7. xmlns:vm ="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
  8. xmlns:con ="clr-namespace:BPASmartClient.DosingSystem.Converter"
  9. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  10. mc:Ignorable="d"
  11. d:DesignHeight="450" d:DesignWidth="800">
  12. <UserControl.DataContext>
  13. <vm:MaterialDosageViewModel/>
  14. </UserControl.DataContext>
  15. <UserControl.Resources>
  16. <Style x:Key="myText" TargetType="TextBox">
  17. <Setter Property="Template">
  18. <Setter.Value>
  19. <ControlTemplate TargetType="TextBox">
  20. <Border Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Background="Transparent" BorderBrush="White" BorderThickness="0.4">
  21. <TextBlock Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Text}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  22. </Border>
  23. </ControlTemplate>
  24. </Setter.Value>
  25. </Setter>
  26. </Style>
  27. <Style x:Key="RadioState" TargetType="RadioButton">
  28. <Setter Property="Margin" Value="1" />
  29. <Setter Property="Background" Value="Transparent" />
  30. <Setter Property="Foreground" Value="#ddd" />
  31. <Setter Property="VerticalContentAlignment" Value="Bottom" />
  32. <Setter Property="Margin" Value="2,5" />
  33. <Setter Property="FontSize" Value="16" />
  34. <Setter Property="FontFamily" Value="Consolas" />
  35. <Setter Property="Template">
  36. <Setter.Value>
  37. <ControlTemplate TargetType="RadioButton">
  38. <Border
  39. Name="radiobutton"
  40. Background="{TemplateBinding Background}"
  41. CornerRadius="5"
  42. Opacity="0.85">
  43. <Grid>
  44. <!--<Border
  45. x:Name="back_border"
  46. BorderBrush="Black"
  47. BorderThickness="0"
  48. CornerRadius="1">
  49. <Border.Effect>
  50. <BlurEffect KernelType="Gaussian" Radius="2" />
  51. </Border.Effect>
  52. </Border>
  53. <Border
  54. x:Name="fore_border"
  55. Margin="2"
  56. BorderBrush="White"
  57. BorderThickness="0"
  58. CornerRadius="{Binding ElementName=button, Path=CornerRadius}"
  59. Opacity="0.7">
  60. <Border.Effect>
  61. <BlurEffect KernelType="Gaussian" Radius="2" />
  62. </Border.Effect>
  63. </Border>-->
  64. <ContentPresenter
  65. HorizontalAlignment="Center"
  66. VerticalAlignment="Center"
  67. Content="{TemplateBinding Content}"
  68. TextBlock.FontFamily="{TemplateBinding FontFamily}"
  69. TextBlock.FontSize="{TemplateBinding FontSize}"
  70. TextBlock.Foreground="{TemplateBinding Foreground}" />
  71. <Image
  72. Name="im"
  73. Source="/BPASmartClient.CustomResource;component/Image/按钮/组 8.png"
  74. Stretch="Fill" />
  75. </Grid>
  76. </Border>
  77. <ControlTemplate.Triggers>
  78. <Trigger Property="IsChecked" Value="True">
  79. <!--<Setter TargetName="back_border" Property="BorderThickness" Value="1,0,1,1" />
  80. <Setter TargetName="back_border" Property="CornerRadius" Value="5" />
  81. <Setter TargetName="fore_border" Property="BorderThickness" Value="0,2,0,0" />
  82. <Setter Property="Background" Value=" #4169E1" />-->
  83. <Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮/组 7.png" />
  84. </Trigger>
  85. <Trigger Property="IsChecked" Value="False">
  86. <Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮/组 8.png" />
  87. </Trigger>
  88. <Trigger Property="IsMouseOver" Value="True">
  89. <!--<Setter TargetName="back_border" Property="BorderBrush" Value="white" />
  90. <Setter TargetName="back_border" Property="BorderThickness" Value="1,1,1,1" />-->
  91. <Setter TargetName="radiobutton" Property="Opacity" Value="1" />
  92. <!--<Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮背景蓝色.png" />-->
  93. </Trigger>
  94. </ControlTemplate.Triggers>
  95. </ControlTemplate>
  96. </Setter.Value>
  97. </Setter>
  98. </Style>
  99. </UserControl.Resources>
  100. <Grid Margin="20,10" >
  101. <Grid.RowDefinitions>
  102. <RowDefinition Height="50"/>
  103. <RowDefinition Height="30"/>
  104. <RowDefinition/>
  105. <RowDefinition Height="30"/>
  106. </Grid.RowDefinitions>
  107. <Grid Margin="0,0,0,10" HorizontalAlignment="Right" VerticalAlignment="Center">
  108. <pry:ImageBorder Width="{Binding ElementName=ggr, Path=ActualWidth}" Height="{Binding ElementName=ggr, Path=ActualHeight}" />
  109. <UniformGrid Columns="5" HorizontalAlignment="Center" VerticalAlignment="Center">
  110. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
  111. <TextBlock Text="进桶计数:" Foreground="White" Style="{StaticResource TitleTextblockStyle}" FontSize="20"/>
  112. <TextBlock Margin="10,0,0,0" Width="40" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding InRecipe,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Foreground="Red" Style="{StaticResource TextBlockStyle}" FontSize="18"/>
  113. </StackPanel>
  114. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
  115. <TextBlock Text="出桶计数:" Foreground="White" Style="{StaticResource TitleTextblockStyle}" FontSize="20"/>
  116. <TextBlock Margin="10,0,0,0" Width="40" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding OutRecipe,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Foreground="Red" Style="{StaticResource TextBlockStyle}" FontSize="18"/>
  117. </StackPanel>
  118. <RadioButton Margin="20,2" Click="RadioButton_Click" Content="正在执行记录" GroupName="state" IsChecked="True" Style="{DynamicResource RadioState}" />
  119. <RadioButton Margin="20,2" Click="RadioButton_Click_1" Content="已完成记录" GroupName="state" Style="{DynamicResource RadioState}" />
  120. <RadioButton Margin="20,2" Click="RadioButton_Click_2" Content="历史记录" GroupName="state" Style="{DynamicResource RadioState}" />
  121. </UniformGrid>
  122. </Grid>
  123. <Grid Grid.Row="1">
  124. <Grid.ColumnDefinitions>
  125. <ColumnDefinition Width="60"/>
  126. <ColumnDefinition/>
  127. </Grid.ColumnDefinitions>
  128. <TextBox Text="配方名称" Foreground="White" Style="{StaticResource myText}" />
  129. <UniformGrid Grid.Column="1" Columns="19">
  130. <TextBox Style="{StaticResource myText}" Text="1" Foreground="White" />
  131. <TextBox Style="{StaticResource myText}" Text="2" Foreground="White"/>
  132. <TextBox Style="{StaticResource myText}" Text="3" Foreground="White"/>
  133. <TextBox Style="{StaticResource myText}" Text="4" Foreground="White" />
  134. <TextBox Text="5" Foreground="White" Style="{StaticResource myText}" />
  135. <TextBox Text="6" Foreground="White" Style="{StaticResource myText}"/>
  136. <TextBox Text="7" Foreground="White" Style="{StaticResource myText}"/>
  137. <TextBox Text="8" Foreground="White" Style="{StaticResource myText}"/>
  138. <TextBox Text="9" Foreground="White" Style="{StaticResource myText}"/>
  139. <TextBox Text="10" Foreground="White" Style="{StaticResource myText}"/>
  140. <TextBox Text="11" Foreground="White" Style="{StaticResource myText}"/>
  141. <TextBox Text="12" Foreground="White" Style="{StaticResource myText}"/>
  142. <TextBox Text="13" Foreground="White" Style="{StaticResource myText}"/>
  143. <TextBox Text="14" Foreground="White" Style="{StaticResource myText}"/>
  144. <TextBox Text="15" Foreground="White" Style="{StaticResource myText}"/>
  145. <TextBox Text="16" Foreground="White" Style="{StaticResource myText}"/>
  146. <TextBox Text="17" Foreground="White" Style="{StaticResource myText}"/>
  147. <TextBox Text="18" Foreground="White" Style="{StaticResource myText}"/>
  148. <TextBox Text="总量" Foreground="White" Style="{StaticResource myText}"/>
  149. </UniformGrid>
  150. </Grid>
  151. <Grid Grid.Row="2" x:Name="OnGrid">
  152. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  153. <ItemsControl x:Name="test" >
  154. <ItemsControl.ItemTemplate>
  155. <DataTemplate>
  156. <Grid Height="30">
  157. <Grid.ColumnDefinitions>
  158. <ColumnDefinition Width="60"/>
  159. <ColumnDefinition/>
  160. </Grid.ColumnDefinitions>
  161. <TextBox Text="{Binding RecipeName}" Foreground="White" Style="{StaticResource myText}" />
  162. <ItemsControl Grid.Column="1" Height="30" ItemsSource="{Binding Matrialsweight}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  163. <ItemsControl.ItemsPanel>
  164. <ItemsPanelTemplate>
  165. <UniformGrid Columns="19"/>
  166. </ItemsPanelTemplate>
  167. </ItemsControl.ItemsPanel>
  168. <ItemsControl.ItemTemplate>
  169. <DataTemplate>
  170. <TextBox Text="{Binding Weight}" Foreground="White" IsReadOnly="True" Style="{StaticResource myText}" />
  171. </DataTemplate>
  172. </ItemsControl.ItemTemplate>
  173. </ItemsControl>
  174. </Grid>
  175. </DataTemplate>
  176. </ItemsControl.ItemTemplate>
  177. </ItemsControl>
  178. </ScrollViewer>
  179. </Grid>
  180. </Grid>
  181. </UserControl>