SettingWindow.xaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <Window x:Class="AICustomizeSDKDemo.Presentation.SettingWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:extensions="clr-namespace:AICustomizeSDKDemo.Extensions"
  7. mc:Ignorable="d"
  8. Title="系统设置"
  9. Height="500"
  10. Width="500"
  11. WindowStartupLocation="CenterScreen">
  12. <Grid>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="*" />
  15. <RowDefinition Height="Auto" />
  16. </Grid.RowDefinitions>
  17. <Grid.ColumnDefinitions>
  18. <ColumnDefinition Width="*" />
  19. </Grid.ColumnDefinitions>
  20. <ScrollViewer Grid.Row="0"
  21. VerticalScrollBarVisibility="Auto"
  22. HorizontalScrollBarVisibility="Disabled">
  23. <StackPanel Margin="5">
  24. <GroupBox Header="超声图像来源">
  25. <StackPanel>
  26. <StackPanel Orientation="Horizontal">
  27. <TextBlock Text="输入源"
  28. Margin="5"
  29. Width="120"
  30. VerticalAlignment="Center"
  31. HorizontalAlignment="Left"></TextBlock>
  32. <StackPanel Orientation="Horizontal">
  33. <TextBox Height="25"
  34. Margin="5"
  35. Width="185"
  36. VerticalAlignment="Center"
  37. Text="{Binding VideoFilePath}"
  38. ToolTip="{Binding VideoFilePath}"
  39. IsReadOnly="True" />
  40. <Button Margin="5"
  41. Content="浏览"
  42. Width="35"
  43. Command="{Binding BrowseCommand}" />
  44. </StackPanel>
  45. </StackPanel>
  46. </StackPanel>
  47. </GroupBox>
  48. <GroupBox Header="AI功能设定">
  49. <StackPanel Orientation="Vertical">
  50. <StackPanel Orientation="Horizontal">
  51. <TextBlock Margin="5"
  52. Text="启用AI诊断"
  53. Width="120"
  54. VerticalAlignment="Center"
  55. HorizontalAlignment="Left"></TextBlock>
  56. <CheckBox Margin="5"
  57. VerticalAlignment="Center"
  58. IsChecked="{Binding IsEnableAI}"
  59. HorizontalAlignment="Center"></CheckBox>
  60. </StackPanel>
  61. <StackPanel Orientation="Horizontal"
  62. IsEnabled="{Binding IsEnableAI}">
  63. <TextBlock Margin="5"
  64. Text="检测模式"
  65. Width="120"
  66. VerticalAlignment="Center"
  67. HorizontalAlignment="Left"></TextBlock>
  68. <ComboBox Margin="5"
  69. Width="230"
  70. VerticalAlignment="Center"
  71. SelectedValue="{Binding DetectMode}"
  72. SelectedValuePath="Tag"
  73. Cursor="Hand"
  74. HorizontalContentAlignment="Center">
  75. <ComboBoxItem Content="按每秒频次计算"
  76. Tag="TimesPerSecond" />
  77. <ComboBoxItem Content="按时间间隔计算"
  78. Tag="PeriodicIntervals" />
  79. </ComboBox>
  80. </StackPanel>
  81. <StackPanel Orientation="Horizontal"
  82. IsEnabled="{Binding IsEnableAI}">
  83. <TextBlock Margin="5"
  84. Text="超声图像检测间隔"
  85. Width="120"
  86. VerticalAlignment="Center"
  87. HorizontalAlignment="Left"></TextBlock>
  88. <StackPanel Orientation="Horizontal"
  89. Visibility="{Binding IsIntervalTimeMode,Converter={extensions:BoolToVisibilityConverter}}">
  90. <TextBox Height="25"
  91. Margin="5"
  92. Width="185"
  93. VerticalAlignment="Center"
  94. Text="{Binding IntervalTime}"
  95. HorizontalContentAlignment="Center" />
  96. <TextBlock Margin="5"
  97. Text="ms"
  98. VerticalAlignment="Center"
  99. Width="35" />
  100. </StackPanel>
  101. <ComboBox Width="230"
  102. VerticalAlignment="Center"
  103. SelectedValue="{Binding DetectTps}"
  104. SelectedValuePath="Content"
  105. Cursor="Hand"
  106. HorizontalContentAlignment="Center"
  107. Visibility="{Binding IsIntervalTimeMode,Converter={extensions:BoolToVisibilityConverter},ConverterParameter=Reverse}">
  108. <ComboBoxItem Content="1" />
  109. <ComboBoxItem Content="2" />
  110. <ComboBoxItem Content="3" />
  111. <ComboBoxItem Content="4" />
  112. <ComboBoxItem Content="5" />
  113. </ComboBox>
  114. </StackPanel>
  115. <StackPanel Orientation="Horizontal"
  116. IsEnabled="{Binding IsEnableAI}">
  117. <TextBlock Margin="5"
  118. Text="AI识别类型"
  119. Width="120"
  120. VerticalAlignment="Center"
  121. HorizontalAlignment="Left"></TextBlock>
  122. <ComboBox Margin="5"
  123. Width="230"
  124. VerticalAlignment="Center"
  125. SelectedValue="{Binding AIDiagnosisType}"
  126. SelectedValuePath="Tag"
  127. Cursor="Hand"
  128. HorizontalContentAlignment="Center">
  129. <ComboBoxItem Content="CustomizeDiagnosis"
  130. Tag="CustomizeDiagnosis" />
  131. </ComboBox>
  132. </StackPanel>
  133. <StackPanel Orientation="Horizontal"
  134. IsEnabled="{Binding IsEnableAI}">
  135. <TextBlock Margin="5"
  136. Text="是否异步"
  137. Width="120"
  138. VerticalAlignment="Center"
  139. HorizontalAlignment="Left"></TextBlock>
  140. <CheckBox Margin="5"
  141. VerticalAlignment="Center"
  142. IsChecked="{Binding IsAsync}"
  143. HorizontalAlignment="Center"></CheckBox>
  144. </StackPanel>
  145. <StackPanel Orientation="Horizontal">
  146. <TextBlock Margin="5"
  147. Text="引擎详情"
  148. Width="120"
  149. VerticalAlignment="Center"
  150. HorizontalAlignment="Left"></TextBlock>
  151. <DataGrid Margin="5"
  152. Width="300"
  153. Height="100"
  154. ItemsSource="{Binding CurrentEngineInfos}"
  155. AutoGenerateColumns="False"
  156. VerticalAlignment="Center"
  157. HorizontalContentAlignment="Center"
  158. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  159. ScrollViewer.VerticalScrollBarVisibility="Auto">
  160. <DataGrid.Columns>
  161. <DataGridTemplateColumn Header="引擎名称"
  162. Width="*">
  163. <DataGridTemplateColumn.CellTemplate>
  164. <DataTemplate>
  165. <TextBlock Text="{Binding EngineName}"
  166. TextWrapping="Wrap"
  167. Margin="10,0,10,0" />
  168. </DataTemplate>
  169. </DataGridTemplateColumn.CellTemplate>
  170. </DataGridTemplateColumn>
  171. <DataGridTemplateColumn Header="版本"
  172. Width="Auto">
  173. <DataGridTemplateColumn.CellTemplate>
  174. <DataTemplate>
  175. <TextBlock Text="{Binding Version}"
  176. TextWrapping="Wrap"
  177. Margin="10,0,10,0" />
  178. </DataTemplate>
  179. </DataGridTemplateColumn.CellTemplate>
  180. </DataGridTemplateColumn>
  181. <DataGridTemplateColumn Header="提供方" Width="Auto">
  182. <DataGridTemplateColumn.CellTemplate>
  183. <DataTemplate>
  184. <TextBlock Text="{Binding Vendor}"
  185. TextWrapping="Wrap"
  186. Margin="10,0,10,0" />
  187. </DataTemplate>
  188. </DataGridTemplateColumn.CellTemplate>
  189. </DataGridTemplateColumn>
  190. </DataGrid.Columns>
  191. </DataGrid>
  192. </StackPanel>
  193. </StackPanel>
  194. </GroupBox>
  195. </StackPanel>
  196. </ScrollViewer>
  197. <Grid Grid.Row="1"
  198. HorizontalAlignment="Center">
  199. <StackPanel Orientation="Horizontal"
  200. HorizontalAlignment="Center">
  201. <Button Margin="5"
  202. Height="25"
  203. Width="70"
  204. Content="保存并退出"
  205. Click="OnSaveAndExit" />
  206. </StackPanel>
  207. </Grid>
  208. </Grid>
  209. </Window>