FolderQuestionedImageViewer.xaml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. <Window x:Class="aipdev.FolderQuestionedImageViewer"
  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:model="clr-namespace:AIPlatform.Protocol.Model;assembly=AIPlatform.Protocol"
  7. xmlns:extensions="clr-namespace:aipdev.Extensions"
  8. xmlns:local="clr-namespace:aipdev"
  9. mc:Ignorable="d"
  10. Title="图像浏览器" Height="768" Width="1024" ShowInTaskbar="False" WindowStartupLocation="CenterOwner">
  11. <Window.Resources>
  12. <Style TargetType="{x:Type TextBox}" x:Key="ReadOnlyTextBoxStyle">
  13. <Style.Setters>
  14. <Setter Property="IsReadOnly" Value="True"/>
  15. <Setter Property="Background" Value="Transparent"/>
  16. <Setter Property="Foreground" Value="White"/>
  17. <Setter Property="BorderThickness" Value="0"/>
  18. <Setter Property="HorizontalAlignment" Value="Center"/>
  19. <Setter Property="VerticalAlignment" Value="Center"/>
  20. </Style.Setters>
  21. </Style>
  22. </Window.Resources>
  23. <Grid Background="Black">
  24. <Grid.ColumnDefinitions>
  25. <ColumnDefinition Width="55"/>
  26. <ColumnDefinition Width="*"/>
  27. <ColumnDefinition Width="55"/>
  28. <ColumnDefinition Width="0.36*"/>
  29. </Grid.ColumnDefinitions>
  30. <Image x:Name="Image" Grid.Column="0" Grid.ColumnSpan="3"/>
  31. <TextBlock x:Name="ImageIndex" Foreground="Red" FontSize="16" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,5,0,0" Width="50" TextWrapping="Wrap" />
  32. <Button Grid.Column="0" Margin="4,0,0,0" x:Name="PreviousImage" Width="64" Height="2000" OverridesDefaultStyle="True" Click="OnPreviousImageClick">
  33. <Button.Template>
  34. <ControlTemplate>
  35. <Grid x:Name="Bb" Width="64">
  36. <Border Background="Black" Opacity="0.5"></Border>
  37. <Border x:Name="Bib">
  38. <Image Opacity="0.5" x:Name="Bi" Width="50" Height="50" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" Source="Resources/Images/Left.png"></Image>
  39. </Border>
  40. </Grid>
  41. <ControlTemplate.Triggers>
  42. <Trigger Property="Button.IsMouseOver" Value="True">
  43. <Setter TargetName="Bi" Property="Opacity" Value="1"/>
  44. </Trigger>
  45. <Trigger Property="Button.IsPressed" Value="True">
  46. <Setter TargetName="Bib" Property="Padding" Value="2"/>
  47. </Trigger>
  48. </ControlTemplate.Triggers>
  49. </ControlTemplate>
  50. </Button.Template>
  51. </Button>
  52. <Button Grid.Column="2" Margin="0,0,4,0" x:Name="NextImage" Width="64" Height="1000" OverridesDefaultStyle="True" Click="OnNextImageClick">
  53. <Button.Template>
  54. <ControlTemplate>
  55. <Grid x:Name="Bb" Width="64">
  56. <Border Background="Black" Opacity="0.5"></Border>
  57. <Border x:Name="Bib">
  58. <Image Opacity="0.5" x:Name="Bi" Width="50" Height="50" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" Source="Resources/Images/Right.png"></Image>
  59. </Border>
  60. </Grid>
  61. <ControlTemplate.Triggers>
  62. <Trigger Property="Button.IsMouseOver" Value="True">
  63. <Setter TargetName="Bi" Property="Opacity" Value="1"/>
  64. </Trigger>
  65. <Trigger Property="Button.IsPressed" Value="True">
  66. <Setter TargetName="Bib" Property="Padding" Value="2"/>
  67. </Trigger>
  68. </ControlTemplate.Triggers>
  69. </ControlTemplate>
  70. </Button.Template>
  71. </Button>
  72. <ScrollViewer Grid.Column="3" VerticalScrollBarVisibility="Auto">
  73. <StackPanel>
  74. <!--<GroupBox Margin="4" MinHeight="64" Header="图像标签" Foreground="White" BorderBrush="Gray" BorderThickness="1" >
  75. <StackPanel VerticalAlignment="Center">
  76. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="CombinationTagNameTextBox" TextWrapping="Wrap"/>
  77. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="CombinationTagIdTextBox" TextWrapping="Wrap"/>
  78. </StackPanel>
  79. </GroupBox>-->
  80. <GroupBox Margin="2" MinHeight="64" Header="标注人员" Foreground="White" BorderBrush="Gray" BorderThickness="0.5" >
  81. <StackPanel VerticalAlignment="Stretch">
  82. <ListBox x:Name="LabelerList" FontSize="14" BorderThickness="0" DisplayMemberPath="Labeler.Name" ItemContainerStyle="{StaticResource LabelDataGroupConclusionItemStyle}"
  83. PreviewMouseLeftButtonDown="OnLabelerMouseLeftButtonDownAsync">
  84. <ListBox.ItemsPanel >
  85. <ItemsPanelTemplate>
  86. <WrapPanel Orientation="Horizontal" />
  87. </ItemsPanelTemplate>
  88. </ListBox.ItemsPanel>
  89. </ListBox>
  90. </StackPanel>
  91. </GroupBox>
  92. <GroupBox Margin="2" MinHeight="64" Header="图像信息" Foreground="White" BorderBrush="Gray" BorderThickness="0.5" >
  93. <StackPanel Margin="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
  94. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="ImageNameTextBox" Margin="2" HorizontalAlignment="Left" TextWrapping="Wrap"/>
  95. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" x:Name="ImageIdTextBox" Margin="2" HorizontalAlignment="Left" TextWrapping="Wrap"/>
  96. </StackPanel>
  97. </GroupBox>
  98. <GroupBox Margin="2" MinHeight="64" Header="标注结果" Foreground="White" BorderBrush="Gray" BorderThickness="0.5" >
  99. <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
  100. HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  101. <ItemsControl x:Name="Conclusions">
  102. <!--<ItemsControl.ItemsPanel>
  103. <ItemsPanelTemplate>
  104. <WrapPanel>
  105. </WrapPanel>
  106. </ItemsPanelTemplate>
  107. </ItemsControl.ItemsPanel>-->
  108. <ItemsControl.Resources>
  109. <DataTemplate DataType="{x:Type model:LabelConclusion}">
  110. <StackPanel Margin="2" Orientation="Horizontal">
  111. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Title}" TextWrapping="Wrap"/>
  112. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Unit}" TextWrapping="Wrap"/>
  113. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Content}" TextWrapping="Wrap"/>
  114. </StackPanel>
  115. </DataTemplate>
  116. </ItemsControl.Resources>
  117. </ItemsControl>
  118. </ScrollViewer>
  119. </GroupBox>
  120. <GroupBox Margin="2" x:Name="ReviewInfoGroup" MinHeight="64" Header="审核结果" Foreground="White" BorderBrush="Gray" BorderThickness="0.5" >
  121. <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
  122. HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  123. <ItemsControl x:Name="ReviewInfoList">
  124. <!--<ItemsControl.ItemsPanel>
  125. <ItemsPanelTemplate>
  126. <WrapPanel>
  127. </WrapPanel>
  128. </ItemsPanelTemplate>
  129. </ItemsControl.ItemsPanel>-->
  130. <ItemsControl.Resources>
  131. <DataTemplate DataType="{x:Type model:ReviewerInfo}">
  132. <StackPanel Margin="2" Orientation="Vertical">
  133. <GroupBox x:Name="ReviewerGroup" Header="{Binding}" BorderThickness="0.5">
  134. <GroupBox.HeaderTemplate>
  135. <DataTemplate>
  136. <StackPanel Orientation="Horizontal">
  137. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Text="{Binding Reviewer.Name}" Margin="2" VerticalAlignment="Stretch" FontWeight="Bold"/>
  138. </StackPanel>
  139. </DataTemplate>
  140. </GroupBox.HeaderTemplate>
  141. <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
  142. HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  143. <Grid>
  144. <Grid.RowDefinitions>
  145. <RowDefinition Height="Auto"/>
  146. <RowDefinition Height="*"/>
  147. </Grid.RowDefinitions>
  148. <StackPanel Grid.Row="0" Orientation="Horizontal">
  149. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="审核通过" Foreground="Green" Visibility="{Binding IsPassed, Converter={extensions:BoolToVisibilityConverter}}" TextWrapping="Wrap"/>
  150. </StackPanel>
  151. <StackPanel Grid.Row="1" Orientation="Vertical">
  152. <ItemsControl x:Name="Results" ItemsSource="{Binding Results}">
  153. <!--<ItemsControl.ItemsPanel>
  154. <ItemsPanelTemplate>
  155. <WrapPanel>
  156. </WrapPanel>
  157. </ItemsPanelTemplate>
  158. </ItemsControl.ItemsPanel>-->
  159. <ItemsControl.Resources>
  160. <DataTemplate DataType="{x:Type model:SingleReviewedResult}">
  161. <StackPanel Margin="2" Orientation="Horizontal">
  162. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Title}" TextWrapping="Wrap"/>
  163. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding ReviewResult}" Foreground="Red" TextWrapping="Wrap"/>
  164. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding ReviewComment}" Foreground="Orange" TextWrapping="Wrap"/>
  165. </StackPanel>
  166. </DataTemplate>
  167. </ItemsControl.Resources>
  168. </ItemsControl>
  169. </StackPanel>
  170. </Grid>
  171. </ScrollViewer>
  172. </GroupBox>
  173. </StackPanel>
  174. </DataTemplate>
  175. </ItemsControl.Resources>
  176. </ItemsControl>
  177. </ScrollViewer>
  178. </GroupBox>
  179. <GroupBox Margin="2" x:Name="RelabelInfoGroup" MinHeight="64" Header="历史结果" Foreground="White" BorderBrush="Gray" BorderThickness="0.5">
  180. <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
  181. HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  182. <ItemsControl x:Name="RelabelInfoList">
  183. <!--<ItemsControl.ItemsPanel>
  184. <ItemsPanelTemplate>
  185. <WrapPanel>
  186. </WrapPanel>
  187. </ItemsPanelTemplate>
  188. </ItemsControl.ItemsPanel>-->
  189. <ItemsControl.Resources>
  190. <DataTemplate DataType="{x:Type local:LabeledUltrasoundFileInfoModel}">
  191. <StackPanel Orientation="Vertical">
  192. <GroupBox Header="{Binding}" BorderThickness="0.5">
  193. <GroupBox.HeaderTemplate>
  194. <DataTemplate>
  195. <StackPanel Orientation="Horizontal">
  196. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Text="{Binding LabeledResultHeader}" Margin="2" VerticalAlignment="Center" FontWeight="Bold"/>
  197. <Button Focusable="False" Click="OnRelabelResultClick">
  198. <Button.Template>
  199. <ControlTemplate TargetType="{x:Type Button}">
  200. <Border x:Name="ButtonBorder" CornerRadius="2">
  201. <Image Source="Resources/Images/Image.png" Width="20" Height="20"/>
  202. </Border>
  203. <ControlTemplate.Triggers>
  204. <Trigger Property="IsMouseOver" Value="True">
  205. <Setter TargetName="ButtonBorder" Property="BorderThickness" Value="1"/>
  206. <Setter TargetName="ButtonBorder" Property="BorderBrush" Value="Gray"/>
  207. </Trigger>
  208. <DataTrigger Binding="{Binding IsSelected}" Value="True">
  209. <Setter TargetName="ButtonBorder" Property="BorderThickness" Value="2"/>
  210. <Setter TargetName="ButtonBorder" Property="BorderBrush" Value="Yellow"/>
  211. </DataTrigger>
  212. </ControlTemplate.Triggers>
  213. </ControlTemplate>
  214. </Button.Template>
  215. </Button>
  216. </StackPanel>
  217. </DataTemplate>
  218. </GroupBox.HeaderTemplate>
  219. <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
  220. HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  221. <ItemsControl ItemsSource="{Binding LabelConclusions}">
  222. <!--<ItemsControl.ItemsPanel>
  223. <ItemsPanelTemplate>
  224. <WrapPanel>
  225. </WrapPanel>
  226. </ItemsPanelTemplate>
  227. </ItemsControl.ItemsPanel>-->
  228. <ItemsControl.Resources>
  229. <DataTemplate DataType="{x:Type model:LabelConclusion}">
  230. <StackPanel Margin="2" Orientation="Horizontal">
  231. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Title}" TextWrapping="Wrap"/>
  232. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Unit}" TextWrapping="Wrap"/>
  233. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Content}" TextWrapping="Wrap"/>
  234. </StackPanel>
  235. </DataTemplate>
  236. </ItemsControl.Resources>
  237. </ItemsControl>
  238. </ScrollViewer>
  239. </GroupBox>
  240. <GroupBox Margin="2" Header="{Binding}" BorderThickness="0.5" Visibility="{Binding HasReviewedResult, Converter={extensions:BoolToVisibilityConverter}}">
  241. <GroupBox.HeaderTemplate>
  242. <DataTemplate>
  243. <StackPanel Orientation="Horizontal">
  244. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Text="{Binding ReviewedResultHeader}" Margin="2" VerticalAlignment="Center"/>
  245. </StackPanel>
  246. </DataTemplate>
  247. </GroupBox.HeaderTemplate>
  248. <ItemsControl ItemsSource="{Binding ReviewerInfos}">
  249. <!--<ItemsControl.ItemsPanel>
  250. <ItemsPanelTemplate>
  251. <WrapPanel>
  252. </WrapPanel>
  253. </ItemsPanelTemplate>
  254. </ItemsControl.ItemsPanel>-->
  255. <ItemsControl.Resources>
  256. <DataTemplate DataType="{x:Type model:ReviewerInfo}">
  257. <StackPanel Margin="2" Orientation="Vertical">
  258. <GroupBox Header="{Binding}" BorderThickness="0.5">
  259. <GroupBox.HeaderTemplate>
  260. <DataTemplate>
  261. <StackPanel Orientation="Horizontal">
  262. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Text="{Binding Reviewer.Name}" Margin="2" VerticalAlignment="Stretch"/>
  263. </StackPanel>
  264. </DataTemplate>
  265. </GroupBox.HeaderTemplate>
  266. <ScrollViewer PanningMode="Both" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
  267. HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  268. <Grid>
  269. <Grid.RowDefinitions>
  270. <RowDefinition Height="Auto"/>
  271. <RowDefinition Height="*"/>
  272. </Grid.RowDefinitions>
  273. <StackPanel Grid.Row="0" Orientation="Horizontal">
  274. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="审核通过" Foreground="Green" Visibility="{Binding IsPassed, Converter={extensions:BoolToVisibilityConverter}}" TextWrapping="Wrap"/>
  275. </StackPanel>
  276. <StackPanel Grid.Row="1" Orientation="Vertical">
  277. <ItemsControl ItemsSource="{Binding Results}">
  278. <!--<ItemsControl.ItemsPanel>
  279. <ItemsPanelTemplate>
  280. <WrapPanel>
  281. </WrapPanel>
  282. </ItemsPanelTemplate>
  283. </ItemsControl.ItemsPanel>-->
  284. <ItemsControl.Resources>
  285. <DataTemplate DataType="{x:Type model:SingleReviewedResult}">
  286. <StackPanel Margin="2" Orientation="Horizontal">
  287. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding Title}" TextWrapping="Wrap"/>
  288. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding ReviewResult}" Foreground="Red" TextWrapping="Wrap"/>
  289. <TextBox Style="{StaticResource ReadOnlyTextBoxStyle}" Margin="2,0" Text="{Binding ReviewComment}" Foreground="Orange" TextWrapping="Wrap"/>
  290. </StackPanel>
  291. </DataTemplate>
  292. </ItemsControl.Resources>
  293. </ItemsControl>
  294. </StackPanel>
  295. </Grid>
  296. </ScrollViewer>
  297. </GroupBox>
  298. </StackPanel>
  299. </DataTemplate>
  300. </ItemsControl.Resources>
  301. </ItemsControl>
  302. </GroupBox>
  303. <GroupBox Margin="2" Header="{Binding}" BorderThickness="0.5" Visibility="{Binding HasDeveloperItem, Converter={extensions:BoolToVisibilityConverter}}">
  304. <GroupBox.HeaderTemplate>
  305. <DataTemplate>
  306. <StackPanel Orientation="Horizontal">
  307. <TextBlock Text="{Binding DeveloperItemHeader}" Margin="2" VerticalAlignment="Center"/>
  308. </StackPanel>
  309. </DataTemplate>
  310. </GroupBox.HeaderTemplate>
  311. <StackPanel Margin="2" Orientation="Horizontal">
  312. <TextBlock Margin="2,0" Text="{Binding QuestionedState}" TextWrapping="Wrap"/>
  313. <TextBlock Margin="5,0" Text="{Binding ConfirmedState}" TextWrapping="Wrap"/>
  314. </StackPanel>
  315. </GroupBox>
  316. </StackPanel>
  317. </DataTemplate>
  318. </ItemsControl.Resources>
  319. </ItemsControl>
  320. </ScrollViewer>
  321. </GroupBox>
  322. <StackPanel VerticalAlignment="Center" Orientation="Horizontal" Margin="2,5,0,0">
  323. <TextBlock Foreground="White" Text="质疑状态:" VerticalAlignment="Center" HorizontalAlignment="Left" />
  324. <TextBlock x:Name="txtQuestionedState" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,5,0" />
  325. <Button x:Name="btnWithdrawalQuestioned" Content="撤销质疑" HorizontalAlignment="Right" Margin="2,0" Style="{StaticResource btn-warning}" Click="OnWithdrawalQuestionedFileClick"/>
  326. </StackPanel>
  327. <StackPanel VerticalAlignment="Center" Orientation="Horizontal" Margin="2,10,0,0">
  328. <TextBlock Foreground="White" Text="确认状态:" VerticalAlignment="Center" HorizontalAlignment="Left" />
  329. <TextBlock x:Name="txtConfirmedState" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,5,0" />
  330. <Button x:Name="btnAccepted" Content="接受" HorizontalAlignment="Right" Margin="2,0" Style="{StaticResource btn-success}" Click="OnAcceptedFileClick"/>
  331. <Button x:Name="btnAbandoned" Content="弃用" HorizontalAlignment="Right" Margin="2,0" Style="{StaticResource btn-danger}" Click="OnAbandonedFileClick"/>
  332. </StackPanel>
  333. </StackPanel>
  334. </ScrollViewer>
  335. <local:WaitingSpinner Grid.Column="0" Grid.ColumnSpan="2" x:Name="Waiting"/>
  336. </Grid>
  337. </Window>