SweepConfigView.axaml 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. <UserControl
  2. x:Class="ShakerApp.Views.SweepConfigView"
  3. xmlns="https://github.com/avaloniaui"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="using:ShakerApp"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:model="using:Shaker.Models"
  9. xmlns:oxy="http://oxyplot.org/avalonia"
  10. xmlns:suki="https://github.com/kikipoulet/SukiUI"
  11. xmlns:view="using:ShakerApp.Views"
  12. xmlns:vm="using:ShakerApp.ViewModels"
  13. d:DesignHeight="450"
  14. d:DesignWidth="800"
  15. x:DataType="vm:SweepConfigViewModel"
  16. DataContext="{Binding Source={x:Static vm:SweepConfigViewModel.Instance}}"
  17. mc:Ignorable="d">
  18. <UserControl.Resources>
  19. <x:Double x:Key="MyConverterParameter">80</x:Double>
  20. </UserControl.Resources>
  21. <Grid RowDefinitions="1.2*,*">
  22. <Grid ColumnDefinitions="*,*,*">
  23. <oxy:PlotView
  24. Background="Transparent"
  25. DefaultTrackerTemplate="{StaticResource DefaultTrackerTemplate}"
  26. Model="{Binding AccelerationModel}" />
  27. <Button
  28. Margin="0,0,16,56"
  29. HorizontalAlignment="Right"
  30. VerticalAlignment="Bottom"
  31. Classes="Basic"
  32. Cursor="Hand">
  33. <Interaction.Behaviors>
  34. <EventTriggerBehavior EventName="Click">
  35. <InvokeCommandAction Command="{Binding Source={x:Static vm:PlotConfigViewModel.Instance}, Path=PlotConfigCommand}" CommandParameter="{Binding AccelerationModel}" />
  36. </EventTriggerBehavior>
  37. </Interaction.Behaviors>
  38. <PathIcon Background="Transparent" Data="{StaticResource SettingGeometry}">
  39. <PathIcon.Styles>
  40. <Style Selector="PathIcon:pointerover">
  41. <Setter Property="Foreground" Value="Black" />
  42. </Style>
  43. <Style Selector="PathIcon">
  44. <Setter Property="Foreground" Value="#AAAAAAAA" />
  45. </Style>
  46. </PathIcon.Styles>
  47. </PathIcon>
  48. </Button>
  49. <oxy:PlotView
  50. Grid.Column="1"
  51. Background="Transparent"
  52. DefaultTrackerTemplate="{StaticResource DefaultTrackerTemplate}"
  53. Model="{Binding VelocityModel}" />
  54. <Button
  55. Grid.Column="1"
  56. Margin="0,0,16,56"
  57. HorizontalAlignment="Right"
  58. VerticalAlignment="Bottom"
  59. Classes="Basic"
  60. Cursor="Hand">
  61. <Interaction.Behaviors>
  62. <EventTriggerBehavior EventName="Click">
  63. <InvokeCommandAction Command="{Binding Source={x:Static vm:PlotConfigViewModel.Instance}, Path=PlotConfigCommand}" CommandParameter="{Binding VelocityModel}" />
  64. </EventTriggerBehavior>
  65. </Interaction.Behaviors>
  66. <PathIcon Background="Transparent" Data="{StaticResource SettingGeometry}">
  67. <PathIcon.Styles>
  68. <Style Selector="PathIcon:pointerover">
  69. <Setter Property="Foreground" Value="Black" />
  70. </Style>
  71. <Style Selector="PathIcon">
  72. <Setter Property="Foreground" Value="#AAAAAAAA" />
  73. </Style>
  74. </PathIcon.Styles>
  75. </PathIcon>
  76. </Button>
  77. <oxy:PlotView
  78. Grid.Column="2"
  79. Background="Transparent"
  80. DefaultTrackerTemplate="{StaticResource DefaultTrackerTemplate}"
  81. Model="{Binding DisplacementModel}" />
  82. <Button
  83. Grid.Column="2"
  84. Margin="0,0,16,56"
  85. HorizontalAlignment="Right"
  86. VerticalAlignment="Bottom"
  87. Classes="Basic"
  88. Cursor="Hand">
  89. <Interaction.Behaviors>
  90. <EventTriggerBehavior EventName="Click">
  91. <InvokeCommandAction Command="{Binding Source={x:Static vm:PlotConfigViewModel.Instance}, Path=PlotConfigCommand}" CommandParameter="{Binding DisplacementModel}" />
  92. </EventTriggerBehavior>
  93. </Interaction.Behaviors>
  94. <PathIcon Background="Transparent" Data="{StaticResource SettingGeometry}">
  95. <PathIcon.Styles>
  96. <Style Selector="PathIcon:pointerover">
  97. <Setter Property="Foreground" Value="Black" />
  98. </Style>
  99. <Style Selector="PathIcon">
  100. <Setter Property="Foreground" Value="#AAAAAAAA" />
  101. </Style>
  102. </PathIcon.Styles>
  103. </PathIcon>
  104. </Button>
  105. </Grid>
  106. <TabControl Grid.Row="1">
  107. <TabItem Header="{DynamicResource SweepSpectrum}">
  108. <Grid RowDefinitions="*,56">
  109. <StackPanel
  110. Width="860"
  111. HorizontalAlignment="Left"
  112. VerticalAlignment="Top">
  113. <Grid
  114. Height="{StaticResource ItemHeight}"
  115. Background="LightGray"
  116. ColumnDefinitions="40,120,140,*,100,100,100,100">
  117. <TextBlock
  118. HorizontalAlignment="Center"
  119. VerticalAlignment="Center"
  120. Text="{DynamicResource ServoValveIndex}" />
  121. <TextBlock
  122. Grid.Column="1"
  123. HorizontalAlignment="Center"
  124. VerticalAlignment="Center">
  125. <Run Text="{DynamicResource Frequency}" />
  126. <Run Text="(Hz)" />
  127. </TextBlock>
  128. <TextBlock
  129. Grid.Column="2"
  130. HorizontalAlignment="Center"
  131. VerticalAlignment="Center"
  132. Text="{DynamicResource SweepValueType}" />
  133. <TextBlock
  134. Grid.Column="3"
  135. HorizontalAlignment="Center"
  136. VerticalAlignment="Center"
  137. Text="{DynamicResource Value}" />
  138. <TextBlock
  139. Grid.Column="4"
  140. HorizontalAlignment="Center"
  141. VerticalAlignment="Center"
  142. Text="{DynamicResource UpStopAcceleration}" />
  143. <TextBlock
  144. Grid.Column="5"
  145. HorizontalAlignment="Center"
  146. VerticalAlignment="Center"
  147. Text="{DynamicResource UpWarnAcceleration}" />
  148. <TextBlock
  149. Grid.Column="6"
  150. HorizontalAlignment="Center"
  151. VerticalAlignment="Center"
  152. Text="{DynamicResource DownStopAcceleration}" />
  153. <TextBlock
  154. Grid.Column="7"
  155. HorizontalAlignment="Center"
  156. VerticalAlignment="Center"
  157. Text="{DynamicResource DownWarnAcceleration}" />
  158. </Grid>
  159. <TextBlock
  160. Height="1"
  161. Foreground="Transparent"
  162. Text="{Binding $parent.Bounds.Height}" />
  163. <ScrollViewer Height="{Binding $parent.Bounds.Height, Converter={StaticResource SubtractionConverter}, ConverterParameter={StaticResource ItemHeight}}">
  164. <ItemsControl ItemsSource="{Binding SweepItems}">
  165. <ItemsControl.ItemTemplate>
  166. <DataTemplate>
  167. <Grid ColumnDefinitions="40,120,140,*,100,100,100,100">
  168. <TextBlock
  169. HorizontalAlignment="Center"
  170. VerticalAlignment="Center"
  171. Text="{Binding Index}" />
  172. <NumericUpDown
  173. Grid.Column="1"
  174. Increment="{Binding $parent[ItemsControl].DataContext.Increment}"
  175. Maximum="{Binding Source={x:Static vm:ShakerConfigViewModel.Instance}, Path=MaxFrequency}"
  176. Minimum="{Binding Source={x:Static vm:ShakerConfigViewModel.Instance}, Path=MinFrequency}"
  177. Value="{Binding Value.Frequency}" />
  178. <ComboBox
  179. Grid.Column="2"
  180. ItemsSource="{Binding Value.SweepValueType, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}"
  181. SelectedValue="{Binding Path=Value.SweepValueType}"
  182. SelectedValueBinding="{Binding Value}">
  183. <ComboBox.ItemTemplate>
  184. <DataTemplate>
  185. <TextBlock Text="{local:ResourceBinding Key}" />
  186. </DataTemplate>
  187. </ComboBox.ItemTemplate>
  188. </ComboBox>
  189. <StackPanel
  190. Grid.Column="3"
  191. Margin="4,0,4,0"
  192. Orientation="Horizontal">
  193. <NumericUpDown
  194. Width="120"
  195. Increment="0.01"
  196. Minimum="0"
  197. Value="{Binding Value.Value}" />
  198. <TextBlock
  199. Margin="4,0,0,0"
  200. VerticalAlignment="Center"
  201. Classes.Displacement="{Binding Value.SweepValueType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SweepValueType.FixedDisplacement}}"
  202. Classes.DynamicAcceleration="{Binding Value.SweepValueType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SweepValueType.DynamicAcceleration}}"
  203. Classes.FixedAcceleration="{Binding Value.SweepValueType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SweepValueType.FixedAcceleration}}"
  204. Classes.Velocity="{Binding Value.SweepValueType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SweepValueType.FixedVelocity}}">
  205. <TextBlock.Styles>
  206. <Style Selector="TextBlock.Displacement">
  207. <Setter Property="Text" Value="mm" />
  208. </Style>
  209. <Style Selector="TextBlock.Velocity">
  210. <Setter Property="Text" Value="m/s" />
  211. </Style>
  212. <Style Selector="TextBlock.FixedAcceleration">
  213. <Setter Property="Text" Value="g" />
  214. </Style>
  215. <Style Selector="TextBlock.DynamicAcceleration">
  216. <Setter Property="Text" Value="g" />
  217. </Style>
  218. </TextBlock.Styles>
  219. </TextBlock>
  220. </StackPanel>
  221. <NumericUpDown
  222. Grid.Column="4"
  223. Margin="4,0,4,0"
  224. Increment="0.5"
  225. Minimum="{Binding Value.UpWarn}"
  226. Value="{Binding Value.UpStop}" />
  227. <NumericUpDown
  228. Grid.Column="5"
  229. Margin="4,0,4,0"
  230. Increment="0.5"
  231. Maximum="{Binding Value.UpStop}"
  232. Minimum="0.5"
  233. Value="{Binding Value.UpWarn}" />
  234. <NumericUpDown
  235. Grid.Column="6"
  236. Margin="4,0,4,0"
  237. Increment="0.5"
  238. Maximum="{Binding Value.DownWarn}"
  239. Value="{Binding Value.DownStop}" />
  240. <NumericUpDown
  241. Grid.Column="7"
  242. Margin="4,0,4,0"
  243. Increment="0.5"
  244. Maximum="{Binding Value.DownStop}"
  245. Minimum="-0.5"
  246. Value="{Binding Value.DownWarn}" />
  247. </Grid>
  248. </DataTemplate>
  249. </ItemsControl.ItemTemplate>
  250. </ItemsControl>
  251. </ScrollViewer>
  252. </StackPanel>
  253. <StackPanel
  254. Grid.Row="1"
  255. HorizontalAlignment="Center"
  256. VerticalAlignment="Center"
  257. Orientation="Horizontal">
  258. <Button
  259. Command="{Binding RefreshCommand}"
  260. Content="{DynamicResource RefreshItem}"
  261. IsEnabled="{Binding RefreshEnabled}" />
  262. <Button
  263. Margin="120,0,0,0"
  264. Command="{Binding AddCommand}"
  265. Content="{DynamicResource AddItem}"
  266. IsEnabled="{Binding AddEnabled}" />
  267. <Button
  268. Margin="120,0,0,0"
  269. Command="{Binding DeleteCommand}"
  270. Content="{DynamicResource DelLastItem}"
  271. IsEnabled="{Binding DeleteEnabled}" />
  272. <Button
  273. Margin="120,0,0,0"
  274. Command="{Binding MaxLoadCommand}"
  275. Content="{DynamicResource MaxLoad}" />
  276. </StackPanel>
  277. </Grid>
  278. </TabItem>
  279. <TabItem Header="{DynamicResource SweepLimit}">
  280. <StackPanel
  281. Width="660"
  282. HorizontalAlignment="Left"
  283. VerticalAlignment="Top">
  284. <Grid
  285. Height="{StaticResource ItemHeight}"
  286. Background="LightGray"
  287. ColumnDefinitions="*,*,*,*">
  288. <TextBlock
  289. HorizontalAlignment="Center"
  290. VerticalAlignment="Center"
  291. Text="{DynamicResource Item}" />
  292. <TextBlock
  293. Grid.Column="1"
  294. HorizontalAlignment="Center"
  295. VerticalAlignment="Center"
  296. Text="{DynamicResource Ampt}" />
  297. <TextBlock
  298. Grid.Column="2"
  299. HorizontalAlignment="Center"
  300. VerticalAlignment="Center"
  301. Text="{DynamicResource SweepLimit}" />
  302. <TextBlock
  303. Grid.Column="3"
  304. HorizontalAlignment="Center"
  305. VerticalAlignment="Center">
  306. <Run Text="{DynamicResource Load}" />
  307. <Run Text="(%)" />
  308. </TextBlock>
  309. </Grid>
  310. <Grid RowDefinitions="auto,auto,auto,auto">
  311. <Grid Height="{StaticResource ItemHeight}" ColumnDefinitions="*,*,*,*">
  312. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
  313. <Run Text="{DynamicResource Acceleration}" />
  314. <Run Text="(g)" />
  315. </TextBlock>
  316. <TextBlock
  317. Grid.Column="1"
  318. HorizontalAlignment="Center"
  319. VerticalAlignment="Center"
  320. Text="{Binding MaxAcceleration}" />
  321. <TextBlock
  322. Grid.Column="2"
  323. HorizontalAlignment="Center"
  324. VerticalAlignment="Center"
  325. Text="{Binding Source={x:Static vm:ShakerConfigViewModel.Instance}, Path=MaxAcceleration}" />
  326. <TextBlock
  327. Grid.Column="3"
  328. HorizontalAlignment="Center"
  329. VerticalAlignment="Center"
  330. Classes.Loaded="{Binding AccelerationOverLimit}"
  331. Text="{Binding AccelerationLoad}">
  332. <TextBlock.Styles>
  333. <Style Selector="TextBlock">
  334. <Setter Property="Foreground" Value="Green" />
  335. </Style>
  336. <Style Selector="TextBlock.Loaded">
  337. <Setter Property="Foreground" Value="Red" />
  338. </Style>
  339. </TextBlock.Styles>
  340. </TextBlock>
  341. </Grid>
  342. <Grid
  343. Grid.Row="1"
  344. Height="{StaticResource ItemHeight}"
  345. ColumnDefinitions="*,*,*,*">
  346. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
  347. <Run Text="{DynamicResource Velocity}" />
  348. <Run Text="(m/s)" />
  349. </TextBlock>
  350. <TextBlock
  351. Grid.Column="1"
  352. HorizontalAlignment="Center"
  353. VerticalAlignment="Center"
  354. Text="{Binding MaxVelocity}" />
  355. <TextBlock
  356. Grid.Column="2"
  357. HorizontalAlignment="Center"
  358. VerticalAlignment="Center"
  359. Text="{Binding Source={x:Static vm:ShakerConfigViewModel.Instance}, Path=MaxVelocity}" />
  360. <TextBlock
  361. Grid.Column="3"
  362. HorizontalAlignment="Center"
  363. VerticalAlignment="Center"
  364. Classes.Loaded="{Binding VelocityOverLimit}"
  365. Text="{Binding VelocityLoad}">
  366. <TextBlock.Styles>
  367. <Style Selector="TextBlock">
  368. <Setter Property="Foreground" Value="Green" />
  369. </Style>
  370. <Style Selector="TextBlock.Loaded">
  371. <Setter Property="Foreground" Value="Red" />
  372. </Style>
  373. </TextBlock.Styles>
  374. </TextBlock>
  375. </Grid>
  376. <Grid
  377. Grid.Row="2"
  378. Height="{StaticResource ItemHeight}"
  379. ColumnDefinitions="*,*,*,*">
  380. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
  381. <Run Text="{DynamicResource Displacement}" />
  382. <Run Text="(mm)" />
  383. </TextBlock>
  384. <TextBlock
  385. Grid.Column="1"
  386. HorizontalAlignment="Center"
  387. VerticalAlignment="Center"
  388. Text="{Binding MaxDisplacement}" />
  389. <TextBlock
  390. Grid.Column="2"
  391. HorizontalAlignment="Center"
  392. VerticalAlignment="Center"
  393. Text="{Binding Source={x:Static vm:ShakerConfigViewModel.Instance}, Path=MaxDisplacement}" />
  394. <TextBlock
  395. Grid.Column="3"
  396. HorizontalAlignment="Center"
  397. VerticalAlignment="Center"
  398. Classes.Loaded="{Binding DisplacementOverLimit}"
  399. Text="{Binding DisplacementLoad}">
  400. <TextBlock.Styles>
  401. <Style Selector="TextBlock">
  402. <Setter Property="Foreground" Value="Green" />
  403. </Style>
  404. <Style Selector="TextBlock.Loaded">
  405. <Setter Property="Foreground" Value="Red" />
  406. </Style>
  407. </TextBlock.Styles>
  408. </TextBlock>
  409. </Grid>
  410. </Grid>
  411. </StackPanel>
  412. </TabItem>
  413. <TabItem Header="{DynamicResource SweepSchedule}">
  414. <Grid
  415. Width="740"
  416. Height="210"
  417. Margin="10,10,0,0"
  418. HorizontalAlignment="Left"
  419. VerticalAlignment="Top"
  420. ColumnDefinitions="0.5*,*,0.7*"
  421. RowDefinitions="*,*,*">
  422. <StackPanel IsVisible="{Binding Channels.Count, Converter={StaticResource GreaterThanEqualConverter}, ConverterParameter='2'}">
  423. <TextBlock Text="{DynamicResource AccelerationChannel}" />
  424. <ComboBox
  425. Width="120"
  426. Margin="-4,0,0,0"
  427. HorizontalAlignment="Left"
  428. VerticalAlignment="Center"
  429. ItemsSource="{Binding Channels}"
  430. SelectedValue="{Binding Path=SelectChannel}"
  431. SelectedValueBinding="{Binding Value}">
  432. <ComboBox.ItemTemplate>
  433. <DataTemplate>
  434. <StackPanel Orientation="Horizontal">
  435. <TextBlock Text="{DynamicResource Channel}" />
  436. <TextBlock Text="{Binding $self.DataContext.Key}" />
  437. </StackPanel>
  438. </DataTemplate>
  439. </ComboBox.ItemTemplate>
  440. </ComboBox>
  441. </StackPanel>
  442. <StackPanel Grid.Column="1">
  443. <TextBlock Text="{DynamicResource SweepCount}" />
  444. <NumericUpDown
  445. Width="120"
  446. Margin="4"
  447. HorizontalAlignment="Left"
  448. VerticalAlignment="Center"
  449. Increment="1"
  450. Minimum="1"
  451. Value="{Binding SweepCount}" />
  452. </StackPanel>
  453. <StackPanel Grid.Column="2" IsEnabled="{Binding SignalType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SignalType.Sweep}}">
  454. <TextBlock Text="{DynamicResource SweepType}" />
  455. <ComboBox
  456. Width="120"
  457. Margin="-4,0,0,0"
  458. HorizontalAlignment="Left"
  459. VerticalAlignment="Center"
  460. ItemsSource="{Binding SweepType, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}"
  461. SelectedValue="{Binding Path=SweepType}"
  462. SelectedValueBinding="{Binding Value}">
  463. <ComboBox.ItemTemplate>
  464. <DataTemplate>
  465. <TextBlock Text="{local:ResourceBinding Key}" />
  466. </DataTemplate>
  467. </ComboBox.ItemTemplate>
  468. </ComboBox>
  469. </StackPanel>
  470. <StackPanel Grid.Row="1" IsEnabled="{Binding SignalType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SignalType.Sweep}}">
  471. <TextBlock Text="{DynamicResource SweepDirection}" />
  472. <ComboBox
  473. Width="120"
  474. Margin="-4,0,0,0"
  475. HorizontalAlignment="Left"
  476. VerticalAlignment="Center"
  477. ItemsSource="{Binding SweepDirection, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}"
  478. SelectedValue="{Binding Path=SweepDirection}"
  479. SelectedValueBinding="{Binding Value}">
  480. <ComboBox.ItemTemplate>
  481. <DataTemplate>
  482. <TextBlock Text="{local:ResourceBinding Key}" />
  483. </DataTemplate>
  484. </ComboBox.ItemTemplate>
  485. </ComboBox>
  486. </StackPanel>
  487. <StackPanel Grid.Row="1" Grid.Column="1">
  488. <TextBlock Text="{DynamicResource SignalType}" />
  489. <ComboBox
  490. Width="120"
  491. Margin="-4,0,0,0"
  492. HorizontalAlignment="Left"
  493. VerticalAlignment="Center"
  494. ItemsSource="{Binding SignalType, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}"
  495. SelectedValue="{Binding Path=SignalType}"
  496. SelectedValueBinding="{Binding Value}">
  497. <ComboBox.ItemTemplate>
  498. <DataTemplate>
  499. <TextBlock Text="{local:ResourceBinding Key}" />
  500. </DataTemplate>
  501. </ComboBox.ItemTemplate>
  502. </ComboBox>
  503. </StackPanel>
  504. <StackPanel Grid.Row="1" Grid.Column="2">
  505. <TextBlock Text="{DynamicResource MinFreq}" />
  506. <StackPanel Orientation="Horizontal">
  507. <NumericUpDown
  508. Width="120"
  509. Margin="4"
  510. HorizontalAlignment="Left"
  511. VerticalAlignment="Center"
  512. Increment="0.01"
  513. Maximum="{Binding EndFrequency}"
  514. Minimum="{Binding MinFrequency}"
  515. Value="{Binding StartFrequency, Mode=TwoWay}" />
  516. <TextBlock
  517. Margin="4,0,0,0"
  518. VerticalAlignment="Center"
  519. Text="Hz" />
  520. </StackPanel>
  521. </StackPanel>
  522. <StackPanel Grid.Row="2" IsEnabled="{Binding SignalType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SignalType.Sweep}}">
  523. <TextBlock Text="{DynamicResource MaxFreq}" />
  524. <StackPanel
  525. Width="120"
  526. Margin="4"
  527. HorizontalAlignment="Left"
  528. VerticalAlignment="Center"
  529. Orientation="Horizontal">
  530. <NumericUpDown
  531. Width="120"
  532. HorizontalAlignment="Left"
  533. VerticalAlignment="Center"
  534. Increment="0.01"
  535. Maximum="{Binding MaxFrequency}"
  536. Minimum="{Binding StartFrequency}"
  537. Value="{Binding EndFrequency}" />
  538. <TextBlock VerticalAlignment="Center" Text="Hz" />
  539. </StackPanel>
  540. </StackPanel>
  541. <StackPanel Grid.Row="2" Grid.Column="1">
  542. <TextBlock Text="{DynamicResource SweepTime}" />
  543. <view:TimeControl
  544. Margin="4"
  545. Increment="0.01"
  546. Time="{Binding OnceSweepTime, Mode=TwoWay}" />
  547. </StackPanel>
  548. <StackPanel
  549. Grid.Row="2"
  550. Grid.Column="2"
  551. IsEnabled="{Binding SignalType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SignalType.Sweep}}">
  552. <TextBlock Text="{DynamicResource SweepSpeed}" />
  553. <StackPanel Orientation="Horizontal">
  554. <NumericUpDown
  555. Width="120"
  556. Margin="4"
  557. Increment="0.1"
  558. Maximum="20"
  559. Minimum="1"
  560. Value="{Binding SweepSpeed}" />
  561. <TextBlock VerticalAlignment="Center" Text="oct/min" />
  562. </StackPanel>
  563. </StackPanel>
  564. </Grid>
  565. </TabItem>
  566. </TabControl>
  567. </Grid>
  568. </UserControl>