|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488 |
- <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>
|