MapAcquisition.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <UserControl x:Uid="UserControl_1"
  2. x:Class="OINA.Extender.WPF.Testharness.MapAcquisition"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:controls="clr-namespace:OINA.Extender.Controls;assembly=OINA.Extender">
  6. <UserControl.Resources>
  7. <!-- TextBlock -->
  8. <Style x:Uid="Style_1"
  9. x:Key="LeftLabel"
  10. TargetType="{x:Type TextBlock}">
  11. <Setter x:Uid="Setter_1"
  12. Property="HorizontalAlignment"
  13. Value="Left" />
  14. <Setter x:Uid="Setter_2"
  15. Property="VerticalAlignment"
  16. Value="Center" />
  17. <Setter x:Uid="Setter_3"
  18. Property="MinHeight"
  19. Value="16" />
  20. <Setter x:Uid="Setter_4"
  21. Property="MinWidth"
  22. Value="120" />
  23. <Setter x:Uid="Setter_5"
  24. Property="Margin"
  25. Value="8,4,0,0" />
  26. </Style>
  27. <!-- TextBox -->
  28. <Style x:Uid="Style_6"
  29. x:Key="TextBoxStyle"
  30. TargetType="{x:Type TextBox}">
  31. <Setter x:Uid="Setter_19"
  32. Property="HorizontalAlignment"
  33. Value="Left" />
  34. <Setter x:Uid="Setter_20"
  35. Property="VerticalAlignment"
  36. Value="Center" />
  37. <Setter x:Uid="Setter_21"
  38. Property="MinHeight"
  39. Value="18" />
  40. <Setter x:Uid="Setter_22"
  41. Property="MinWidth"
  42. Value="120" />
  43. <Setter x:Uid="Setter_23"
  44. Property="Margin"
  45. Value="4,4,0,0" />
  46. </Style>
  47. <!-- ComboBox -->
  48. <Style x:Uid="Style_7"
  49. x:Key="ComboBoxStyle"
  50. TargetType="{x:Type ComboBox}">
  51. <Setter x:Uid="Setter_24"
  52. Property="HorizontalAlignment"
  53. Value="Left" />
  54. <Setter x:Uid="Setter_25"
  55. Property="VerticalAlignment"
  56. Value="Center" />
  57. <Setter x:Uid="Setter_26"
  58. Property="MinHeight"
  59. Value="18" />
  60. <Setter x:Uid="Setter_27"
  61. Property="MinWidth"
  62. Value="120" />
  63. <Setter x:Uid="Setter_28"
  64. Property="Margin"
  65. Value="4,4,0,0" />
  66. </Style>
  67. <!-- Checkbox -->
  68. <Style x:Uid="Style_8"
  69. x:Key="CheckBoxStyle"
  70. TargetType="{x:Type CheckBox}">
  71. <Setter x:Uid="Setter_29"
  72. Property="HorizontalAlignment"
  73. Value="Left" />
  74. <Setter x:Uid="Setter_30"
  75. Property="VerticalAlignment"
  76. Value="Center" />
  77. <Setter x:Uid="Setter_31"
  78. Property="MinHeight"
  79. Value="16" />
  80. <Setter x:Uid="Setter_32"
  81. Property="Margin"
  82. Value="8,4,0,0" />
  83. </Style>
  84. </UserControl.Resources>
  85. <DockPanel x:Uid="DockPanel_1"
  86. LastChildFill="True">
  87. <StackPanel x:Uid="StackPanel_2"
  88. DockPanel.Dock="Left"
  89. HorizontalAlignment="Center"
  90. Orientation="Vertical">
  91. <GroupBox x:Uid="GroupBox_2"
  92. Header="Acquisition Settings"
  93. Margin="0,5,0,0">
  94. <StackPanel x:Uid="StackPanel_17">
  95. <!-- Process time -->
  96. <StackPanel x:Uid="StackPanel_21"
  97. Orientation="Horizontal">
  98. <TextBlock x:Uid="TextBlock_44"
  99. Text="Process Time:"
  100. Style="{StaticResource LeftLabel}" />
  101. <ComboBox x:Uid="ComboBox_1"
  102. SelectedItem="{Binding Settings.EdSettings.ProcessTime}"
  103. ItemsSource="{Binding Settings.EdCapabilities.AllowedProcessTimes}"
  104. Style="{StaticResource ComboBoxStyle}" />
  105. </StackPanel>
  106. <!-- Energy range -->
  107. <StackPanel x:Uid="StackPanel_22"
  108. Orientation="Horizontal">
  109. <TextBlock x:Uid="TextBlock_45"
  110. Text="Energy Range:"
  111. Style="{StaticResource LeftLabel}" />
  112. <ComboBox x:Uid="ComboBox_2"
  113. SelectedItem="{Binding Settings.EdSettings.EnergyRange}"
  114. ItemsSource="{Binding Settings.EdCapabilities.AllowedEnergyRanges}"
  115. Style="{StaticResource ComboBoxStyle}" />
  116. </StackPanel>
  117. <!-- Number of channels -->
  118. <StackPanel x:Uid="StackPanel_23"
  119. Orientation="Horizontal">
  120. <TextBlock x:Uid="TextBlock_46"
  121. Text="No. of Channels:"
  122. Style="{StaticResource LeftLabel}" />
  123. <ComboBox x:Uid="ComboBox_3"
  124. SelectedItem="{Binding Settings.EdSettings.NumberOfChannels}"
  125. ItemsSource="{Binding Settings.EdCapabilities.AllowedNumberOfChannels}"
  126. Style="{StaticResource ComboBoxStyle}" />
  127. </StackPanel>
  128. <!-- Primary hardware Id -->
  129. <StackPanel x:Uid="StackPanel_26"
  130. Orientation="Horizontal">
  131. <TextBlock x:Uid="TextBlock_42"
  132. Text="Primary Detector:"
  133. Style="{StaticResource LeftLabel}" />
  134. <ComboBox x:Uid="ComboBox_4"
  135. SelectedItem="{Binding PrimaryHardwareId}"
  136. ItemsSource="{Binding Settings.EdSettings.IsHardwareEnabled.Keys}"
  137. DisplayMemberPath="DisplayName"
  138. Style="{StaticResource ComboBoxStyle}" />
  139. </StackPanel>
  140. <!-- Secondary hardware Ids -->
  141. <StackPanel x:Uid="StackPanel_28"
  142. Orientation="Horizontal">
  143. <TextBlock x:Uid="TextBlock_43"
  144. Text="Secondary Detectors:"
  145. Style="{StaticResource LeftLabel}"
  146. VerticalAlignment="Top" />
  147. <ListBox x:Uid="ListBox_1"
  148. ItemsSource="{Binding SecondaryHardwareIds}"
  149. MinHeight="60"
  150. MinWidth="120"
  151. Margin="4 4,0,0">
  152. <ListBox.ItemTemplate>
  153. <DataTemplate x:Uid="DataTemplate_6">
  154. <StackPanel x:Uid="StackPanel_27"
  155. Orientation="Horizontal">
  156. <TextBlock x:Uid="TextBlock_40"
  157. Text="{Binding DisplayName, Mode=OneWay}" />
  158. <CheckBox x:Uid="CheckBox_5"
  159. IsChecked="{Binding IsDetectorEnabled}"
  160. Margin="8,0,0,0" />
  161. </StackPanel>
  162. </DataTemplate>
  163. </ListBox.ItemTemplate>
  164. </ListBox>
  165. </StackPanel>
  166. <!-- Number of frames -->
  167. <StackPanel x:Uid="StackPanel_29"
  168. Orientation="Horizontal">
  169. <TextBlock x:Uid="TextBlock_47"
  170. Text="Number of Frames:"
  171. Style="{StaticResource LeftLabel}" />
  172. <TextBox x:Uid="TextBox_1"
  173. Text="{Binding Settings.ScanSettings.FrameCount}"
  174. Style="{StaticResource TextBoxStyle}" />
  175. </StackPanel>
  176. </StackPanel>
  177. </GroupBox>
  178. <!-- Acquired Maps -->
  179. <GroupBox x:Uid="GroupBox_5"
  180. Header="Acquired Maps">
  181. <StackPanel x:Uid="StackPanel_40">
  182. <ListBox x:Uid="ListBox_2"
  183. ItemsSource="{Binding AcquiredMaps}"
  184. SelectedItem="{Binding SelectedMap}"
  185. Height="90"
  186. MinWidth="120"
  187. Margin="4 4,0,0">
  188. <ListBox.ItemTemplate>
  189. <DataTemplate x:Uid="DataTemplate_7">
  190. <TextBlock x:Uid="TextBlock_57"
  191. Text="{Binding Label}" />
  192. </DataTemplate>
  193. </ListBox.ItemTemplate>
  194. </ListBox>
  195. <Button x:Uid="Button_4"
  196. Margin="5"
  197. Width="100"
  198. VerticalAlignment="Center"
  199. HorizontalAlignment="Right"
  200. Click="DeleteMapButton_Click"
  201. Content="Delete Map" />
  202. </StackPanel>
  203. </GroupBox>
  204. <StackPanel x:Uid="StackPanel_41"
  205. Orientation="Horizontal">
  206. <Button x:Uid="Button_5"
  207. Margin="5,0,5,5"
  208. Width="100"
  209. VerticalAlignment="Center"
  210. Click="WindowIntegral_Click"
  211. Content="Window Integral" />
  212. <Button x:Uid="Button_6"
  213. Margin="5,0,5,5"
  214. Width="60"
  215. VerticalAlignment="Center"
  216. Click="FLS_Click"
  217. Content="FLS" />
  218. </StackPanel>
  219. <DockPanel x:Uid="DockPanel_2"
  220. LastChildFill="True">
  221. <Button x:Uid="Button_3"
  222. DockPanel.Dock="Right"
  223. Margin="5"
  224. Width="100"
  225. VerticalAlignment="Center"
  226. Click="CancelButton_Click"
  227. Content="Cancel" />
  228. <ProgressBar x:Uid="ProgressBar_1"
  229. Margin="5"
  230. Value="{Binding ProgressPercentage}" />
  231. </DockPanel>
  232. </StackPanel>
  233. <Grid x:Uid="Grid_1"
  234. DockPanel.Dock="Left">
  235. <Grid.RowDefinitions>
  236. <RowDefinition x:Uid="RowDefinition_1"
  237. Height="Auto" />
  238. <RowDefinition x:Uid="RowDefinition_2"
  239. Height="4*" />
  240. <RowDefinition x:Uid="RowDefinition_3"
  241. Height="3*" />
  242. </Grid.RowDefinitions>
  243. <StackPanel x:Uid="StackPanel_1"
  244. Grid.Row="0"
  245. HorizontalAlignment="Center"
  246. Orientation="Horizontal">
  247. <Button x:Uid="Button_1"
  248. Margin="5"
  249. Width="100"
  250. VerticalAlignment="Center"
  251. Click="StartButton_Click"
  252. Content="Start " />
  253. <Button x:Uid="Button_2"
  254. Margin="5"
  255. Width="100"
  256. VerticalAlignment="Center"
  257. Click="StopButton_Click"
  258. Content="Stop" />
  259. </StackPanel>
  260. <!-- Spectrum -->
  261. <controls:SpectrumViewer x:Uid="controls:SpectrumViewer_1"
  262. Grid.Row="1"
  263. Spectrum="{Binding Spectrum, Mode=OneWay}" />
  264. <!-- Element maps -->
  265. <ListBox x:Uid="ListBox_3"
  266. Grid.Row="2"
  267. ItemsSource="{Binding ElementMaps}"
  268. HorizontalContentAlignment="Stretch"
  269. VerticalContentAlignment="Stretch">
  270. <ListBox.ItemTemplate>
  271. <DataTemplate x:Uid="DataTemplate_8">
  272. <controls:ImageViewer x:Uid="controls:ImageViewer_1"
  273. DisplayImage="{Binding Path=.}" />
  274. </DataTemplate>
  275. </ListBox.ItemTemplate>
  276. <ListBox.ItemsPanel>
  277. <ItemsPanelTemplate x:Uid="ItemsPanelTemplate_1">
  278. <UniformGrid x:Uid="UniformGrid_1"
  279. IsItemsHost="True"
  280. Columns="4">
  281. </UniformGrid>
  282. </ItemsPanelTemplate>
  283. </ListBox.ItemsPanel>
  284. </ListBox>
  285. </Grid>
  286. </DockPanel>
  287. </UserControl>