XSyncMapAcquisition.xaml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <UserControl x:Uid="UserControl_1"
  2. x:Class="OINA.Extender.WPF.Testharness.XSyncMapAcquisition"
  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.XSyncSettings.FrameCount}"
  174. Style="{StaticResource TextBoxStyle}" />
  175. </StackPanel>
  176. <!-- Synchronization Mode -->
  177. <StackPanel x:Uid="StackPanel_30"
  178. Orientation="Horizontal">
  179. <TextBlock x:Uid="TextBlock_48"
  180. Text="Synchronization Mode:"
  181. Style="{StaticResource LeftLabel}" />
  182. <ComboBox x:Uid="ComboBox_5"
  183. SelectedItem="{Binding Settings.XSyncSettings.SynchronizationMode}"
  184. ItemsSource="{Binding Settings.XSyncCapabilities.AllowedSynchronizationModes}"
  185. Style="{StaticResource ComboBoxStyle}" />
  186. </StackPanel>
  187. <!-- CAS Line Sync -->
  188. <GroupBox x:Uid="GroupBox_3"
  189. Header="CAS Line Sync"
  190. Margin="8,0,0,0">
  191. <StackPanel x:Uid="StackPanel_31">
  192. <!-- Dwell time -->
  193. <StackPanel x:Uid="StackPanel_32"
  194. Orientation="Horizontal">
  195. <TextBlock x:Uid="TextBlock_49"
  196. Text="Dwell time (us):"
  197. Style="{StaticResource LeftLabel}"
  198. MinWidth="106" />
  199. <TextBox x:Uid="TextBox_2"
  200. Text="{Binding Settings.XSyncSettings.LineSync.DwellTimeMicroSeconds}"
  201. Style="{StaticResource TextBoxStyle}" />
  202. </StackPanel>
  203. <!-- Line run up -->
  204. <StackPanel x:Uid="StackPanel_33"
  205. Orientation="Horizontal">
  206. <TextBlock x:Uid="TextBlock_50"
  207. Text="Line run up (us):"
  208. Style="{StaticResource LeftLabel}"
  209. MinWidth="106" />
  210. <TextBox x:Uid="TextBox_3"
  211. Text="{Binding Settings.XSyncSettings.LineSync.LineRunUpMicroSeconds}"
  212. Style="{StaticResource TextBoxStyle}" />
  213. </StackPanel>
  214. <!-- Bin factor Y -->
  215. <StackPanel x:Uid="StackPanel_34"
  216. Orientation="Horizontal">
  217. <TextBlock x:Uid="TextBlock_51"
  218. Text="Bin factor Y:"
  219. Style="{StaticResource LeftLabel}"
  220. MinWidth="106" />
  221. <TextBox x:Uid="TextBox_4"
  222. Text="{Binding Settings.XSyncSettings.LineSync.BinFactorY}"
  223. Style="{StaticResource TextBoxStyle}" />
  224. </StackPanel>
  225. </StackPanel>
  226. </GroupBox>
  227. </StackPanel>
  228. </GroupBox>
  229. <!-- Acquisition Status -->
  230. <GroupBox x:Uid="GroupBox_4"
  231. Header="Acquisition Status">
  232. <StackPanel x:Uid="StackPanel_36">
  233. <!-- Pause State -->
  234. <StackPanel x:Uid="StackPanel_37"
  235. Orientation="Horizontal">
  236. <TextBlock x:Uid="TextBlock_52"
  237. Text="Pause State:"
  238. Style="{StaticResource LeftLabel}" />
  239. <TextBlock x:Uid="TextBlock_53"
  240. Text="{Binding PauseResumeState}"
  241. Style="{StaticResource LeftLabel}" />
  242. </StackPanel>
  243. <!-- Is Paused -->
  244. <StackPanel x:Uid="StackPanel_38"
  245. Orientation="Horizontal">
  246. <TextBlock x:Uid="TextBlock_54"
  247. Text="Is Paused:"
  248. Style="{StaticResource LeftLabel}" />
  249. <CheckBox x:Uid="CheckBox_6"
  250. IsChecked="{Binding IsPaused}"
  251. Style="{StaticResource CheckBoxStyle}" />
  252. </StackPanel>
  253. <!-- Completed frames -->
  254. <StackPanel x:Uid="StackPanel_39"
  255. Orientation="Horizontal">
  256. <TextBlock x:Uid="TextBlock_55"
  257. Text="Completed Frames:"
  258. Style="{StaticResource LeftLabel}" />
  259. <TextBlock x:Uid="TextBlock_56"
  260. Text="{Binding CompletedFrames}"
  261. Style="{StaticResource LeftLabel}" />
  262. </StackPanel>
  263. </StackPanel>
  264. </GroupBox>
  265. <!-- Acquired Maps -->
  266. <GroupBox x:Uid="GroupBox_5"
  267. Header="Acquired Maps">
  268. <StackPanel x:Uid="StackPanel_40">
  269. <ListBox x:Uid="ListBox_2"
  270. ItemsSource="{Binding AcquiredMaps}"
  271. SelectedItem="{Binding SelectedMap}"
  272. Height="90"
  273. MinWidth="120"
  274. Margin="4 4,0,0">
  275. <ListBox.ItemTemplate>
  276. <DataTemplate x:Uid="DataTemplate_7">
  277. <TextBlock x:Uid="TextBlock_57"
  278. Text="{Binding Label}" />
  279. </DataTemplate>
  280. </ListBox.ItemTemplate>
  281. </ListBox>
  282. <Button x:Uid="Button_4"
  283. Margin="5"
  284. Width="100"
  285. VerticalAlignment="Center"
  286. HorizontalAlignment="Right"
  287. Click="DeleteMapButton_Click"
  288. Content="Delete Map" />
  289. </StackPanel>
  290. </GroupBox>
  291. <StackPanel x:Uid="StackPanel_41"
  292. Orientation="Horizontal">
  293. <Button x:Uid="Button_5"
  294. Margin="5,0,5,5"
  295. Width="100"
  296. VerticalAlignment="Center"
  297. Click="WindowIntegral_Click"
  298. Content="Window Integral" />
  299. <Button x:Uid="Button_6"
  300. Margin="5,0,5,5"
  301. Width="60"
  302. VerticalAlignment="Center"
  303. Click="FLS_Click"
  304. Content="FLS" />
  305. </StackPanel>
  306. <DockPanel x:Uid="DockPanel_2"
  307. LastChildFill="True">
  308. <Button x:Uid="Button_3"
  309. DockPanel.Dock="Right"
  310. Margin="5"
  311. Width="100"
  312. VerticalAlignment="Center"
  313. Click="CancelButton_Click"
  314. Content="Cancel" />
  315. <ProgressBar x:Uid="ProgressBar_1"
  316. Margin="5"
  317. Value="{Binding ProgressPercentage}" />
  318. </DockPanel>
  319. </StackPanel>
  320. <Grid x:Uid="Grid_1"
  321. DockPanel.Dock="Left">
  322. <Grid.RowDefinitions>
  323. <RowDefinition x:Uid="RowDefinition_1"
  324. Height="Auto" />
  325. <RowDefinition x:Uid="RowDefinition_2"
  326. Height="4*" />
  327. <RowDefinition x:Uid="RowDefinition_3"
  328. Height="3*" />
  329. </Grid.RowDefinitions>
  330. <StackPanel x:Uid="StackPanel_1"
  331. Grid.Row="0"
  332. HorizontalAlignment="Center"
  333. Orientation="Horizontal">
  334. <Button x:Uid="Button_1"
  335. Margin="5"
  336. Width="100"
  337. VerticalAlignment="Center"
  338. Click="StartButton_Click"
  339. Content="Start " />
  340. <Button x:Uid="Button_2"
  341. Margin="5"
  342. Width="100"
  343. VerticalAlignment="Center"
  344. Click="StopButton_Click"
  345. Content="Stop" />
  346. </StackPanel>
  347. <!-- Spectrum -->
  348. <controls:SpectrumViewer x:Uid="controls:SpectrumViewer_1"
  349. Grid.Row="1"
  350. Spectrum="{Binding Spectrum, Mode=OneWay}" />
  351. <!-- Element maps -->
  352. <ListBox x:Uid="ListBox_3"
  353. Grid.Row="2"
  354. ItemsSource="{Binding ElementMaps}"
  355. HorizontalContentAlignment="Stretch"
  356. VerticalContentAlignment="Stretch">
  357. <ListBox.ItemTemplate>
  358. <DataTemplate x:Uid="DataTemplate_8">
  359. <controls:ImageViewer x:Uid="controls:ImageViewer_1"
  360. DisplayImage="{Binding Path=.}" />
  361. </DataTemplate>
  362. </ListBox.ItemTemplate>
  363. <ListBox.ItemsPanel>
  364. <ItemsPanelTemplate x:Uid="ItemsPanelTemplate_1">
  365. <UniformGrid x:Uid="UniformGrid_1"
  366. IsItemsHost="True"
  367. Columns="4">
  368. </UniformGrid>
  369. </ItemsPanelTemplate>
  370. </ListBox.ItemsPanel>
  371. </ListBox>
  372. </Grid>
  373. </DockPanel>
  374. </UserControl>