50 lines
2.8 KiB
XML
50 lines
2.8 KiB
XML
<Window x:Class="WpfApp1.MainWindow"
|
|
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"
|
|
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
|
|
xmlns:local="clr-namespace:WpfApp1"
|
|
Style="{StaticResource MaterialDesignWindow}"
|
|
WindowStartupLocation="CenterScreen"
|
|
WindowStyle="None"
|
|
ResizeMode="NoResize"
|
|
mc:Ignorable="d"
|
|
Title="MainWindow" Height="600" Width="800">
|
|
<GroupBox>
|
|
<GroupBox.Header>
|
|
<TextBlock Text="欢迎使用" FontSize="20" Foreground="White"/>
|
|
</GroupBox.Header>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 相机图像显示区域 -->
|
|
<Border Grid.Row="0" BorderBrush="Gray" BorderThickness="1" Margin="10">
|
|
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
|
<Image Name="CameraImage" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</ScrollViewer>
|
|
</Border>
|
|
|
|
<!-- 状态显示 -->
|
|
<TextBlock Grid.Row="1" x:Name="StatusText" Margin="10" FontSize="14"
|
|
Text="正在初始化相机..." HorizontalAlignment="Center"
|
|
Foreground="DarkBlue"/>
|
|
|
|
<!-- 控制按钮 -->
|
|
<StackPanel x:Name="ButtonPanel1" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center"
|
|
Margin="10" >
|
|
<Button x:Name="SelectCameraButton" Content="选择相机" Width="100" Height="30" Click="SelectCameraButton_Click" Margin="0,0,10,0"/>
|
|
<Button x:Name="StartCameraButton" Content="开启推流" Width="100" Height="30" Click="StartCameraButton_Click" Margin="0,0,10,0"/>
|
|
<Button x:Name="CaptureButton" Content="捕获图像" Width="100" Height="30" Click="CaptureButton_Click" Margin="0,0,10,0"/>
|
|
<Button x:Name="ChangeFolderButton" Content="更改保存文件夹" Width="150" Height="30" Click="ChangeFolderButton_Click" Margin="0,0,10,0"/>
|
|
<Button x:Name="TimedCaptureButton" Content="定时拍摄设置" Width="120" Height="30" Click="TimedCaptureButton_Click" Margin="0,0,10,0"/>
|
|
<Button x:Name="ExitButton" Content="退出" Width="100" Height="30" Click="ExitButton_Click"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</GroupBox>
|
|
</Window>
|