199 lines
8.6 KiB
XML
199 lines
8.6 KiB
XML
<UserControl
|
|
x:Class="SHH.CameraDashboard.DeviceHomeControl"
|
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
d:DesignHeight="600"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
|
|
<Grid Background="{DynamicResource Brush.Bg.Window}">
|
|
|
|
<Grid x:Name="EmptyView" Visibility="Visible">
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
FontSize="60"
|
|
Foreground="{DynamicResource Brush.Text.Primary}"
|
|
Opacity="0.2"
|
|
Text="📺" />
|
|
<TextBlock
|
|
Margin="0,20,0,0"
|
|
HorizontalAlignment="Center"
|
|
FontSize="16"
|
|
Foreground="{DynamicResource Brush.Text.Secondary}"
|
|
Text="请在左侧选择一台设备以查看详情" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<Grid x:Name="DetailView" Visibility="Collapsed">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="60" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border
|
|
Grid.Row="0"
|
|
Padding="20,0"
|
|
BorderBrush="{DynamicResource Brush.Border}"
|
|
BorderThickness="0,0,0,1">
|
|
<DockPanel>
|
|
<StackPanel VerticalAlignment="Center" Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="0,0,15,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="24"
|
|
Text="📷" />
|
|
<StackPanel VerticalAlignment="Center">
|
|
<TextBlock
|
|
x:Name="TxtName"
|
|
FontSize="18"
|
|
FontWeight="Bold"
|
|
Foreground="{DynamicResource Brush.Text.Primary}"
|
|
Text="Camera #001" />
|
|
<StackPanel Margin="0,5,0,0" Orientation="Horizontal">
|
|
<Border
|
|
x:Name="BadgeStatus"
|
|
Margin="0,0,10,0"
|
|
Padding="6,2"
|
|
Background="#224ec9b0"
|
|
CornerRadius="4">
|
|
<TextBlock
|
|
x:Name="TxtStatus"
|
|
FontSize="11"
|
|
FontWeight="Bold"
|
|
Foreground="{DynamicResource Brush.Status.Success}"
|
|
Text="在线" />
|
|
</Border>
|
|
<TextBlock
|
|
x:Name="TxtIp"
|
|
VerticalAlignment="Center"
|
|
FontSize="12"
|
|
Foreground="{DynamicResource Brush.Text.Secondary}"
|
|
Text="192.168.1.100" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
VerticalAlignment="Center"
|
|
DockPanel.Dock="Right"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Margin="5,0"
|
|
Content="⚙️ 配置"
|
|
Style="{StaticResource Btn.Ghost}" />
|
|
<Button
|
|
Margin="5,0"
|
|
Content="🔄 重启"
|
|
Style="{StaticResource Btn.Ghost}" />
|
|
</StackPanel>
|
|
</DockPanel>
|
|
</Border>
|
|
|
|
<Grid Grid.Row="1" Margin="20">
|
|
<Border Background="Black" CornerRadius="{StaticResource Radius.Normal}">
|
|
<Grid>
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
FontSize="20"
|
|
Foreground="#444"
|
|
Text="Live Stream" />
|
|
<TextBlock
|
|
x:Name="TxtStreamUrl"
|
|
Margin="0,10,0,0"
|
|
Foreground="#333"
|
|
Text="rtsp://..." />
|
|
|
|
<ProgressBar
|
|
Width="150"
|
|
Height="2"
|
|
Margin="0,20,0,0"
|
|
IsIndeterminate="True"
|
|
Opacity="0.5" />
|
|
</StackPanel>
|
|
|
|
<TextBlock
|
|
Margin="15"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Top"
|
|
FontSize="16"
|
|
FontWeight="Bold"
|
|
Foreground="White"
|
|
Opacity="0.8"
|
|
Text="{Binding ElementName=TxtName, Path=Text}">
|
|
<TextBlock.Effect>
|
|
<DropShadowEffect
|
|
BlurRadius="3"
|
|
Opacity="0.8"
|
|
ShadowDepth="2"
|
|
Color="Black" />
|
|
</TextBlock.Effect>
|
|
</TextBlock>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="2" Margin="20,0,20,20">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Border
|
|
Margin="0,0,10,0"
|
|
Padding="15"
|
|
Background="{DynamicResource Brush.Bg.Panel}"
|
|
CornerRadius="5">
|
|
<StackPanel>
|
|
<TextBlock Foreground="{DynamicResource Brush.Text.Secondary}" Text="实时帧率" />
|
|
<TextBlock
|
|
Margin="0,5,0,0"
|
|
FontSize="20"
|
|
FontWeight="Bold"
|
|
Foreground="{DynamicResource Brush.Text.Primary}"
|
|
Text="25 FPS" />
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border
|
|
Grid.Column="1"
|
|
Margin="5,0"
|
|
Padding="15"
|
|
Background="{DynamicResource Brush.Bg.Panel}"
|
|
CornerRadius="5">
|
|
<StackPanel>
|
|
<TextBlock Foreground="{DynamicResource Brush.Text.Secondary}" Text="累计丢包" />
|
|
<TextBlock
|
|
Margin="0,5,0,0"
|
|
FontSize="20"
|
|
FontWeight="Bold"
|
|
Foreground="{DynamicResource Brush.Text.Primary}"
|
|
Text="0.02%" />
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border
|
|
Grid.Column="2"
|
|
Margin="10,0,0,0"
|
|
Padding="15"
|
|
Background="{DynamicResource Brush.Bg.Panel}"
|
|
CornerRadius="5">
|
|
<StackPanel>
|
|
<TextBlock Foreground="{DynamicResource Brush.Text.Secondary}" Text="运行时间" />
|
|
<TextBlock
|
|
Margin="0,5,0,0"
|
|
FontSize="20"
|
|
FontWeight="Bold"
|
|
Foreground="{DynamicResource Brush.Text.Primary}"
|
|
Text="12d 4h 20m" />
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl> |