123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <Window x:Class="CameraImageCaptureTest.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:local="clr-namespace:CameraImageCaptureTest"
- mc:Ignorable="d"
- Title="MainWindow" Height="690" Width="800" Closing="OnWindowClosing">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="40"/>
- <RowDefinition Height="40"/>
- <RowDefinition Height="40"/>
- <RowDefinition Height="40"/>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <local:ImageCanvas x:Name="MyImageCanvas"/>
- </Grid>
- <Grid Grid.Row="1">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="相机类型: " FontSize="12" Margin="2,2,2,2" VerticalAlignment="Center"/>
- <ComboBox x:Name="ComboBoxCameraType" FontSize="12" Margin="2,2,2,2" Width="80" VerticalAlignment="Center" SelectionChanged="OnComboBoxCameraTypeSelectionChanged"/>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="2">
- <StackPanel Orientation="Horizontal">
- <StackPanel Orientation="Horizontal">
- <Button Content="选择图片/视频" FontSize="12" Margin="4,4,4,4" Width="120" Click="OnBtnLoadVideoClick"/>
- <Button Content="打开(图片/视频)" Margin="4,4,4,4" Width="80" Click="OnBtnOpenCameraClick"/>
- <ComboBox x:Name="ComboBoxCameras" Margin="4,4,4,4" Width="120" VerticalAlignment="Center"
- SelectionChanged="OnComboBoxCardsSelectionChanged"/>
- <Button x:Name="BtnOpenCameras" Content="打开相机" Margin="2,2,2,2" Width="60" Click="OnBtnOpenCameraClick"/>
- <Button Content="刷新" Margin="4,4,4,4" Width="60" Click="OnRefreshCardsClick"/>
- </StackPanel>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="3">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="相机输出耗时:" Margin="4,4,4,4" VerticalAlignment="Center" Width="85"/>
- <TextBlock x:Name="TextCameraProcessTime" Margin="4,4,4,4" VerticalAlignment="Center" Width="60"/>
- </StackPanel>
- </Grid>
- </Grid>
- </Window>
|