SettingsWindow.xaml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <Window x:Class="FaceChange.SettingsWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:FaceChange"
  7. mc:Ignorable="d"
  8. Title="设置" Height="500" Width="500" ResizeMode="NoResize" Loaded="Window_Loaded" Closing="Window_Closing">
  9. <Grid>
  10. <GroupBox Header="连接设备" Margin="10,10,10,0" VerticalAlignment="Top" Height="66">
  11. <Grid Margin="10,10,10,10">
  12. <Label Content="设备名称" HorizontalAlignment="Left" Height="24"/>
  13. <ComboBox x:Name="Devices" Margin="64,0,0,0" Height="24" VerticalAlignment="Top" HorizontalAlignment="Left" Width="230" BorderBrush="White">
  14. <ComboBox.Background>
  15. <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
  16. <GradientStop Color="#FFF0F0F0" Offset="0"/>
  17. <GradientStop Color="White" Offset="1"/>
  18. </LinearGradientBrush>
  19. </ComboBox.Background>
  20. <ComboBox.RenderTransform>
  21. <TransformGroup>
  22. <ScaleTransform/>
  23. <SkewTransform/>
  24. <RotateTransform Angle="0"/>
  25. <TranslateTransform/>
  26. </TransformGroup>
  27. </ComboBox.RenderTransform>
  28. </ComboBox>
  29. <Button x:Name="Scan" Content="扫描设备" Margin="299,0,0,0" Width="64" Height="24" HorizontalAlignment="Left" Background="White" Foreground="Blue" Click="Scan_Click"/>
  30. <Button x:Name="Connect" Content="连接设备" Margin="368,0,0,0" Width="64" Height="24" HorizontalAlignment="Left" Foreground="Lime" Background="White" Click="Connect_Click"/>
  31. </Grid>
  32. </GroupBox>
  33. <GroupBox Header="脸谱列表" Margin="10,82,10,10">
  34. <Grid Margin="10,10,10,10">
  35. <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"/>
  36. <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"/>
  37. <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"/>
  38. <ListBox x:Name="ListBox" ItemsSource="{Binding}" Grid.Column="2" Margin="0,0,62,0">
  39. <ListBox.ItemTemplate>
  40. <DataTemplate>
  41. <Grid HorizontalAlignment="Center">
  42. <Grid.ColumnDefinitions>
  43. <ColumnDefinition Width="80"/>
  44. <ColumnDefinition Width="255"/>
  45. </Grid.ColumnDefinitions>
  46. <Image Source="{Binding Face}" Grid.Column="0" Width="80" Height="80" HorizontalAlignment="Left" Stretch="UniformToFill" StretchDirection="DownOnly"/>
  47. <Grid Grid.Column="1" Height="80" VerticalAlignment="Center" Margin="12,0,0,0">
  48. <Grid.RowDefinitions>
  49. <RowDefinition Height="38"></RowDefinition>
  50. <RowDefinition Height="4"></RowDefinition>
  51. <RowDefinition Height="38"></RowDefinition>
  52. </Grid.RowDefinitions>
  53. <TextBlock Text="{Binding Name}" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Bottom" FontSize="12" TextWrapping="Wrap"/>
  54. <TextBlock Text="" Grid.Row="1"/>
  55. <TextBlock Text="{Binding Path}" Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="12" TextWrapping="Wrap"/>
  56. </Grid>
  57. </Grid>
  58. </DataTemplate>
  59. </ListBox.ItemTemplate>
  60. </ListBox>
  61. <Label Content="数量" HorizontalAlignment="Left" Margin="385,0,0,0" VerticalAlignment="Top" FontSize="10"/>
  62. <Label x:Name="FaceCount" Content="0" ToolTip="最多9个" Margin="385,23,0,0" FontSize="10" Height="22" VerticalAlignment="Top" HorizontalAlignment="Left" Width="47"/>
  63. </Grid>
  64. </GroupBox>
  65. </Grid>
  66. </Window>