You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

261 lines
10 KiB

<UserControl xmlns="https://github.com/avaloniaui"
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"
xmlns:controls="using:Material.Styles.Controls"
xmlns:assists="using:Material.Styles.Assists"
xmlns:icons="using:Material.Icons.Avalonia"
x:Class="JiLinApp.Pages.PtzServer.Ptz"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="550">
<UserControl.Styles>
<Style Selector="StackPanel">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<!--ComSetPanel-->
<Style Selector="#ComSetPanel ComboBox">
<Setter Property="Width" Value="200" />
</Style>
<Style Selector="#ComSetPanel WrapPanel">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style Selector="#ComSetPanel WrapPanel Button">
<Setter Property="Width" Value="100" />
<Setter Property="Margin" Value="5" />
</Style>
<!--DeviceSetPanel-->
<Style Selector="#DeviceSetPanel ComboBox">
<Setter Property="Width" Value="200" />
</Style>
<Style Selector="#DeviceSetPanel Button">
<Setter Property="Width" Value="100" />
<Setter Property="Margin" Value="5" />
</Style>
<!--PtzSetPanel-->
<Style Selector="#PtzSetPanel ComboBox">
<Setter Property="Width" Value="160" />
</Style>
<!--PtzSelectPanel-->
<!--PtzCtrlPanel-->
<Style Selector="#PtzSetPanel Grid[Name=PtzCtrlPanel]">
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
<Style Selector="#PtzCtrlPanel StackPanel">
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style Selector="#PtzCtrlPanel StackPanel Button">
<Setter Property="Width" Value="45" />
<Setter Property="Height" Value="45" />
<Setter Property="Padding" Value="0" />
</Style>
<Style Selector="#PtzCtrlPanel StackPanel[(Grid.Column)=4] Button">
<Setter Property="Width" Value="35" />
<Setter Property="Height" Value="35" />
<Setter Property="Padding" Value="0" />
</Style>
<Style Selector="#PtzCtrlPanel StackPanel[(Grid.Column)=5] TextBlock">
<Setter Property="Foreground" Value="#2b1f19" />
</Style>
<Style Selector="#PtzCtrlPanel StackPanel[(Grid.Column)=6] Button">
<Setter Property="Width" Value="35" />
<Setter Property="Height" Value="35" />
<Setter Property="Padding" Value="0" />
</Style>
<!--PtzPresetPanel-->
<Style Selector="#PtzPresetPanel Button">
<Setter Property="Width" Value="105" />
<Setter Property="Margin" Value="5" />
</Style>
</UserControl.Styles>
<Grid RowDefinitions="300,250,auto" ColumnDefinitions="2*,1*">
<Border Name="ComSetPanel" Grid.Row="0" Grid.Column="0" BorderBrush="#2196f3" BorderThickness="1" Margin="0 0 4 0">
<Grid RowDefinitions="30,1*">
<Border Grid.Row="0" Height="30" Background="#2196f3" Padding="8 0 0 0">
<TextBlock Text="串口设置" FontSize="14" VerticalAlignment="Center" MaxLines="1" Foreground="#F0F0F0" />
</Border>
<Grid Grid.Row="1" RowDefinitions="1*,1*,1*,1*" ColumnDefinitions="1*,1*">
<StackPanel Grid.Row="0" Grid.Column="0">
<ComboBox Name="ComNameCbx" Classes="Outline" ContextFlyout="{x:Null}" assists:ComboBoxAssist.Label="本地端口" />
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1">
<ComboBox Name="BaudRateCbx" Classes="Outline" ContextFlyout="{x:Null}" SelectedIndex="3" assists:ComboBoxAssist.Label="波特率">
<ComboBoxItem Content="1200" />
<ComboBoxItem Content="2400" />
<ComboBoxItem Content="4800" />
<ComboBoxItem Content="9600" />
<ComboBoxItem Content="19200" />
</ComboBox>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="0">
<ComboBox Name="ParityCbx" Classes="Outline" ContextFlyout="{x:Null}" SelectedIndex="0" assists:ComboBoxAssist.Label="校验位">
<ComboBoxItem Content="无" />
</ComboBox>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="1">
<ComboBox Name="DataBitsCbx" Classes="Outline" ContextFlyout="{x:Null}" SelectedIndex="4" assists:ComboBoxAssist.Label="数据位">
<ComboBoxItem Content="4" />
<ComboBoxItem Content="5" />
<ComboBoxItem Content="6" />
<ComboBoxItem Content="7" />
<ComboBoxItem Content="8" />
</ComboBox>
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="0">
<ComboBox Name="StopBitsCbx" Classes="Outline" ContextFlyout="{x:Null}" SelectedIndex="0" assists:ComboBoxAssist.Label="停止位">
<ComboBoxItem Content="1" />
<ComboBoxItem Content="1.5" />
<ComboBoxItem Content="2" />
</ComboBox>
</StackPanel>
<WrapPanel Grid.Row="2" Grid.Column="1">
<Button Name="OpenComBtn" Classes="Light" Content="连接" />
<Button Name="CloseComBtn" Classes="Light" Content="关闭" IsEnabled="False" />
</WrapPanel>
</Grid>
</Grid>
</Border>
<Border Name="DeviceSetPanel" Grid.Row="0" Grid.Column="1" BorderBrush="#2196f3" BorderThickness="1">
<Grid RowDefinitions="30,1*">
<Border Grid.Row="0" Height="30" Background="#2196f3" Padding="8 0 0 0">
<TextBlock Text="设备设置" FontSize="14" VerticalAlignment="Center" MaxLines="1" Foreground="#F0F0F0" />
</Border>
<Grid Grid.Row="1" RowDefinitions="1*,1*,1*,1*">
<StackPanel Grid.Row="0" Grid.Column="0">
<ComboBox Name="CameraIpCbx" Classes="Outline" ContextFlyout="{x:Null}" assists:ComboBoxAssist.Label="相机Ip" />
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="0">
<Button Name="ShowLiveVideoBtn" Classes="Light" Content="实时视频" />
</StackPanel>
</Grid>
</Grid>
</Border>
<Border Name="PtzSetPanel" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="#2196f3" BorderThickness="1" Margin="0 4 0 0">
<Grid RowDefinitions="30,1*">
<Border Grid.Row="0" Height="30" Background="#2196f3" Padding="8 0 0 0">
<TextBlock Text="云台控制" FontSize="14" VerticalAlignment="Center" MaxLines="1" Foreground="#F0F0F0" />
</Border>
<Grid Grid.Row="1" ColumnDefinitions="1*,2*,1*">
<Grid Name="PtzSelectPanel" Grid.Column="0" RowDefinitions="60,60,1*">
<StackPanel Grid.Row="0">
<ComboBox Name="ControlTypeNameCbx" Classes="Outline" ContextFlyout="{x:Null}" assists:ComboBoxAssist.Label="控制类型" />
</StackPanel>
<StackPanel Grid.Row="1">
<ComboBox Name="CameraIdCbx" Classes="Outline" ContextFlyout="{x:Null}" assists:ComboBoxAssist.Label="相机Id" />
</StackPanel>
</Grid>
<Grid Name="PtzCtrlPanel" Grid.Column="1" RowDefinitions="50,50,50,1*" ColumnDefinitions="50,50,50,15,40,40,40">
<StackPanel Grid.Row="0" Grid.Column="0">
<Button Name="LeftTopBtn" Classes="Outline">
<icons:MaterialIcon Kind="ArrowTopLeft" />
</Button>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1">
<Button Name="TopBtn" Classes="Outline">
<icons:MaterialIcon Kind="ArrowTop" />
</Button>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="2">
<Button Name="RightTopBtn" Classes="Outline">
<icons:MaterialIcon Kind="ArrowTopRight" />
</Button>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="0">
<Button Name="LeftBtn" Classes="Outline">
<icons:MaterialIcon Kind="ArrowLeft" />
</Button>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="1">
<Button Name="AutoMoveBtn" Classes="Outline">
<icons:MaterialIcon Kind="Circle" />
</Button>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="2">
<Button Name="RightBtn" Classes="Outline">
<icons:MaterialIcon Kind="ArrowRight" />
</Button>
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="0">
<Button Name="LeftDownBtn" Classes="Outline">
<icons:MaterialIcon Kind="ArrowBottomLeft" />
</Button>
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="1">
<Button Name="DownBtn" Classes="Outline">
<icons:MaterialIcon Kind="ArrowBottom" />
</Button>
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="2">
<Button Name="RightDownBtn" Classes="Outline">
<icons:MaterialIcon Kind="ArrowBottomRight" />
</Button>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="4">
<Button Name="ZoomInBtn" Classes="Outline">
<icons:MaterialIcon Kind="PlusBold" />
</Button>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="5">
<TextBlock Text="调焦" />
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="6">
<Button Name="ZoomOutBtn" Classes="Outline">
<icons:MaterialIcon Kind="MinusThick" />
</Button>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="4">
<Button Name="FocusNearBtn" Classes="Outline">
<icons:MaterialIcon Kind="PlusThick" />
</Button>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="5">
<TextBlock Text="聚焦" />
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="6">
<Button Name="FocusFarBtn" Classes="Outline">
<icons:MaterialIcon Kind="MinusThick" />
</Button>
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="4">
<Button Name="IrisOpenBtn" Classes="Outline">
<icons:MaterialIcon Kind="PlusThick" />
</Button>
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="5">
<TextBlock Text="光焦" />
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="6">
<Button Name="IrisCloseBtn" Classes="Outline">
<icons:MaterialIcon Kind="MinusThick" />
</Button>
</StackPanel>
</Grid>
<Grid Name="PtzPresetPanel" Grid.Column="2" RowDefinitions="60,60,1*">
<StackPanel Grid.Row="0">
<ComboBox Name="PresetIdCbx" Classes="Outline" ContextFlyout="{x:Null}" assists:ComboBoxAssist.Label="预置点" />
</StackPanel>
<StackPanel Grid.Row="1">
<Button Name="GotoBtn" Classes="Light" Content="前往预置点" />
</StackPanel>
</Grid>
</Grid>
</Grid>
</Border>
</Grid>
</UserControl>