123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528 |
- <Window x:Class="aipdev.FolderImageViewer"
- 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:model="clr-namespace:AIPlatform.Protocol.Model;assembly=AIPlatform.Protocol"
- xmlns:entities="clr-namespace:AIPlatform.Protocol.Entities;assembly=AIPlatform.Protocol"
- xmlns:extensions="clr-namespace:aipdev.Extensions"
- xmlns:local="clr-namespace:aipdev"
- xmlns:viewmodel="clr-namespace:aipdev.ViewModel"
- mc:Ignorable="d"
- Title="图像浏览器" Height="800" Width="1280" ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
- <Window.Resources>
- <Style TargetType="{x:Type TextBox}" x:Key="ReadOnlyTextBoxStyle">
- <Style.Setters>
- <Setter Property="IsReadOnly" Value="True"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- </Style.Setters>
- </Style>
- </Window.Resources>
- <Grid Background="Black">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="140"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="300"/>
- </Grid.ColumnDefinitions>
- <Grid Grid.Row="1" Grid.Column="0">
- <Border Grid.Row="1" BorderThickness="0.5" BorderBrush="Gray" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <ItemsControl x:Name="PreviewFiles">
- <!--<ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel>
- </WrapPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>-->
- <ItemsControl.Resources>
- <DataTemplate DataType="{x:Type viewmodel:PreviewFileViewModel}">
- <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Orientation="Vertical">
- <TextBlock Text="{Binding Modal.Title}" Margin="2" VerticalAlignment="Center" HorizontalAlignment="Left" Foreground="White"/>
- <ItemsControl>
- <Button OverridesDefaultStyle="True" x:Name="ImageButton" Margin="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="100" PreviewMouseLeftButtonDown="OnPreviewFileMouseLeftButtonDown">
- <Button.Template>
- <ControlTemplate>
- <Border x:Name="ImageBorder" BorderThickness="0.5" BorderBrush="Gray" CornerRadius="4" Background="Black"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Image Source="{Binding PreviewImage.ImageData}" Grid.Row="0" Stretch="UniformToFill" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2"/>
- <Image Source="Resources/Images/Question.png" VerticalAlignment="Top" HorizontalAlignment="Right" Width="20" Height="20"
- Visibility="{Binding HasQuestioned, Converter={extensions:BoolToVisibilityConverter}}" />
- <TextBlock Grid.Row="1" FontSize="12" Text="{Binding Type, Mode=OneWay}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2" Foreground="White"/>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="ImageBorder" Property="BorderBrush" Value="DeepSkyBlue"/>
- <Setter TargetName="ImageBorder" Property="BorderThickness" Value="2"/>
- </Trigger>
- <DataTrigger Binding="{Binding IsSelected}" Value="True">
- <Setter TargetName="ImageBorder" Property="BorderBrush" Value="DeepSkyBlue"/>
- <Setter TargetName="ImageBorder" Property="BorderThickness" Value="2"/>
- </DataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </ItemsControl>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.Resources>
- </ItemsControl>
- </ScrollViewer>
- </Border>
- </Grid>
- <Grid Grid.Row="1" Grid.Column="1" Background="Black">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="40"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="55"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="55"/>
- </Grid.ColumnDefinitions>
- <Button Grid.Column="0" Margin="4,0,0,0" x:Name="PreviousImage" Width="64" Height="2000" OverridesDefaultStyle="True" Click="OnPreviousImageClick">
- <Button.Template>
- <ControlTemplate>
- <Grid x:Name="Bb" Width="64">
- <Border Background="Black" Opacity="0.5"></Border>
- <Border x:Name="Bib">
- <Image Opacity="0.5" x:Name="Bi" Width="50" Height="50" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" Source="Resources/Images/Previous3.png"></Image>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="Button.IsMouseOver" Value="True">
- <Setter TargetName="Bi" Property="Opacity" Value="1"/>
- </Trigger>
- <Trigger Property="Button.IsPressed" Value="True">
- <Setter TargetName="Bib" Property="Padding" Value="2"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Grid Grid.Row="0" Grid.Column="1">
- <Image x:Name="Image" Grid.Column="0"/>
- <TextBlock x:Name="ImageIndex" Foreground="Red" FontSize="16" VerticalAlignment="Top" HorizontalAlignment="Left" IsHitTestVisible="False"/>
- </Grid>
- <Button Grid.Column="2" Margin="0,0,4,0" x:Name="NextImage" Width="64" Height="1000" OverridesDefaultStyle="True" Click="OnNextImageClick">
- <Button.Template>
- <ControlTemplate>
- <Grid x:Name="Bb" Width="64">
- <Border Background="Black" Opacity="0.5"></Border>
- <Border x:Name="Bib">
- <Image Opacity="0.5" x:Name="Bi" Width="50" Height="50" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" Source="Resources/Images/Next3.png"></Image>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="Button.IsMouseOver" Value="True">
- <Setter TargetName="Bi" Property="Opacity" Value="1"/>
- </Trigger>
- <Trigger Property="Button.IsPressed" Value="True">
- <Setter TargetName="Bib" Property="Padding" Value="2"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" x:Name="VideoGrid">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Border Grid.Row="0" BorderThickness="0.5" BorderBrush="Gray">
- <ScrollViewer x:Name="VideoFramesScrollViewer" PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <ItemsControl x:Name="PreviewFrames" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <VirtualizingStackPanel Orientation="Horizontal"/>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.Resources>
- <DataTemplate DataType="{x:Type viewmodel:PreviewFrameViewModel}">
- <Button OverridesDefaultStyle="True" x:Name="FrameButton" HorizontalAlignment="Stretch" Height="100" Width="140" Margin="2" Click="OnPreviewFrameClick">
- <Button.Template>
- <ControlTemplate>
- <Border x:Name="FrameBorder" BorderThickness="0.5" BorderBrush="Gray" CornerRadius="4" Background="Black">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Image Grid.Row="0" Source="{Binding PreviewImage}" Stretch="Fill" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2"/>
- <TextBlock Grid.Row="1" FontSize="12" Foreground="{Binding Color,Converter={extensions:SKColorToBrushConverter}}" Text="{Binding Number, Mode=OneWay}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="2"/>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="FrameBorder" Property="BorderBrush" Value="DeepSkyBlue"/>
- <Setter TargetName="FrameBorder" Property="BorderThickness" Value="2"/>
- </Trigger>
- <DataTrigger Binding="{Binding IsSelected}" Value="True">
- <Setter TargetName="FrameBorder" Property="BorderBrush" Value="DeepSkyBlue"/>
- <Setter TargetName="FrameBorder" Property="BorderThickness" Value="2"/>
- </DataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </DataTemplate>
- </ItemsControl.Resources>
- </ItemsControl>
- </ScrollViewer>
- </Border>
- <Slider x:Name="progressSlider" Grid.Row="1" Grid.Column="0" Value="0" VerticalAlignment="Center" Margin="0" Background="#1F1F1F" ValueChanged="progressSlider_ValueChanged"/>
- </Grid>
- <Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3" Background="#1F1F1F">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <StackPanel x:Name="panelVideo" Grid.Row="1" Grid.Column="0" Margin="2" Orientation="Horizontal" HorizontalAlignment="Left">
- <Button Focusable="False" x:Name="Play" ToolTip="播放" Margin="2" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" BorderThickness="0" Width="40" Click="OnPlayClick">
- <Image HorizontalAlignment="Center" Source="/Resources/Images/Play2.png" Stretch="Fill" />
- </Button>
- <Button Focusable="False" x:Name="Pause" ToolTip="暂停" Margin="2" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" BorderThickness="0" Width="40" Click="OnPauseClick" Visibility="Collapsed">
- <Image HorizontalAlignment="Center" Source="/Resources/Images/Pause.png" Stretch="Fill" />
- </Button>
- <Button Focusable="False" x:Name="PreviousFrame" ToolTip="上一帧" Margin="2" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" BorderThickness="0" Width="40" Click="OnPreviousFrameClick">
- <Image HorizontalAlignment="Center" Source="/Resources/Images/Previous.png" Stretch="Fill" />
- </Button>
- <Button Focusable="False" x:Name="NextFrame" ToolTip="下一帧" Margin="2" VerticalAlignment="Center" HorizontalAlignment="Right" Background="Transparent" BorderThickness="0" Width="40" Click="OnNextFrameClick">
- <Image Source="/Resources/Images/Next.png" Stretch="Fill" />
- </Button>
- <Button Focusable="False" x:Name="PreviousLabelFrame" ToolTip="上一标注帧" Margin="2" HorizontalAlignment="Left" VerticalAlignment="Center" Background="Transparent" BorderThickness="0" Width="40" Click="OnPreviousLabelFrameClick">
- <Image HorizontalAlignment="Center" Source="/Resources/Images/Previous2.png" Stretch="Fill" />
- </Button>
- <Button Focusable="False" x:Name="NextLabelFrame" ToolTip="下一标注帧" Margin="2" VerticalAlignment="Center" HorizontalAlignment="Right" Background="Transparent" BorderThickness="0" Width="40" Click="OnNextLabelFrameClick">
- <Image Source="/Resources/Images/Next2.png" Stretch="Fill" />
- </Button>
- </StackPanel>
- <StackPanel x:Name="panelFrame" Grid.Row="1" Grid.Column="1" Margin="2" Orientation="Horizontal" HorizontalAlignment="Center">
- <TextBlock Text="当前帧:" Margin="6" FontSize="12" Foreground="White" VerticalAlignment="Center" IsHitTestVisible="False"/>
- <TextBlock x:Name="CurrentFrameIndex" Foreground="White" VerticalAlignment="Center" IsHitTestVisible="False" />
- <TextBlock Text="/" Foreground="White" VerticalAlignment="Center" IsHitTestVisible="False"/>
- <TextBlock x:Name="TotalFrameCount" Foreground="White" VerticalAlignment="Center" IsHitTestVisible="False"/>
- <TextBlock Text="已标注:" Margin="6" FontSize="12" Foreground="White" VerticalAlignment="Center" IsHitTestVisible="False"/>
- <TextBlock x:Name="LabeledFrameCount" Margin="0,0,6,0" Foreground="White" VerticalAlignment="Center" IsHitTestVisible="False"/>
- <TextBlock Text="跳转至第" FontSize="12" Foreground="White" VerticalAlignment="Center"/>
- <TextBox x:Name="FrameIndexTextBox" Height="18" FontSize="12" VerticalContentAlignment="Center" Padding="0" Margin="2,0" Width="30" HorizontalContentAlignment="Center"
- PreviewKeyDown="FrameIndexTextBox_PreviewKeyDown"/>
- <TextBlock Text="帧" Margin="0,0,6,0" FontSize="12" Foreground="White" VerticalAlignment="Center"/>
- </StackPanel>
- <StackPanel Grid.Row="1" Grid.Column="2" Margin="2" Orientation="Horizontal" HorizontalAlignment="Right" Visibility="Collapsed">
- <CheckBox x:Name="ShowAllRoi" Margin="2,0" Content="显示所有ROI" IsChecked="{Binding IsShowAllRoi}" Click="ShowAllRoi_Click" FontSize="12" Foreground="White"/>
- <CheckBox x:Name="HideRoi" Margin="4,0" Content="隐藏ROI" IsChecked="{Binding IsHideRoi}" Click="HideRoi_Click" FontSize="12" Foreground="White"/>
- <!--<Button Focusable="False" x:Name="PreviousImage" ToolTip="上一页" VerticalAlignment="Center" Background="Transparent" BorderThickness="0" Click="OnPreviousImageClick">
- <Image HorizontalAlignment="Center" Source="/Resources/Images/Previous3.png" />
- </Button>
- <Button Focusable="False" x:Name="NextImage" ToolTip="下一页" VerticalAlignment="Center" Background="Transparent" BorderThickness="0" Click="OnNextImageClick">
- <Image HorizontalAlignment="Center" Source="/Resources/Images/Next3.png" />
- </Button>-->
- </StackPanel>
- </Grid>
- </Grid>
- <ScrollViewer Grid.Row="1" Grid.Column="2" VerticalScrollBarVisibility="Auto">
- <StackPanel>
- <!--<GroupBox Margin="4" MinHeight="64" Header="图像标签" Foreground="White" BorderBrush="Gray" BorderThickness="1" >
- <StackPanel VerticalAlignment="Center">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="CombinationTagNameTextBox" TextWrapping="Wrap"/>
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="CombinationTagIdTextBox" TextWrapping="Wrap"/>
- </StackPanel>
- </GroupBox>-->
- <GroupBox Margin="2" MinHeight="64" Header="标注人员" Foreground="White" BorderBrush="Gray" BorderThickness="0.5" >
- <StackPanel VerticalAlignment="Stretch">
- <ListBox x:Name="LabelerList" FontSize="14" BorderThickness="0" DisplayMemberPath="Labeler.Name" ItemContainerStyle="{StaticResource LabelDataGroupConclusionItemStyle}"
- PreviewMouseLeftButtonDown="OnLabelerMouseLeftButtonDownAsync">
- <ListBox.ItemsPanel >
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" />
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- </ListBox>
- </StackPanel>
- </GroupBox>
- <GroupBox Margin="2" MinHeight="64" Header="图像信息" Foreground="White" BorderBrush="Gray" BorderThickness="0.5" >
- <StackPanel Margin="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="ImageNameTextBox" Margin="2" HorizontalAlignment="Left" TextWrapping="Wrap"/>
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="ImageIdTextBox" Margin="2" HorizontalAlignment="Left" TextWrapping="Wrap"/>
- </StackPanel>
- </GroupBox>
- <GroupBox Margin="2" MinHeight="64" Header="标注结果" Foreground="White" BorderBrush="Gray" BorderThickness="0.5" >
- <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <ItemsControl x:Name="Conclusions">
- <!--<ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel>
- </WrapPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>-->
- <ItemsControl.Resources>
- <DataTemplate DataType="{x:Type model:LabelConclusion}">
- <WrapPanel Margin="2" Orientation="Horizontal" PreviewMouseLeftButtonDown="labelerClickTest" Cursor="Hand">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Title}" />
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Unit}" />
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Content}" />
- </WrapPanel>
- </DataTemplate>
- </ItemsControl.Resources>
- </ItemsControl>
- </ScrollViewer>
- </GroupBox>
- <GroupBox Margin="2" x:Name="ReviewInfoGroup" MinHeight="64" Header="审核结果" Foreground="White" BorderBrush="Gray" BorderThickness="0.5" >
- <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <ItemsControl x:Name="ReviewInfoList">
- <!--<ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel>
- </WrapPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>-->
- <ItemsControl.Resources>
- <DataTemplate DataType="{x:Type model:ReviewerInfo}">
- <StackPanel Margin="2" Orientation="Vertical">
- <GroupBox x:Name="ReviewerGroup" Header="{Binding}" BorderThickness="0.5">
- <GroupBox.HeaderTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Text="{Binding Reviewer.Name}" Margin="2" VerticalAlignment="Stretch" FontWeight="Bold"/>
- </StackPanel>
- </DataTemplate>
- </GroupBox.HeaderTemplate>
- <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Orientation="Horizontal">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="审核通过" Foreground="Green" Visibility="{Binding IsPassed, Converter={extensions:BoolToVisibilityConverter}}" TextWrapping="Wrap"/>
- </StackPanel>
- <StackPanel Grid.Row="1" Orientation="Vertical">
- <ItemsControl x:Name="Results" ItemsSource="{Binding Results}">
- <!--<ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel>
- </WrapPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>-->
- <ItemsControl.Resources>
- <DataTemplate DataType="{x:Type model:SingleReviewedResult}">
- <WrapPanel Margin="2" Orientation="Horizontal">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Title}" TextWrapping="Wrap"/>
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding ReviewResult}" Foreground="Red" TextWrapping="Wrap"/>
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding ReviewComment}" Foreground="Orange" TextWrapping="Wrap"/>
- </WrapPanel>
- </DataTemplate>
- </ItemsControl.Resources>
- </ItemsControl>
- </StackPanel>
- </Grid>
- </ScrollViewer>
- </GroupBox>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.Resources>
- </ItemsControl>
- </ScrollViewer>
- </GroupBox>
- <GroupBox Margin="2" x:Name="RelabelInfoGroup" MinHeight="64" Header="历史结果" Foreground="White" BorderBrush="Gray" BorderThickness="0.5">
- <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <ItemsControl x:Name="RelabelInfoList">
- <!--<ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel>
- </WrapPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>-->
- <ItemsControl.Resources>
- <DataTemplate DataType="{x:Type viewmodel:LabeledUltrasoundFileInfoModel}">
- <StackPanel>
- <GroupBox Header="{Binding}" BorderThickness="0.5">
- <GroupBox.HeaderTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Text="{Binding LabeledResultHeader}" Margin="2" VerticalAlignment="Center"/>
- <Button Focusable="False" Click="OnRelabelResultClick">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="ButtonBorder" CornerRadius="2">
- <Image Source="Resources/Images/Image.png" Width="20" Height="20"/>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="ButtonBorder" Property="BorderThickness" Value="1"/>
- <Setter TargetName="ButtonBorder" Property="BorderBrush" Value="Gray"/>
- </Trigger>
- <DataTrigger Binding="{Binding IsSelected}" Value="True">
- <Setter TargetName="ButtonBorder" Property="BorderThickness" Value="2"/>
- <Setter TargetName="ButtonBorder" Property="BorderBrush" Value="Yellow"/>
- </DataTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </StackPanel>
- </DataTemplate>
- </GroupBox.HeaderTemplate>
- <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <ItemsControl ItemsSource="{Binding LabelConclusions}">
- <!--<ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel>
- </WrapPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>-->
- <ItemsControl.Resources>
- <DataTemplate DataType="{x:Type model:LabelConclusion}">
- <WrapPanel Margin="2" Orientation="Horizontal">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Title}" TextWrapping="Wrap"/>
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Unit}" TextWrapping="Wrap"/>
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Content}" TextWrapping="Wrap"/>
- </WrapPanel>
- </DataTemplate>
- </ItemsControl.Resources>
- </ItemsControl>
- </ScrollViewer>
- </GroupBox>
- <GroupBox Margin="2" Header="{Binding}" BorderThickness="0.5" Visibility="{Binding HasReviewedResult, Converter={extensions:BoolToVisibilityConverter}}">
- <GroupBox.HeaderTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Text="{Binding ReviewedResultHeader}" Margin="2" VerticalAlignment="Center"/>
- </StackPanel>
- </DataTemplate>
- </GroupBox.HeaderTemplate>
- <ItemsControl ItemsSource="{Binding ReviewerInfos}">
- <!--<ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel>
- </WrapPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>-->
- <ItemsControl.Resources>
- <DataTemplate DataType="{x:Type model:ReviewerInfo}">
- <StackPanel Margin="2" Orientation="Vertical">
- <GroupBox Header="{Binding}" BorderThickness="0.5">
- <GroupBox.HeaderTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Text="{Binding Reviewer.Name}" Margin="2" VerticalAlignment="Stretch" FontWeight="Bold"/>
- </StackPanel>
- </DataTemplate>
- </GroupBox.HeaderTemplate>
- <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Orientation="Horizontal">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="审核通过" Foreground="Green" Visibility="{Binding IsPassed, Converter={extensions:BoolToVisibilityConverter}}" TextWrapping="Wrap"/>
- </StackPanel>
- <StackPanel Grid.Row="1" Orientation="Vertical">
- <ItemsControl ItemsSource="{Binding Results}">
- <!--<ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel>
- </WrapPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>-->
- <ItemsControl.Resources>
- <DataTemplate DataType="{x:Type model:SingleReviewedResult}">
- <WrapPanel Margin="2" Orientation="Horizontal">
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Title}" TextWrapping="Wrap"/>
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding ReviewResult}" Foreground="Red" TextWrapping="Wrap"/>
- <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding ReviewComment}" Foreground="Orange" TextWrapping="Wrap"/>
- </WrapPanel>
- </DataTemplate>
- </ItemsControl.Resources>
- </ItemsControl>
- </StackPanel>
- </Grid>
- </ScrollViewer>
- </GroupBox>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.Resources>
- </ItemsControl>
- </GroupBox>
- <GroupBox Margin="2" Header="{Binding}" BorderThickness="0.5" Visibility="{Binding HasDeveloperItem, Converter={extensions:BoolToVisibilityConverter}}">
- <GroupBox.HeaderTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding DeveloperItemHeader}" Margin="2" VerticalAlignment="Center"/>
- </StackPanel>
- </DataTemplate>
- </GroupBox.HeaderTemplate>
- <WrapPanel Margin="2" Orientation="Horizontal">
- <TextBlock Margin="2,0" Text="{Binding QuestionedState}" TextWrapping="Wrap"/>
- <TextBlock Margin="5,0" Text="{Binding ConfirmedState}" TextWrapping="Wrap"/>
- </WrapPanel>
- </GroupBox>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.Resources>
- </ItemsControl>
- </ScrollViewer>
- </GroupBox>
- <GroupBox x:Name="QueryReason" DockPanel.Dock="Bottom" Margin="2" MinHeight="64" Header="质疑建议" Foreground="White" BorderBrush="Gray" BorderThickness="0.5" >
- <TextBox Grid.Row="1" x:Name="QuerySuggest" Margin="2" VerticalContentAlignment="Top" Text="{Binding DeveloperQuestionedItem.Comment, UpdateSourceTrigger=PropertyChanged}" LostFocus="SaveQueryReason"
- TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Visible" Height="60"/>
- </GroupBox>
- <WrapPanel VerticalAlignment="Center" Orientation="Horizontal" Margin="2,5,0,0">
- <TextBlock Foreground="White" Text="质疑状态:" VerticalAlignment="Center" HorizontalAlignment="Left" />
- <TextBlock x:Name="txtQuestionedState" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,5,0" />
- <Button x:Name="btnQuestioned" Content="质疑" HorizontalAlignment="Right" Margin="2,0" Style="{StaticResource btn-danger}" Click="OnQuestionedFileClick"/>
- <Button x:Name="btnWithdrawalQuestioned" Content="撤销质疑" HorizontalAlignment="Right" Margin="2,0" Style="{StaticResource btn-warning}" Click="OnWithdrawalQuestionedFileClick"/>
- </WrapPanel>
- <WrapPanel VerticalAlignment="Center" Orientation="Horizontal" Margin="2,5,0,0">
- <TextBlock Foreground="White" Text="确认状态:" VerticalAlignment="Center" HorizontalAlignment="Left" />
- <TextBlock x:Name="txtConfirmedState" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left" />
- </WrapPanel>
- </StackPanel>
- </ScrollViewer>
- <local:WaitingSpinner Grid.Column="0" Grid.ColumnSpan="2" x:Name="Waiting" />
- </Grid>
- </Window>
|