244 lines
11 KiB
Plaintext
244 lines
11 KiB
Plaintext
|
|
<Window
|
||
|
|
x:Class="SHH.CameraDashboard.MainWindow"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:ctrl="clr-namespace:SHH.CameraDashboard"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
Title="SHH 视频中控"
|
||
|
|
Width="1366"
|
||
|
|
Height="768"
|
||
|
|
Background="{DynamicResource Brush.Bg.Window}"
|
||
|
|
FontFamily="{StaticResource Font.Normal}"
|
||
|
|
Foreground="{DynamicResource Brush.Text.Primary}"
|
||
|
|
WindowStartupLocation="CenterScreen"
|
||
|
|
mc:Ignorable="d">
|
||
|
|
|
||
|
|
<WindowChrome.WindowChrome>
|
||
|
|
<WindowChrome
|
||
|
|
CaptionHeight="0"
|
||
|
|
CornerRadius="0"
|
||
|
|
GlassFrameThickness="0"
|
||
|
|
ResizeBorderThickness="5" />
|
||
|
|
</WindowChrome.WindowChrome>
|
||
|
|
|
||
|
|
<Grid x:Name="RootGrid">
|
||
|
|
<Grid x:Name="AppLayout">
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="45" />
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<Border
|
||
|
|
Grid.Row="0"
|
||
|
|
Background="{DynamicResource Brush.Bg.Panel}"
|
||
|
|
BorderBrush="{DynamicResource Brush.Border}"
|
||
|
|
BorderThickness="0,0,0,1"
|
||
|
|
MouseDown="OnTitleBarMouseDown">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
|
||
|
|
<StackPanel
|
||
|
|
Grid.Column="0"
|
||
|
|
Margin="10,0"
|
||
|
|
Orientation="Horizontal">
|
||
|
|
<Button
|
||
|
|
Width="40"
|
||
|
|
Click="ToggleSidebar"
|
||
|
|
Content="≡"
|
||
|
|
FontSize="18"
|
||
|
|
FontWeight="Bold"
|
||
|
|
Style="{StaticResource Btn.Ghost}"
|
||
|
|
ToolTip="展开/收起侧边栏" />
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
<TextBlock
|
||
|
|
Grid.Column="1"
|
||
|
|
HorizontalAlignment="Center"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
FontSize="{StaticResource Size.Font.Large}"
|
||
|
|
FontWeight="Bold"
|
||
|
|
Foreground="{DynamicResource Brush.Text.Primary}"
|
||
|
|
IsHitTestVisible="False"
|
||
|
|
Text="SHH 视频中控平台" />
|
||
|
|
|
||
|
|
<StackPanel
|
||
|
|
Grid.Column="2"
|
||
|
|
Margin="0,0,10,0"
|
||
|
|
Orientation="Horizontal">
|
||
|
|
<Button
|
||
|
|
Width="40"
|
||
|
|
Margin="0,0,5,0"
|
||
|
|
Click="OpenWizard"
|
||
|
|
Content="🧙♂️"
|
||
|
|
Style="{StaticResource Btn.Ghost}"
|
||
|
|
ToolTip="打开配置向导" />
|
||
|
|
<Button
|
||
|
|
Width="40"
|
||
|
|
Margin="0,0,15,0"
|
||
|
|
Click="ToggleTheme"
|
||
|
|
Content="🎨"
|
||
|
|
Style="{StaticResource Btn.Ghost}"
|
||
|
|
ToolTip="切换皮肤 (Dark/Light)" />
|
||
|
|
<Button
|
||
|
|
Width="40"
|
||
|
|
Click="OnMinimize"
|
||
|
|
Content="—"
|
||
|
|
Style="{StaticResource Btn.Ghost}"
|
||
|
|
ToolTip="最小化" />
|
||
|
|
<Button
|
||
|
|
Width="40"
|
||
|
|
Margin="5,0,0,0"
|
||
|
|
Click="OnClose"
|
||
|
|
Content="✕"
|
||
|
|
Style="{StaticResource Btn.Danger}"
|
||
|
|
ToolTip="关闭" />
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<Grid Grid.Row="1">
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="Auto" />
|
||
|
|
<ColumnDefinition Width="*" />
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
|
||
|
|
<ctrl:CameraListControl
|
||
|
|
x:Name="Sidebar"
|
||
|
|
Grid.Column="0"
|
||
|
|
Width="250" />
|
||
|
|
|
||
|
|
<Border
|
||
|
|
Grid.Column="0"
|
||
|
|
Width="1"
|
||
|
|
HorizontalAlignment="Right"
|
||
|
|
Background="{DynamicResource Brush.Border}" />
|
||
|
|
|
||
|
|
<Grid
|
||
|
|
Grid.Column="1"
|
||
|
|
Background="{DynamicResource Brush.Bg.Window}"
|
||
|
|
ClipToBounds="True">
|
||
|
|
<ctrl:DeviceHomeControl x:Name="DeviceHome" Margin="0" />
|
||
|
|
|
||
|
|
<Border
|
||
|
|
x:Name="RightConfigPanel"
|
||
|
|
Width="350"
|
||
|
|
HorizontalAlignment="Right"
|
||
|
|
Background="{DynamicResource Brush.Bg.Panel}"
|
||
|
|
BorderBrush="{DynamicResource Brush.Border}"
|
||
|
|
BorderThickness="1,0,0,0"
|
||
|
|
Visibility="Collapsed">
|
||
|
|
<Border.Effect>
|
||
|
|
<DropShadowEffect
|
||
|
|
BlurRadius="20"
|
||
|
|
Direction="180"
|
||
|
|
Opacity="0.3"
|
||
|
|
ShadowDepth="5"
|
||
|
|
Color="Black" />
|
||
|
|
</Border.Effect>
|
||
|
|
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="50" />
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
<RowDefinition Height="60" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
|
||
|
|
<Border BorderBrush="{DynamicResource Brush.Border}" BorderThickness="0,0,0,1">
|
||
|
|
<DockPanel Margin="15,0" LastChildFill="False">
|
||
|
|
<TextBlock
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
FontSize="{StaticResource Size.Font.Large}"
|
||
|
|
FontWeight="Bold"
|
||
|
|
Text="⚙️ 设备参数配置" />
|
||
|
|
<Button
|
||
|
|
Width="30"
|
||
|
|
Padding="0"
|
||
|
|
Click="CloseRightPanel"
|
||
|
|
Content="✕"
|
||
|
|
DockPanel.Dock="Right"
|
||
|
|
Style="{StaticResource Btn.Ghost}" />
|
||
|
|
</DockPanel>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<StackPanel Grid.Row="1" Margin="20">
|
||
|
|
<TextBlock
|
||
|
|
Margin="0,10,0,5"
|
||
|
|
Foreground="{DynamicResource Brush.Text.Secondary}"
|
||
|
|
Text="设备名称" />
|
||
|
|
<TextBox Padding="5" Text="Camera #01" />
|
||
|
|
<TextBlock
|
||
|
|
Margin="0,15,0,5"
|
||
|
|
Foreground="{DynamicResource Brush.Text.Secondary}"
|
||
|
|
Text="流媒体协议" />
|
||
|
|
<ComboBox
|
||
|
|
Height="32"
|
||
|
|
Padding="5"
|
||
|
|
SelectedIndex="0">
|
||
|
|
<ComboBoxItem>RTSP (TCP)</ComboBoxItem>
|
||
|
|
<ComboBoxItem>RTSP (UDP)</ComboBoxItem>
|
||
|
|
<ComboBoxItem>WebRTC</ComboBoxItem>
|
||
|
|
</ComboBox>
|
||
|
|
<TextBlock
|
||
|
|
Margin="0,15,0,5"
|
||
|
|
Foreground="{DynamicResource Brush.Text.Secondary}"
|
||
|
|
Text="主码流地址" />
|
||
|
|
<TextBox
|
||
|
|
Height="80"
|
||
|
|
Padding="5"
|
||
|
|
VerticalContentAlignment="Top"
|
||
|
|
Text="rtsp://admin:123456@192.168.1.20:554/h264/ch1/main/av_stream"
|
||
|
|
TextWrapping="Wrap" />
|
||
|
|
</StackPanel>
|
||
|
|
|
||
|
|
<Border
|
||
|
|
Grid.Row="2"
|
||
|
|
Background="{DynamicResource Brush.Bg.Window}"
|
||
|
|
BorderBrush="{DynamicResource Brush.Border}"
|
||
|
|
BorderThickness="0,1,0,0">
|
||
|
|
<StackPanel
|
||
|
|
Margin="15,0"
|
||
|
|
HorizontalAlignment="Right"
|
||
|
|
Orientation="Horizontal">
|
||
|
|
<Button
|
||
|
|
Margin="0,0,10,0"
|
||
|
|
Click="CloseRightPanel"
|
||
|
|
Content="取消"
|
||
|
|
Style="{StaticResource Btn.Ghost}" />
|
||
|
|
<Button
|
||
|
|
Width="100"
|
||
|
|
Background="{DynamicResource Brush.Accent}"
|
||
|
|
Click="CloseRightPanel"
|
||
|
|
Content="保存配置" />
|
||
|
|
</StackPanel>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
</Grid>
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<ctrl:BottomDockControl x:Name="BottomDock" Grid.Row="2" />
|
||
|
|
</Grid>
|
||
|
|
|
||
|
|
<Grid x:Name="ModalLayer" Visibility="Collapsed">
|
||
|
|
<Border Background="#99000000" MouseDown="CloseModal_Click" />
|
||
|
|
<ContentControl
|
||
|
|
x:Name="ModalContainer"
|
||
|
|
HorizontalAlignment="Center"
|
||
|
|
VerticalAlignment="Center">
|
||
|
|
<ContentControl.Effect>
|
||
|
|
<DropShadowEffect
|
||
|
|
BlurRadius="30"
|
||
|
|
Opacity="0.5"
|
||
|
|
ShadowDepth="10"
|
||
|
|
Color="Black" />
|
||
|
|
</ContentControl.Effect>
|
||
|
|
</ContentControl>
|
||
|
|
</Grid>
|
||
|
|
</Grid>
|
||
|
|
</Window>
|