CreateImageCaseWindow.xaml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <Window x:Class="aipdev.CreateImageCaseWindow"
  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:aipdev"
  7. xmlns:entities="clr-namespace:AIPlatform.Protocol.Entities;assembly=AIPlatform.Protocol"
  8. mc:Ignorable="d"
  9. Title="创建图像用例" Height="320" Width="480" ShowInTaskbar="False" WindowStartupLocation="CenterOwner" ResizeMode="NoResize" >
  10. <Window.Resources>
  11. <local:IsNotNullOrEmptyConverter x:Key="isNotNullOrEmptyConverter"/>
  12. </Window.Resources>
  13. <Grid>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="20"/>
  16. <RowDefinition Height="*"/>
  17. <RowDefinition Height="50"/>
  18. </Grid.RowDefinitions>
  19. <StackPanel Grid.Row="1">
  20. <StackPanel Orientation="Horizontal" Margin="8,2,8,2">
  21. <TextBlock Margin="8" VerticalAlignment="Center" Text="组织" Width="70"/>
  22. <ComboBox x:Name="cbbOrganizations" Margin="8" VerticalAlignment="Center" Width="340" SelectionChanged="OnOrganizationSelectionChanged">
  23. <ComboBox.ItemTemplate>
  24. <DataTemplate DataType="{x:Type entities:Organization}">
  25. <Label Content="{Binding Name}"/>
  26. </DataTemplate>
  27. </ComboBox.ItemTemplate>
  28. </ComboBox>
  29. </StackPanel>
  30. <StackPanel Orientation="Horizontal" Margin="8,2,8,2">
  31. <TextBlock Margin="8" VerticalAlignment="Center" Text="图像大类" Width="70"/>
  32. <ComboBox x:Name="cbbImageCategories" Margin="8" VerticalAlignment="Center" Width="340" IsTextSearchEnabled="False" IsEditable="True" KeyUp="OnImageCategoryKeyUp"
  33. SelectionChanged="cbbImageCategories_SelectionChanged" ToolTip="{Binding Path=Text, ElementName=cbbImageCategories,Converter={StaticResource isNotNullOrEmptyConverter}}">
  34. <ComboBox.ItemTemplate>
  35. <DataTemplate DataType="{x:Type entities:ImageCategory}">
  36. <Label Content="{Binding Name}"/>
  37. </DataTemplate>
  38. </ComboBox.ItemTemplate>
  39. </ComboBox>
  40. </StackPanel>
  41. <StackPanel Orientation="Horizontal" Margin="8,2,8,2">
  42. <TextBlock Margin="8" VerticalAlignment="Center" Text="图像批次" Width="70"/>
  43. <ComboBox x:Name="cbbImageBatches" Margin="8" VerticalAlignment="Center" Width="340" IsTextSearchEnabled="False" IsEditable="True" KeyUp="OnImageBatchKeyUp"
  44. SelectionChanged="OnImageBatchSelectionChanged" ToolTip="{Binding Path=Text, ElementName=cbbImageBatches,Converter={StaticResource isNotNullOrEmptyConverter}}">
  45. <ComboBox.ItemTemplate>
  46. <DataTemplate DataType="{x:Type entities:ImageCategory}">
  47. <Label Content="{Binding Name}"/>
  48. </DataTemplate>
  49. </ComboBox.ItemTemplate>
  50. </ComboBox>
  51. </StackPanel>
  52. <StackPanel Orientation="Horizontal" Margin="8,2,8,2">
  53. <TextBlock Margin="8" VerticalAlignment="Center" Text="图像用例" Width="70"/>
  54. <TextBox x:Name="txtImageCase" Margin="8" VerticalAlignment="Center" Width="340" ToolTip="{Binding Path=Text, ElementName=txtImageCase,Converter={StaticResource isNotNullOrEmptyConverter}}"/>
  55. </StackPanel>
  56. </StackPanel>
  57. <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Grid.Row="2" Grid.Column="1">
  58. <Button Content="取消" VerticalAlignment="Center" Click="OnCloseClick"/>
  59. <Button Content="确定" VerticalAlignment="Center" Margin="8" Style="{StaticResource btn-primary}" Click="OnOkClick" IsDefault="True"/>
  60. </StackPanel>
  61. </Grid>
  62. </Window>