123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <UserControl x:Class="AIPractice.LabellerServer.WPF.AdjustAssignmentView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:AIPractice.LabellerServer.WPF"
- xmlns:viewModels="clr-namespace:AIPractice.LabellerServer.ViewModels"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="48"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Orientation="Horizontal">
- <TextBlock Style="{StaticResource textblock-default}" Margin="4,8" VerticalAlignment="Center" Text="选择要调整的人员: " />
- <local:MultiSelector x:Name="AccountSelector" Margin="2,2,4,2" Height="36" Width="220" SelectUnSelectAll="OnSelectUnSelectAllAccounts" Refreshed="OnAccountsRefreshed">
- <local:MultiSelector.ItemTemplate>
- <DataTemplate DataType="{x:Type viewModels:AccountViewModel}">
- <CheckBox Margin="8,2,2,2" VerticalAlignment="Center" IsChecked="{Binding IsSelected}" Content="{Binding FriendlyName}"/>
- </DataTemplate>
- </local:MultiSelector.ItemTemplate>
- </local:MultiSelector>
- <Button Style="{StaticResource btn-primary}" Margin="24,4,4,4" Content="加载" Width="80" Height="32" HorizontalAlignment="Left" VerticalAlignment="Center" Click="OnLoadVirtualCasesClick"/>
- <Button Style="{StaticResource btn-warning}" Margin="4" Content="清除" Width="80" Height="32" HorizontalAlignment="Right" VerticalAlignment="Center" Click="OnClearClick"/>
- </StackPanel>
- <ScrollViewer Margin="4" Grid.Row="1" VerticalScrollBarVisibility="Auto">
- <ItemsControl x:Name="VirtualCaseList" >
- <ItemsControl.ItemTemplate>
- <DataTemplate DataType="{x:Type viewModels:VirtualCaseAccountViewModel}">
- <ContentControl Margin="2,4,2,4" Style="{StaticResource panel-default}" >
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <ContentControl Grid.Row="0" Style="{StaticResource panel-heading-default}" Content="{Binding Name}"/>
- <ItemsControl Grid.Row="1" ItemsSource="{Binding Cases}">
- <ItemsControl.ItemTemplate>
- <DataTemplate DataType="{x:Type viewModels:VirtualCaseViewModel}">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="200"/>
- <ColumnDefinition Width="200"/>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <StackPanel Orientation="Horizontal" Grid.Column="0" Margin="8" VerticalAlignment="Center">
- <TextBlock Margin="2" VerticalAlignment="Center" Text="{Binding Name}"/>
- <TextBlock VerticalAlignment="Center" Text="("/>
- <TextBlock VerticalAlignment="Center" Text="{Binding Description}"/>
- <TextBlock VerticalAlignment="Center" Text=")"/>
- </StackPanel>
-
- <StackPanel Margin="8" Grid.Column="1" HorizontalAlignment="Center" Orientation="Horizontal">
- <TextBlock Foreground="{Binding Color}" VerticalAlignment="Center" Text="{Binding LeftCount}"/>
- <TextBlock Foreground="{Binding Color}" VerticalAlignment="Center" Text="(剩余)"/>
- <TextBlock Foreground="{Binding Color}" VerticalAlignment="Center" Text="/"/>
- <TextBlock Foreground="{Binding Color}" VerticalAlignment="Center" Text="{Binding TotalCount}"/>
- <TextBlock Foreground="{Binding Color}" VerticalAlignment="Center" Text="(总共)"/>
- </StackPanel>
- <Button Style="{StaticResource btn-primary}" Grid.Column="2" Margin="8" VerticalAlignment="Center" Content="撤销" Width="80" IsEnabled="{Binding NotStarted}" Click="OnRestoreCaseClick"/>
- <Button Style="{StaticResource btn-danger}" Grid.Column="3" Margin="8" VerticalAlignment="Center" Content="删除" Width="80" IsEnabled="{Binding NotStarted}" Click="OnDeleteCaseClick"/>
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Grid>
- </ContentControl>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- </UserControl>
|