|
- <UserControl
- x:Class="BPASmartClient.DosingSystem.View.RecipeControlView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:con="clr-namespace:BPASmartClient.DosingSystem.Converter"
- xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d">
-
- <UserControl.DataContext>
- <vm:RecipeControlViewModel />
- </UserControl.DataContext>
-
- <UserControl.Resources>
-
- <con:RunStatusConvert x:Key="RunStatusConvert" />
-
- <Style x:Key="UserItemContainerStyle" TargetType="ListBoxItem">
- <Style.Resources>
- <!-- SelectedItem with focus -->
- <SolidColorBrush
- x:Key="{x:Static SystemColors.HighlightBrushKey}"
- Opacity=".4"
- Color="White" />
- <!-- SelectedItem without focus -->
- <SolidColorBrush
- x:Key="{x:Static SystemColors.ControlBrushKey}"
- Opacity=".4"
- Color="White" />
- </Style.Resources>
- <!-- 设置触发器 -->
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Background" Value="White" />
- <Setter Property="Foreground" Value="White" />
- </Trigger>
- <Trigger Property="IsFocused" Value="true">
- <Setter Property="Background" Value="White" />
- <Setter Property="Foreground" Value="White" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </UserControl.Resources>
-
- <Grid Margin="20">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="0.2*" />
- </Grid.ColumnDefinitions>
-
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
-
- <ListView
- Margin="5"
- VerticalAlignment="Top"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding Recipes}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Columns="8" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
-
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border Margin="5" Background="LightSkyBlue">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition Height="0.25*" />
- <RowDefinition Height="0.2*" />
- </Grid.RowDefinitions>
-
- <Image Source="/BPASmartClient.CustomResource;component/Image/AGV/炒锅.png" />
-
- <TextBlock
- Grid.Row="1"
- Margin="2,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="#dd000000"
- Text="{Binding RecipeName}" />
-
- <Grid
- Name="gr"
- Grid.Row="2"
- Height="30"
- Background="#00BEFA">
-
- <pry:IcoButton
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- BorderThickness="0"
- Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipeName}"
- Content="订单下发"
- EnterBackground="Red"
- FontStyle="Normal"
- Foreground="#dd000000"
- IcoText=""
- IsEnabled="{Binding IsEnable}"
- Style="{StaticResource IcoButtonStyle}" />
-
-
- </Grid>
-
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
-
-
-
- <!--<ItemsControl ItemsSource="{Binding Recipes}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid
- Height="150"
- Margin="0,0,0,50"
- VerticalAlignment="Top">
- <Border
- Name="ShadowElement"
- Height="150"
- VerticalAlignment="Top"
- BorderBrush="#00BEFA"
- BorderThickness="2"
- ClipToBounds="True"
- CornerRadius="8">
- <Border.Effect>
- <DropShadowEffect
- BlurRadius="18"
- ShadowDepth="0"
- Color="#00BEFA" />
- </Border.Effect>
- </Border>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="200" />
- <ColumnDefinition />
- <ColumnDefinition Width="100" />
- </Grid.ColumnDefinitions>
-
- <Grid Margin="20,0,0,0">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <TextBlock
- FontSize="40"
- Foreground="White"
- Text="{Binding RecipeName}" />
- <Button
- Grid.Row="1"
- Width="80"
- Height="30"
- HorizontalAlignment="Left"
- Background="#00BEFA"
- Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipeName}"
- Content="配方下发"
- IsEnabled="{Binding IsEnable}" />
- </Grid>
-
- <ListView
- Grid.Column="1"
- Margin="10"
- Background="Transparent"
- BorderBrush="#00BEFA"
- BorderThickness="2,0,2,0"
- ItemsSource="{Binding RawMaterials}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Columns="4" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
-
- <ListView.ItemTemplate>
- <DataTemplate>
- <StackPanel
- Grid.Column="1"
- Height="20"
- Margin="20,0,0,0"
- VerticalAlignment="Top"
- Orientation="Horizontal">
- <Ellipse
- Width="{Binding ElementName=n, Path=ActualHeight}"
- Margin="0,0,5,0"
- Fill="{Binding RecipeStatus, Converter={StaticResource StatusConverter}}" />
- <TextBlock
- Name="n"
- FontSize="16"
- Foreground="White"
- Text="{Binding RawMaterialName}" />
-
- </StackPanel>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
-
- <StackPanel
- Grid.Column="2"
- Margin="5,0"
- VerticalAlignment="Center">
- <StackPanel Margin="0,0,0,5" Orientation="Horizontal">
- <Ellipse
- Width="{Binding ElementName=tb, Path=ActualHeight}"
- Margin="0,0,5,0"
- Fill="Green" />
- <TextBlock
- Name="tb"
- Foreground="#ddd"
- Text="准备就绪" />
- </StackPanel>
- <StackPanel Margin="0,0,0,5" Orientation="Horizontal">
- <Ellipse
- Width="{Binding ElementName=tb, Path=ActualHeight}"
- Margin="0,0,5,0"
- Fill="Yellow" />
- <TextBlock
- Name="tb1"
- Foreground="#ddd"
- Text="等待接料" />
- </StackPanel>
- <StackPanel Margin="0,0,0,5" Orientation="Horizontal">
- <Ellipse
- Width="{Binding ElementName=tb, Path=ActualHeight}"
- Margin="0,0,5,0"
- Fill="Aqua" />
- <TextBlock
- Name="tb2"
- Foreground="#ddd"
- Text="接料完成" />
- </StackPanel>
- <StackPanel Margin="0,0,0,5" Orientation="Horizontal">
- <Ellipse
- Width="{Binding ElementName=tb, Path=ActualHeight}"
- Margin="0,0,5,0"
- Fill="Red" />
- <TextBlock
- Name="tb3"
- Foreground="#ddd"
- Text="设备异常" />
- </StackPanel>
- </StackPanel>
- </Grid>
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>-->
- </ScrollViewer>
-
- <Grid Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <TextBlock
- FontSize="16"
- Foreground="Aqua"
- Text="{Binding RecipeName}" />
- <ItemsControl Grid.Row="1" ItemsSource="{Binding recipeProcesses}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <TextBlock
- Margin="0,0,5,0"
- HorizontalAlignment="Right"
- FontSize="16"
- Foreground="Aqua"
- Text="{Binding RawMaterialName}" />
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Left"
- FontSize="16"
- Foreground="Aqua"
- Text="{Binding RawMaterialStatus, Converter={StaticResource RunStatusConvert}}" />
-
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Grid>
-
- </Grid>
- </UserControl>
|