|
- <UserControl
- x:Class="BPASmartClient.DosingSystemSingle.View.HardwareStatusView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.DosingSystemSingle.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.DosingSystemSingle.ViewModel"
- d:DesignHeight="1080"
- d:DesignWidth="1920"
- mc:Ignorable="d">
-
- <UserControl.DataContext>
- <vm:HardwareStatusViewModel />
- </UserControl.DataContext>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="0.8*" />
- <RowDefinition />
- <RowDefinition Height="0.8*" />
- </Grid.RowDefinitions>
-
- <!--#region 顶部料仓-->
- <Grid Name="TopGrid">
- <ListView
- Height="{Binding ElementName=TopGrid, Path=ActualHeight}"
- VerticalAlignment="Center"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding TopDeviceCurrentStatuses}"
- ScrollViewer.VerticalScrollBarVisibility="Disabled"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <!--<WrapPanel Orientation="Horizontal" IsItemsHost="True"/>-->
- <UniformGrid
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Columns="8"
- Rows="1" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
-
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border Margin="5" Background="Transparent">
- <Grid Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition Height="0.6*" />
- </Grid.RowDefinitions>
-
- <StackPanel Grid.Row="1">
- <StackPanel
- Grid.Row="1"
- Margin="0,2,0,0"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- FontSize="20"
- Foreground="#FF0084FF"
- Text="{Binding Weight}" />
-
- <TextBlock
- FontSize="20"
- Foreground="#FF0084FF"
- Text=" kg" />
- </StackPanel>
-
- <StackPanel
- Grid.Row="1"
- Margin="0,2,0,0"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- FontSize="20"
- Foreground="#FF0084FF"
- Text="{Binding DeviceNum}" />
-
- <TextBlock
- FontSize="20"
- Foreground="#FF0084FF"
- Text=" 号仓" />
- </StackPanel>
-
- <TextBlock
- Grid.Row="1"
- Margin="0,2,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#FF0084FF"
- Text="{Binding DeviceName}" />
-
- </StackPanel>
-
- <Grid Grid.Row="2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <StackPanel Background="Transparent">
- <Ellipse
- Width="30"
- Height="30"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Fill="{Binding BucketFlagbit, Converter={StaticResource BoolToFillColorConverter}}"
- RenderTransformOrigin="0.5,0.5">
- <Ellipse.OpacityMask>
- <RadialGradientBrush>
- <GradientStop Offset="0" Color="Transparent" />
- <GradientStop Offset="1" Color="#00c2f4" />
- </RadialGradientBrush>
- </Ellipse.OpacityMask>
- <!--<Ellipse.RenderTransform>
- <ScaleTransform x:Name="Scale" />
- </Ellipse.RenderTransform>-->
- </Ellipse>
-
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- FontSize="16"
- Foreground="#00c2f4"
- Text="到位检测" />
- </StackPanel>
-
- <StackPanel Name="skp" Grid.Column="1">
- <ToggleButton
- Width="80"
- Height="30"
- Margin="5,0,5,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="Transparent"
- Command="{Binding DataContext.RecipeControlCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding}"
- FontSize="20"
- IsChecked="{Binding BaitingControl}"
- Style="{StaticResource SwitchToggleButtonStyle}" />
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- FontSize="16"
- Foreground="#00c2f4"
- Text="出料控制" />
- </StackPanel>
-
- </Grid>
-
- <Image
- Margin="20,30,20,0"
- Source="/BPASmartClient.CustomResource;component/Image/荧光/矩形发光.png"
- Stretch="Fill"
- Visibility="{Binding IsOpen, Converter={StaticResource BoolToVisibilityConvert}}" />
-
- <Image Source="/BPASmartClient.CustomResource;component/Image/荧光/29.png" Visibility="{Binding BaitingControl, Converter={StaticResource BoolToVisibilityConvert}}" />
-
- <Image
- Grid.RowSpan="2"
- Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
- Stretch="Fill" />
-
- <Grid
- Name="WeightGr"
- Height="45"
- Margin="20,-30,20,0">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/荧光/蓝色提示框.png" />
- </Grid.Background>
- <TextBox
- Name="outName"
- Width="{Binding ElementName=WeightGr, Path=ActualWidth}"
- Height="{Binding ElementName=WeightGr, Path=ActualHeight}"
- Margin="0,-2,0,0"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="Transparent"
- BorderThickness="0"
- CaretBrush="#009dff"
- FontSize="20"
- Foreground="#009dff"
- Text="{Binding SetWeight}" />
-
- </Grid>
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>
- <!--#endregion-->
-
- <!--#region 输送带-->
- <Grid
- x:Name="gr"
- Grid.Row="1"
- Background="Transparent">
- <!--<pry:ConveyorBelt
- Grid.Row="1"
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- Margin="10,0,30,0"
- ConveyorBeltWidth="70"
- Direction="0"
- StrokeBrush="#00BEFA"
- StrokeDashArray="1.5 1.5"
- StrokeFillBrush="#00BEFA"
- StrokeThickness="2" />-->
-
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <Grid Grid.Row="2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <!--<Ellipse
- Width="30"
- Height="30"
- HorizontalAlignment="Center"
- VerticalAlignment="Bottom"
- Fill="{Binding OnDetection, Converter={StaticResource BoolToFillColorConverter}}"
- RenderTransformOrigin="0.5,0.5">
- <Ellipse.OpacityMask>
- <RadialGradientBrush>
- <GradientStop Offset="0" Color="Transparent" />
- <GradientStop Offset="1" Color="#00c2f4" />
- </RadialGradientBrush>
- </Ellipse.OpacityMask>
- </Ellipse>
-
- <Ellipse
- Grid.Column="5"
- Width="30"
- Height="30"
- HorizontalAlignment="Center"
- VerticalAlignment="Bottom"
- Fill="{Binding UnderDetection, Converter={StaticResource BoolToFillColorConverter}}"
- RenderTransformOrigin="0.5,0.5">
- <Ellipse.OpacityMask>
- <RadialGradientBrush>
- <GradientStop Offset="0" Color="Transparent" />
- <GradientStop Offset="1" Color="#00c2f4" />
- </RadialGradientBrush>
- </Ellipse.OpacityMask>
- </Ellipse>-->
- </Grid>
-
- <Grid Grid.Row="3">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <!--<TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- FontSize="16"
- Foreground="#00c2f4"
- Text="上桶工位检测" />
-
- <TextBlock
- Grid.Column="5"
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- FontSize="16"
- Foreground="#00c2f4"
- Text="下桶工位检测" />-->
- </Grid>
-
- <pry:ConveyBelt2
- Grid.RowSpan="4"
- Margin="-12,0,10,0"
- BeltDashThickess="50"
- BeltHeight="{Binding ElementName=gr, Path=ActualHeight}"
- BeltWidth="{Binding ElementName=gr, Path=ActualWidth}"
- IsRun="{Binding ConveyerBeltStatus}" />
-
- <!--<StackPanel
- Grid.Row="1"
- Margin="20,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Orientation="Horizontal">
- <TextBlock
- Margin="0,0,5,0"
- FontSize="20"
- Foreground="#00c2f4"
- Text="输送带控制" />
- <ToggleButton
- Width="80"
- Height="30"
- Margin="5,0,5,0"
- Background="Transparent"
- FontSize="20"
- IsChecked="{Binding ConveyerBeltWork}"
- Style="{StaticResource SwitchToggleButtonStyle}" />
- </StackPanel>-->
-
- </Grid>
- <!--#endregion-->
-
- <!--#region 底部料仓-->
- <Grid Grid.Row="2">
- <ListView
- VerticalAlignment="Center"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding BottomDeviceCurrentStatuses}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Columns="8"
- Rows="1" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
-
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border Margin="5" Background="Transparent">
- <Grid Height="270" Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- <RowDefinition Height="0.6*" />
- </Grid.RowDefinitions>
-
- <StackPanel Grid.Row="1">
- <StackPanel
- Grid.Row="1"
- Margin="0,2,0,0"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- FontSize="20"
- Foreground="#FF0084FF"
- Text="{Binding Weight}" />
-
- <TextBlock
- FontSize="20"
- Foreground="#FF0084FF"
- Text=" kg" />
- </StackPanel>
-
- <StackPanel
- Grid.Row="1"
- Margin="0,2,0,0"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock
- FontSize="20"
- Foreground="#FF0084FF"
- Text="{Binding DeviceNum}" />
-
- <TextBlock
- FontSize="20"
- Foreground="#FF0084FF"
- Text=" 号仓" />
- </StackPanel>
-
- <TextBlock
- Grid.Row="1"
- Margin="0,2,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#FF0084FF"
- Text="{Binding DeviceName}" />
-
- </StackPanel>
-
- <StackPanel Grid.Row="2" Orientation="Horizontal">
- <StackPanel Background="Transparent">
- <Ellipse
- Width="30"
- Height="30"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Fill="{Binding BucketFlagbit, Converter={StaticResource BoolToFillColorConverter}}"
- RenderTransformOrigin="0.5,0.5">
- <Ellipse.OpacityMask>
- <RadialGradientBrush>
- <GradientStop Offset="0" Color="Transparent" />
- <GradientStop Offset="1" Color="#00c2f4" />
- </RadialGradientBrush>
- </Ellipse.OpacityMask>
- <!--<Ellipse.RenderTransform>
- <ScaleTransform x:Name="Scale" />
- </Ellipse.RenderTransform>-->
- </Ellipse>
-
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- FontSize="16"
- Foreground="#00c2f4"
- Text="到位检测" />
- </StackPanel>
-
-
- <StackPanel>
- <ToggleButton
- Width="80"
- Height="30"
- Margin="5,0,5,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="Transparent"
- FontSize="20"
- IsChecked="{Binding BaitingControl}"
- Style="{StaticResource SwitchToggleButtonStyle}" />
- <TextBlock
- Margin="0,5,0,0"
- HorizontalAlignment="Center"
- FontSize="16"
- Foreground="#00c2f4"
- Text="出料控制" />
- </StackPanel>
-
- </StackPanel>
-
- <Image
- Margin="20,30,20,0"
- Source="/BPASmartClient.CustomResource;component/Image/荧光/矩形发光.png"
- Stretch="Fill"
- Visibility="{Binding IsOpen, Converter={StaticResource BoolToVisibilityConvert}}" />
-
- <Image Source="/BPASmartClient.CustomResource;component/Image/荧光/29.png" Visibility="{Binding BaitingControl, Converter={StaticResource BoolToVisibilityConvert}}" />
-
- <Image
- Grid.RowSpan="2"
- Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
- Stretch="Fill" />
-
- <Grid
- Name="WeightGr"
- Height="45"
- Margin="20,-30,20,0">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/荧光/蓝色提示框.png" />
- </Grid.Background>
- <TextBox
- Name="outName"
- Width="{Binding ElementName=WeightGr, Path=ActualWidth}"
- Height="{Binding ElementName=WeightGr, Path=ActualHeight}"
- Margin="0,-2,0,0"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="Transparent"
- BorderThickness="0"
- CaretBrush="#009dff"
- FontSize="20"
- Foreground="#009dff"
- Text="{Binding SetWeight}" />
-
- </Grid>
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </Grid>
- <!--#endregion-->
-
- </Grid>
- </UserControl>
|