增加摄像头中控台项目
This commit is contained in:
172
SHH.CameraDashboard/App/WizardControl.xaml
Normal file
172
SHH.CameraDashboard/App/WizardControl.xaml
Normal file
@@ -0,0 +1,172 @@
|
||||
<UserControl
|
||||
x:Class="SHH.CameraDashboard.WizardControl"
|
||||
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"
|
||||
Width="800"
|
||||
Height="550"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Border
|
||||
Background="{DynamicResource Brush.Bg.Window}"
|
||||
BorderBrush="{DynamicResource Brush.Border.Focus}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="{StaticResource Radius.Normal}">
|
||||
<Grid Margin="25">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" Margin="0,0,0,20">
|
||||
<DockPanel LastChildFill="False">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontSize="{StaticResource Size.Font.Huge}"
|
||||
FontWeight="Bold"
|
||||
Foreground="{DynamicResource Brush.Text.Primary}"
|
||||
Text="📡 服务节点配置" />
|
||||
<Button
|
||||
Width="30"
|
||||
Height="30"
|
||||
Click="Cancel_Click"
|
||||
Content="✕"
|
||||
DockPanel.Dock="Right"
|
||||
Style="{StaticResource Btn.Ghost}" />
|
||||
</DockPanel>
|
||||
<TextBlock
|
||||
Margin="0,10,0,0"
|
||||
Foreground="{DynamicResource Brush.Text.Secondary}"
|
||||
Text="请添加或修改后端的 IP 地址与端口,配置将用于聚合监控数据。" />
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border
|
||||
Padding="10"
|
||||
Background="{DynamicResource Brush.Bg.Panel}"
|
||||
BorderBrush="{DynamicResource Brush.Border}"
|
||||
BorderThickness="1,1,1,0">
|
||||
<DockPanel LastChildFill="False">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Text="节点清单" />
|
||||
<Button
|
||||
Height="26"
|
||||
Padding="15,0"
|
||||
Background="{DynamicResource Brush.Accent}"
|
||||
BorderThickness="0"
|
||||
Click="AddNode_Click"
|
||||
Content="+ 新增一行"
|
||||
DockPanel.Dock="Right"
|
||||
Style="{StaticResource {x:Type Button}}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<ListView
|
||||
x:Name="NodeList"
|
||||
Grid.Row="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="{DynamicResource Brush.Border}"
|
||||
BorderThickness="1"
|
||||
ItemContainerStyle="{StaticResource Style.ListViewItem.Table}">
|
||||
<ListView.View>
|
||||
<GridView ColumnHeaderContainerStyle="{StaticResource Style.GridViewHeader.Flat}">
|
||||
<GridViewColumn Width="180" Header="节点名称">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBox Style="{StaticResource Style.TextBox.InTable}" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn Width="180" Header="IP 地址">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBox Style="{StaticResource Style.TextBox.InTable}" Text="{Binding Ip, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn Width="100" Header="端口">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBox Style="{StaticResource Style.TextBox.InTable}" Text="{Binding Port, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn Width="180" Header="连通性状态">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Border
|
||||
Padding="8,2"
|
||||
HorizontalAlignment="Left"
|
||||
Background="#11000000"
|
||||
CornerRadius="4">
|
||||
<TextBlock
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Foreground="{Binding StatusColor}"
|
||||
Text="{Binding Status}" />
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn Width="80" Header="操作">
|
||||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button
|
||||
Width="45"
|
||||
Height="24"
|
||||
Padding="0"
|
||||
Click="DeleteNode_Click"
|
||||
Content="删除"
|
||||
FontSize="11"
|
||||
Style="{StaticResource Btn.Danger}" />
|
||||
</DataTemplate>
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
</Grid>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Margin="0,20,0,0"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="0,0,15,0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"
|
||||
Foreground="{DynamicResource Brush.Text.Secondary}"
|
||||
Text="修改后请点击检测 →" />
|
||||
<Button
|
||||
Width="110"
|
||||
Height="32"
|
||||
Margin="0,0,10,0"
|
||||
Click="Check_Click"
|
||||
Content="🔍 立即检测"
|
||||
Style="{StaticResource Btn.Ghost}" />
|
||||
<Button
|
||||
Width="120"
|
||||
Height="32"
|
||||
Background="{DynamicResource Brush.Accent}"
|
||||
BorderThickness="0"
|
||||
Click="Apply_Click"
|
||||
Content="保存并应用"
|
||||
Foreground="White" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user