|
- <UserControl
- x:Class="BPASmartClient.DosingSystem.View.StockControlView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:define="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d">
-
- <UserControl.Resources>
- <Style x:Key="radioButtonStyle" TargetType="RadioButton">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="RadioButton">
- <Grid Name="gr" Opacity="0.8">
- <ContentControl
- Margin="{TemplateBinding Margin}"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Content="{TemplateBinding Content}"
- FontSize="{TemplateBinding FontSize}"
- Foreground="{TemplateBinding Foreground}" />
- <Image
- Name="image"
- Source="/BPASmartClient.CustomResource;component/Image/边框线.png"
- Stretch="Fill" />
-
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="image" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/边框线.png" />
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
- <Setter TargetName="image" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/透明背景.png" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="gr" Property="Opacity" Value="1" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="textBoxStyle" TargetType="TextBox">
- <Setter Property="Background" Value="Transparent" />
- </Style>
- </UserControl.Resources>
-
- <UserControl.DataContext>
- <vm:StockControViewModel />
- </UserControl.DataContext>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid x:Name="TopGrid">
- <Grid.RowDefinitions>
- <RowDefinition Height="0.2*" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <ListView
- Grid.Row="1"
- VerticalAlignment="Center"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding statusTop}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Columns="8"
- Rows="1" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- <ListView.ItemTemplate>
- <DataTemplate>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="0.8*" />
- <RowDefinition Height="0.1*" />
- <RowDefinition Height="0.2*" />
- </Grid.RowDefinitions>
-
- <define:MaterialStock
- Grid.Row="0"
- Margin="35,0,35,0"
- IsFaultState="{Binding IsFault}"
- IsLayOffState="{Binding IsLayOff}"
- IsOpenState="{Binding IsOpen}"
- IsRunning="{Binding RunStatus}" />
-
- <StackPanel
- Grid.Row="1"
- Margin="0,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock Foreground="#00c2f4" Text="配料重量:" />
- <TextBox
- Grid.Row="0"
- Width="80"
- Padding="2"
- Background="Transparent"
- BorderBrush="#00c2f4"
- CaretBrush="#00c2f4"
- Foreground="#00c2f4"
- Text="{Binding Weight}" />
- </StackPanel>
-
- <Grid Grid.Row="2" VerticalAlignment="Bottom">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <StackPanel>
- <ToggleButton
- Width="80"
- Height="30"
- Margin="5,0,5,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="Transparent"
- FontSize="20"
- IsChecked="{Binding IsOpen}"
- Style="{StaticResource SwitchToggleButtonStyle}" />
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- Foreground="AliceBlue"
- Text="仓盖控制" />
- </StackPanel>
-
- <StackPanel Grid.Column="1">
- <ToggleButton
- Width="80"
- Height="30"
- Margin="5,0,5,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="Transparent"
- FontSize="20"
- IsChecked="{Binding IsLayOff}"
- Style="{StaticResource SwitchToggleButtonStyle}" />
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- Foreground="AliceBlue"
- Text="出料控制" />
- </StackPanel>
-
-
- <!--<Button
- Height="30"
- Margin="5,0,5,0"
- Command="{Binding DataContext.GaicangControlCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- Content="开盖"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />-->
-
- <!--<Button
- Grid.Column="1"
- Height="30"
- Margin="5,0,5,0"
- Command="{Binding DataContext.BlowingControlCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- Content="出料"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />-->
- </Grid>
- </Grid>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>
- <Grid
- x:Name="midGrid"
- Grid.Row="1"
- Margin="0,0,0,0"
- Background="Transparent">
-
- <Grid.RowDefinitions>
- <RowDefinition />
-
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <define:ConveyBelt2
- Grid.RowSpan="2"
- Margin="-12,0,10,0"
- BeltDashThickess="50"
- BeltHeight="{Binding ElementName=midGrid, Path=ActualHeight}"
- BeltWidth="{Binding ElementName=midGrid, Path=ActualWidth}"
- IsRun="{Binding ConveyerBeltWork}" />
-
- <StackPanel
- Margin="10,0,0,0"
- VerticalAlignment="Center"
- Background="Transparent"
- Orientation="Horizontal">
-
- <TextBlock
- VerticalAlignment="Center"
- FontSize="18"
- Foreground="White"
- Text="输送带控制" />
-
- <ToggleButton
- Width="80"
- Height="30"
- Margin="5,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Background="Transparent"
- FontSize="20"
- IsChecked="{Binding ConveyerBeltWork}"
- Style="{StaticResource SwitchToggleButtonStyle}" />
-
- <!--<Button
- Grid.Column="1"
- Height="30"
- Margin="5,0,5,0"
- Command="{Binding DataContext.BlowingControlCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- Content="出料"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />-->
- <!--<RadioButton
- Width="130"
- Height="50"
- Command="{Binding DataContext.Open, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding Name}"
- Content="输送带启动"
- Foreground="Aqua"
- IsChecked="True"
- Style="{StaticResource radioButtonStyle}" />
-
- <RadioButton
- Width="130"
- Height="50"
- Command="{Binding DataContext.Close, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding Name}"
- Content="输送带停止"
- Foreground="Aqua"
- IsChecked="False"
- Style="{StaticResource radioButtonStyle}" />-->
- </StackPanel>
-
- </Grid>
- <Grid Grid.Row="2">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition Height="0.2*" />
- </Grid.RowDefinitions>
- <ListView
- Grid.Row="0"
- VerticalAlignment="Center"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding statusDown}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Columns="8"
- Rows="1" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
- <ListView.ItemTemplate>
- <DataTemplate>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="0.8*" />
- <RowDefinition Height="0.2*" />
- </Grid.RowDefinitions>
- <define:MaterialStock
- Margin="35,0,35,0"
- IsFaultState="{Binding IsFault}"
- IsLayOffState="{Binding IsLayOff}"
- IsOpenState="{Binding IsOpen}"
- IsRunning="{Binding IsRunning}" />
- <Grid Grid.Row="1" VerticalAlignment="Bottom">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <StackPanel>
- <ToggleButton
- Width="80"
- Height="30"
- Margin="5,0,5,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="Transparent"
- FontSize="20"
- IsChecked="{Binding IsOpen}"
- Style="{StaticResource SwitchToggleButtonStyle}" />
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- Foreground="AliceBlue"
- Text="仓盖控制" />
- </StackPanel>
-
- <StackPanel Grid.Column="1">
- <ToggleButton
- Width="80"
- Height="30"
- Margin="5,0,5,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="Transparent"
- FontSize="20"
- IsChecked="{Binding IsLayOff}"
- Style="{StaticResource SwitchToggleButtonStyle}" />
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- Foreground="AliceBlue"
- Text="出料控制" />
- </StackPanel>
- </Grid>
- </Grid>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>
- </Grid>
- </UserControl>
|