2025-03-28 09:49:56 +08:00

46 lines
2.5 KiB
XML

<Window x:Class="BaiDuDishDemo.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:BaiDuDishDemo"
xmlns:mediaControl="clr-namespace:AxWMPLib;assembly=AxInterop.WMPLib"
xmlns:mediaCap="clr-namespace:WPFMediaKit.DirectShow.Controls;assembly=WPFMediaKit"
mc:Ignorable="d"
Title="MainWindow" Height="600" Width="800" Loaded="Window_Loaded">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="200"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<mediaCap:VideoCaptureElement x:Name="mediaCapVideo" Stretch="UniformToFill" RenderTransformOrigin="0.5,0.5" Grid.RowSpan="3">
<mediaCap:VideoCaptureElement.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="-1"/>
</TransformGroup>
</mediaCap:VideoCaptureElement.RenderTransform>
</mediaCap:VideoCaptureElement>
<Image x:Name="img_Dish" Stretch="Uniform" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" />
<TextBlock x:Name="txt_Result" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2" Background="Transparent" TextWrapping="WrapWithOverflow" />
<Grid Grid.Column="2" >
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBox x:Name="txt_Name" Grid.Row="0" Margin="0"/>
<Button x:Name="btn_rk" Click="Button_Click" Grid.Row="1" Content="菜品入库" Margin="5"/>
<Button x:Name="btn_cx" Click="Button_Click" Grid.Row="2" Content="菜品自定义识别" Margin="5"/>
<Button x:Name="btn_File" Click="Button_Click" Grid.Row="3" Content="菜品识别" Margin="5"/>
<Button x:Name="btn_Car" Click="Button_Click" Grid.Row="4" Content="车型识别" Margin="5"/>
</Grid>
</Grid>
</Window>