139 lines
9.5 KiB
XML
139 lines
9.5 KiB
XML
<pi:UserControlBase x:Class="货架标准上位机.DeviceView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:货架标准上位机"
|
|
mc:Ignorable="d"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
xmlns:pi="https://github.com/ping9719/wpfex"
|
|
d:DesignHeight="450" d:DesignWidth="800" LoadedVisibleFirst="visfir" IsVisibleChanged="vis">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<GroupBox Header="模式选择" Margin="3" Style="{StaticResource GroupBoxTab}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Margin="5,3" Padding="30,0" Content="初始化"></Button>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
|
|
<hc:ScrollViewer Grid.Row="1" Margin="3,3" IsInertiaEnabled="True" hc:ScrollViewerAttach.AutoHide="True">
|
|
<StackPanel Margin="0" Orientation="Vertical">
|
|
<!--监听-->
|
|
<Border Style="{StaticResource BorderRegion}" Effect="{StaticResource EffectShadow1}" Visibility="{Binding IsVisRead,Converter={StaticResource Boolean2VisibilityConverter}}">
|
|
<Expander Style="{StaticResource BaseStyle}" Margin="0" Header="监听" IsExpanded="{Binding IsVisExpRead}">
|
|
<hc:TransitioningContentControl TransitionMode="Top2BottomWithFade">
|
|
<!--<local:IotReadListView Margin="0,10,0,0" Data="{Binding DataRead}"/>-->
|
|
<StackPanel x:Name="stackPanel1">
|
|
<StackPanel.Resources>
|
|
<ResourceDictionary>
|
|
<Style TargetType="pi:IotStateInfo" BasedOn="{StaticResource IotStateInfoStyle}">
|
|
<Setter Property="Width" Value="150"></Setter>
|
|
<Setter Property="Margin" Value="3,1"></Setter>
|
|
<!--<Setter Property="BorderThickness" Value="1"></Setter>-->
|
|
<Setter Property="Opacity" Value="0.8"></Setter>
|
|
<Setter Property="OkBrush" Value="DarkTurquoise"></Setter>
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</StackPanel.Resources>
|
|
<WrapPanel>
|
|
<pi:IotStateInfo Header="传感器1" Value="false"></pi:IotStateInfo>
|
|
<pi:IotStateInfo Header="传感器2" Value="True"></pi:IotStateInfo>
|
|
</WrapPanel>
|
|
<Expander Header="分组1" IsExpanded="True" BorderThickness="0" Background="{StaticResource DefaultBrush}">
|
|
<WrapPanel>
|
|
<pi:IotStateInfo Header="温度1" Value="1.23"></pi:IotStateInfo>
|
|
</WrapPanel>
|
|
</Expander>
|
|
</StackPanel>
|
|
</hc:TransitioningContentControl>
|
|
</Expander>
|
|
</Border>
|
|
<!--控制-->
|
|
<Border Margin="0,10,0,0" Style="{StaticResource BorderRegion}" Effect="{StaticResource EffectShadow1}" Visibility="{Binding IsVisWrite,Converter={StaticResource Boolean2VisibilityConverter}}">
|
|
<Expander Style="{StaticResource BaseStyle}" Margin="0" Header="控制" IsExpanded="{Binding IsVisExpWrite}">
|
|
<hc:TransitioningContentControl TransitionMode="Top2BottomWithFade">
|
|
<!--<local:IotWriteListView Margin="0,10,0,0" Data="{Binding DataWrite}"/>-->
|
|
<StackPanel x:Name="stackPanel2">
|
|
<StackPanel.Resources>
|
|
<ResourceDictionary>
|
|
<Style TargetType="pi:IotStateInfo" BasedOn="{StaticResource IotStateInfoStyle}">
|
|
<Setter Property="Width" Value="150"></Setter>
|
|
<Setter Property="Margin" Value="3,1"></Setter>
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</StackPanel.Resources>
|
|
<WrapPanel>
|
|
<pi:IotStateInfo Header="传感器1" Value="false"></pi:IotStateInfo>
|
|
<pi:IotStateInfo Header="传感器2" Value="True"></pi:IotStateInfo>
|
|
</WrapPanel>
|
|
<Expander Header="分组1" IsExpanded="True" BorderThickness="0" Background="{StaticResource DefaultBrush}">
|
|
<WrapPanel>
|
|
<pi:IotStateInfo Header="温度1" Value="1.23"></pi:IotStateInfo>
|
|
</WrapPanel>
|
|
</Expander>
|
|
</StackPanel>
|
|
</hc:TransitioningContentControl>
|
|
</Expander>
|
|
</Border>
|
|
<!--气缸-->
|
|
<Border Margin="0,10,0,0" Style="{StaticResource BorderRegion}" Effect="{StaticResource EffectShadow1}" Visibility="{Binding IsVisUrn,Converter={StaticResource Boolean2VisibilityConverter}}">
|
|
<Expander Style="{StaticResource BaseStyle}" Margin="0" Header="气缸" IsExpanded="{Binding IsVisExpUrn}">
|
|
<hc:TransitioningContentControl TransitionMode="Top2BottomWithFade">
|
|
<!--<local:IotUrnListView Margin="0,10,0,0" Data="{Binding DataUrn}"/>-->
|
|
<StackPanel x:Name="stackPanel3">
|
|
<StackPanel.Resources>
|
|
<ResourceDictionary>
|
|
<Style TargetType="pi:IotUrnMode" BasedOn="{StaticResource IotUrnModeStyle}">
|
|
<Setter Property="Margin" Value="3,1"></Setter>
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</StackPanel.Resources>
|
|
<WrapPanel>
|
|
<pi:IotUrnMode Text="气缸1"></pi:IotUrnMode>
|
|
<pi:IotUrnMode Text="气缸1" IsButBadge1="True"></pi:IotUrnMode>
|
|
</WrapPanel>
|
|
<Expander Header="分组1" IsExpanded="True" BorderThickness="0" Background="{StaticResource DefaultBrush}">
|
|
<WrapPanel>
|
|
<pi:IotUrnMode Text="气缸1"></pi:IotUrnMode>
|
|
</WrapPanel>
|
|
</Expander>
|
|
</StackPanel>
|
|
</hc:TransitioningContentControl>
|
|
</Expander>
|
|
</Border>
|
|
<!--伺服-->
|
|
<Border Margin="0,10,0,0" Style="{StaticResource BorderRegion}" Effect="{StaticResource EffectShadow1}" Visibility="{Binding IsVisServo,Converter={StaticResource Boolean2VisibilityConverter}}">
|
|
<Expander Style="{StaticResource BaseStyle}" Margin="0" Header="伺服" IsExpanded="{Binding IsVisExpServo}">
|
|
<hc:TransitioningContentControl TransitionMode="Top2BottomWithFade">
|
|
<!--<local:IotServoListView Margin="0,10,0,0" Data="{Binding DataServo}"/>-->
|
|
<StackPanel x:Name="stackPanel4">
|
|
<StackPanel.Resources>
|
|
<ResourceDictionary>
|
|
<Style TargetType="pi:IotServoMode" BasedOn="{StaticResource IotServoModeStyle}">
|
|
<Setter Property="Margin" Value="3,1"></Setter>
|
|
<Setter Property="VerticalAlignment" Value="Top"></Setter>
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</StackPanel.Resources>
|
|
<WrapPanel>
|
|
<pi:IotServoMode Text="伺服1"/>
|
|
<pi:IotServoMode Text="伺服1"/>
|
|
</WrapPanel>
|
|
<Expander Header="分组1" IsExpanded="True" BorderThickness="0" Background="{StaticResource DefaultBrush}">
|
|
<WrapPanel>
|
|
<pi:IotServoMode Text="伺服1"/>
|
|
<pi:IotServoMode Text="伺服1"/>
|
|
</WrapPanel>
|
|
</Expander>
|
|
</StackPanel>
|
|
</hc:TransitioningContentControl>
|
|
</Expander>
|
|
</Border>
|
|
</StackPanel>
|
|
</hc:ScrollViewer>
|
|
</Grid>
|
|
</pi:UserControlBase>
|