123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <Window x:Class="FaceChange.SettingsWindow"
- 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:FaceChange"
- mc:Ignorable="d"
- Title="设置" Height="500" Width="500" ResizeMode="NoResize" Loaded="Window_Loaded" Closing="Window_Closing">
- <Grid>
- <GroupBox Header="连接设备" Margin="10,10,10,0" VerticalAlignment="Top" Height="66">
- <Grid Margin="10,10,10,10">
- <Label Content="设备名称" HorizontalAlignment="Left" Height="24"/>
- <ComboBox x:Name="Devices" Margin="64,0,0,0" Height="24" VerticalAlignment="Top" HorizontalAlignment="Left" Width="230" BorderBrush="White">
- <ComboBox.Background>
- <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
- <GradientStop Color="#FFF0F0F0" Offset="0"/>
- <GradientStop Color="White" Offset="1"/>
- </LinearGradientBrush>
- </ComboBox.Background>
- <ComboBox.RenderTransform>
- <TransformGroup>
- <ScaleTransform/>
- <SkewTransform/>
- <RotateTransform Angle="0"/>
- <TranslateTransform/>
- </TransformGroup>
- </ComboBox.RenderTransform>
- </ComboBox>
- <Button x:Name="Scan" Content="扫描设备" Margin="299,0,0,0" Width="64" Height="24" HorizontalAlignment="Left" Background="White" Foreground="Blue" Click="Scan_Click"/>
- <Button x:Name="Connect" Content="连接设备" Margin="368,0,0,0" Width="64" Height="24" HorizontalAlignment="Left" Foreground="Lime" Background="White" Click="Connect_Click"/>
- </Grid>
- </GroupBox>
- <GroupBox Header="脸谱列表" Margin="10,82,10,10">
- <Grid Margin="10,10,10,10">
- <Button x:Name="Delete" Content="删除" HorizontalAlignment="Left" Margin="385,245,0,0" VerticalAlignment="Top" Width="47" Height="24" Background="White" Foreground="Red" Click="Delete_Click"/>
- <Button x:Name="DeleteALL" Content="清空" HorizontalAlignment="Left" Margin="385,274,0,0" VerticalAlignment="Top" Width="47" Height="24" Background="White" Foreground="Red" Click="DeleteALL_Click"/>
- <Button x:Name="Add" Content="添加" HorizontalAlignment="Left" Margin="385,303,0,0" VerticalAlignment="Top" Width="47" Height="24" Background="White" Foreground="Lime" Click="Add_Click"/>
- <ListBox x:Name="ListBox" ItemsSource="{Binding}" Grid.Column="2" Margin="0,0,62,0">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Grid HorizontalAlignment="Center">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="80"/>
- <ColumnDefinition Width="255"/>
- </Grid.ColumnDefinitions>
- <Image Source="{Binding Face}" Grid.Column="0" Width="80" Height="80" HorizontalAlignment="Left" Stretch="UniformToFill" StretchDirection="DownOnly"/>
- <Grid Grid.Column="1" Height="80" VerticalAlignment="Center" Margin="12,0,0,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="38"></RowDefinition>
- <RowDefinition Height="4"></RowDefinition>
- <RowDefinition Height="38"></RowDefinition>
- </Grid.RowDefinitions>
- <TextBlock Text="{Binding Name}" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="12" TextWrapping="Wrap"/>
- <TextBlock Text="" Grid.Row="1"/>
- <TextBlock Text="{Binding Path}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="12" TextWrapping="Wrap"/>
- </Grid>
- </Grid>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <Label Content="数量" HorizontalAlignment="Left" Margin="385,0,0,0" VerticalAlignment="Top" FontSize="10"/>
- <Label x:Name="FaceCount" Content="0" ToolTip="最多9个" Margin="385,23,0,0" FontSize="10" Height="22" VerticalAlignment="Top" HorizontalAlignment="Left" Width="47"/>
- </Grid>
- </GroupBox>
- </Grid>
- </Window>
|