RealTimeView.xaml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  1. <UserControl x:Class="MECF.Framework.UI.Client.CenterViews.Operations.RealTime.RealtimeView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:controls="clr-namespace:OpenSEMI.Ctrlib.Controls"
  5. xmlns:converter="clr-namespace:MECF.Framework.UI.Client.Ctrlib.Converter"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:micro="clr-namespace:Caliburn.Micro"
  10. xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
  11. xmlns:userControls="clr-namespace:MECF.Framework.UI.Client.ClientBase.UserControls"
  12. d:DesignHeight="450"
  13. d:DesignWidth="1800"
  14. mc:Ignorable="d">
  15. <UserControl.Resources>
  16. <converter:BoolReverseConverter x:Key="boolReverseConverter" />
  17. <converter:BoolVisibilityConverter x:Key="boolVisibilityConverter" />
  18. </UserControl.Resources>
  19. <Grid IsEnabled="{Binding IsPermission}">
  20. <Grid.ColumnDefinitions>
  21. <ColumnDefinition Width="375" />
  22. <ColumnDefinition Width="Auto" />
  23. <ColumnDefinition />
  24. </Grid.ColumnDefinitions>
  25. <Grid.RowDefinitions>
  26. <RowDefinition />
  27. <RowDefinition Height="200" />
  28. </Grid.RowDefinitions>
  29. <Grid Grid.RowSpan="2" Grid.Column="0">
  30. <Border
  31. Padding="5"
  32. Background="{DynamicResource Tab_BG}"
  33. BorderBrush="{DynamicResource Tab_BD}"
  34. BorderThickness="1"
  35. SnapsToDevicePixels="True">
  36. <Grid>
  37. <userControls:ParameterNodeTreeViewControl
  38. x:Name="tvParameterNodes"
  39. IsEnabled="{Binding IsBusy, Converter={StaticResource boolReverseConverter}}"
  40. TreeRoot="{Binding ParameterNodes}"
  41. PresetGroupsFolderName="RealTimeView"/>
  42. </Grid>
  43. </Border>
  44. </Grid>
  45. <GridSplitter
  46. Grid.Row="0"
  47. Grid.RowSpan="2"
  48. Grid.Column="1"
  49. Width="10"
  50. HorizontalAlignment="Left"
  51. VerticalAlignment="Stretch"
  52. Background="Transparent"
  53. Style="{DynamicResource VerticalGridSplitterStyle}" />
  54. <!-- data chart -->
  55. <Grid
  56. Grid.Row="0"
  57. Grid.Column="2"
  58. Margin="0,0,0,0">
  59. <s:SciChartSurface
  60. Name="sciChart"
  61. Padding="2"
  62. s:ThemeManager.Theme="ExpressionDark"
  63. BorderBrush="Gray"
  64. DebugWhyDoesntSciChartRender="False"
  65. Focusable="False"
  66. IsTabStop="False"
  67. RenderableSeries="{Binding SelectedData}">
  68. <!-- Create an X Axis -->
  69. <s:SciChartSurface.XAxis>
  70. <s:DateTimeAxis
  71. Margin="0,0,0,0"
  72. AutoRange="{Binding ChartAutoRange}"
  73. DrawMinorGridLines="False"
  74. DrawMinorTicks="False"
  75. DrawMajorBands="False"
  76. FontSize="20"
  77. Id="DefaultAxisId"
  78. SubDayTextFormatting="HH:mm:ss"
  79. TextFormatting="HH:mm:ss"
  80. TitleFontSize="15"
  81. TitleFontWeight="Normal" />
  82. </s:SciChartSurface.XAxis>
  83. <!-- Create a Y Axis -->
  84. <s:SciChartSurface.YAxis>
  85. <s:NumericAxis
  86. HorizontalAlignment="Center"
  87. AutoRange="{Binding ChartAutoRange}"
  88. AxisAlignment="Right"
  89. BorderThickness="0"
  90. CursorTextFormatting="0.######"
  91. DrawLabels="True"
  92. DrawMajorBands="False"
  93. DrawMajorGridLines="True"
  94. DrawMajorTicks="False"
  95. DrawMinorGridLines="False"
  96. DrawMinorTicks="False"
  97. Focusable="False"
  98. Id="DefaultAxisId"
  99. MajorDelta="0.001"
  100. MinorDelta="0.001">
  101. <s:NumericAxis.GrowBy>
  102. <s:DoubleRange Max="0.001" Min="0.001" />
  103. </s:NumericAxis.GrowBy>
  104. </s:NumericAxis>
  105. </s:SciChartSurface.YAxis>
  106. <s:SciChartSurface.ChartModifier>
  107. <s:ModifierGroup>
  108. <s:RubberBandXyZoomModifier
  109. x:Name="rubberBandZoomModifier"
  110. ExecuteOn="MouseLeftButton"
  111. IsAnimated="True"
  112. IsXAxisOnly="False"
  113. ReceiveHandledEvents="True"
  114. IsEnabled="{Binding Source={x:Reference Name=EnableZoom},Path=IsChecked}"
  115. ZoomExtentsY="False" />
  116. <s:CursorModifier
  117. IsEnabled="True"
  118. ShowAxisLabels="True"
  119. ShowTooltip="False"
  120. ShowTooltipOn="Never"
  121. SourceMode="AllSeries" />
  122. <s:LegendModifier
  123. x:Name="legendModifier"
  124. GetLegendDataFor="AllSeries"
  125. ShowLegend="False" />
  126. <s:ZoomExtentsModifier
  127. x:Name="zoomExtentsModifier"
  128. ExecuteOn="MouseDoubleClick"
  129. XyDirection="XYDirection" />
  130. <s:ZoomPanModifier
  131. x:Name="zoomPanModifier"
  132. ClipModeX="None"
  133. ExecuteOn="MouseLeftButton"
  134. IsEnabled="{Binding Source={x:Reference Name=EnablePan},Path=IsChecked}"
  135. XyDirection="{Binding Source={x:Reference Name=CbDirection},Path=Text}"
  136. ZoomExtentsY="False" />
  137. <s:RolloverModifier
  138. x:Name="rolloverModifier"
  139. DrawVerticalLine="False"
  140. FontFamily="Arial,SimSun"
  141. FontSize="9"
  142. IsEnabled="True"
  143. ShowAxisLabels="False"
  144. SnapsToDevicePixels="False"
  145. UseInterpolation="False" />
  146. <s:MouseWheelZoomModifier x:Name="mouseWheelZoomModifier" XyDirection="{Binding Source={x:Reference Name=CbDirection},Path=Text}" />
  147. <s:SeriesValueModifier />
  148. </s:ModifierGroup>
  149. </s:SciChartSurface.ChartModifier>
  150. </s:SciChartSurface>
  151. <CheckBox Margin="10" VerticalAlignment="Top" Content="Auto Zoom" HorizontalAlignment="Left"
  152. IsChecked="{Binding EnableAutoZoom, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  153. <userControls:FourArrowButton ArrowColor="{StaticResource Button_BG}" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,0,50,0" IsEnabled="{Binding Source={x:Reference Name=HoldLine},Path=IsChecked}"/>
  154. </Grid>
  155. <StackPanel
  156. Grid.Row="1"
  157. Grid.Column="2"
  158. Orientation="Vertical" Margin="0,5,0,0" HorizontalAlignment="Left">
  159. <StackPanel Orientation="Horizontal">
  160. <RadioButton x:Name="HoldLine" Width="70" Content="Hold" Margin="2" GroupName="operate" />
  161. <RadioButton x:Name="ReleaseLine" Width="70" Content="Release" Margin="2" GroupName="operate" IsChecked="{Binding EnableAutoZoom, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
  162. <RadioButton x:Name="EnablePan" Width="70" Content="Pan" Margin="2" IsEnabled="{Binding EnableAutoZoom,Converter={StaticResource boolReverseConverter}}" IsChecked="True" GroupName="zoomPan"/>
  163. <RadioButton x:Name="EnableZoom" Width="70" Content="Zoom" Margin="2" IsEnabled="{Binding EnableAutoZoom,Converter={StaticResource boolReverseConverter}}" GroupName="zoomPan"/>
  164. <ComboBox x:Name="CbDirection" Width="120" IsEditable="False" SelectedIndex="2">
  165. <ComboBoxItem Content="XDirection"/>
  166. <ComboBoxItem Content="YDirection"/>
  167. <ComboBoxItem Content="XYDirection"/>
  168. </ComboBox>
  169. <Button Content="Zoom In" Width="95" Margin="1,2,0,2" IsEnabled="{Binding EnableAutoZoom,Converter={StaticResource boolReverseConverter}}">
  170. <i:Interaction.Triggers>
  171. <i:EventTrigger EventName="Click">
  172. <micro:ActionMessage MethodName="ZoomInClick">
  173. <micro:Parameter Value="{Binding Source={x:Reference Name=CbDirection},Path=SelectedIndex}"/>
  174. </micro:ActionMessage>
  175. </i:EventTrigger>
  176. </i:Interaction.Triggers>
  177. </Button>
  178. <Button Content="Zoom Out" Width="95" Margin="1,2,0,2" IsEnabled="{Binding EnableAutoZoom,Converter={StaticResource boolReverseConverter}}">
  179. <i:Interaction.Triggers>
  180. <i:EventTrigger EventName="Click">
  181. <micro:ActionMessage MethodName="ZoomOutClick">
  182. <micro:Parameter Value="{Binding Source={x:Reference Name=CbDirection},Path=SelectedIndex}"/>
  183. </micro:ActionMessage>
  184. </i:EventTrigger>
  185. </i:Interaction.Triggers>
  186. </Button>
  187. <Border
  188. Grid.Row="1"
  189. Padding="5,1"
  190. Background="{DynamicResource Table_BG_Title}"
  191. BorderBrush="{DynamicResource Table_BD}"
  192. BorderThickness="1,0,1,1">
  193. <TextBlock
  194. VerticalAlignment="Center"
  195. FontFamily="Arial"
  196. FontSize="12"
  197. Foreground="{DynamicResource FG_Black}"
  198. Text="Interval (ms)"
  199. TextWrapping="Wrap" />
  200. </Border>
  201. <Border
  202. Grid.Row="1"
  203. Grid.Column="1"
  204. Grid.ColumnSpan="2"
  205. Padding="5,1"
  206. Background="{Binding AlignerStatusBackground}"
  207. BorderBrush="{DynamicResource Table_BD}"
  208. BorderThickness="0,0,1,1">
  209. <controls:TextBoxEx
  210. Width="100"
  211. Height="25"
  212. EditBoxMode="UnSignInteger"
  213. MaxValue="60000"
  214. MinValue="1"
  215. Text="{Binding TrendInterval,UpdateSourceTrigger=PropertyChanged}"
  216. TextSaved="{Binding IntervalSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  217. Validation.ErrorTemplate="{x:Null}" />
  218. </Border>
  219. <Border
  220. Grid.Row="1"
  221. Grid.Column="3"
  222. Padding="5,1"
  223. Background="{DynamicResource Table_BG_Content}"
  224. BorderBrush="{DynamicResource Table_BD}"
  225. BorderThickness="0,0,1,1">
  226. <Button
  227. Width="70"
  228. Height="25"
  229. Margin="5,0,0,0"
  230. Content="Set">
  231. <i:Interaction.Triggers>
  232. <i:EventTrigger EventName="Click">
  233. <micro:ActionMessage MethodName="SetInterval" />
  234. </i:EventTrigger>
  235. </i:Interaction.Triggers>
  236. </Button>
  237. </Border>
  238. </StackPanel>
  239. <userControls:DataViewDataGrid
  240. x:Name="dataGrid"
  241. Height="300"
  242. IsShowStatisticColumn="False"
  243. IsEnabled="{Binding IsBusy, Converter={StaticResource boolReverseConverter}}"
  244. ItemsSource="{Binding Path=SelectedData}">
  245. <i:Interaction.Triggers>
  246. <i:EventTrigger EventName="Deleted">
  247. <micro:ActionMessage MethodName="Deleted">
  248. <micro:Parameter Value="$source" />
  249. <micro:Parameter Value="$eventargs" />
  250. </micro:ActionMessage>
  251. </i:EventTrigger>
  252. <i:EventTrigger EventName="Exporting">
  253. <micro:ActionMessage MethodName="Exporting">
  254. <micro:Parameter Value="$source" />
  255. <micro:Parameter Value="$eventargs" />
  256. </micro:ActionMessage>
  257. </i:EventTrigger>
  258. <i:EventTrigger EventName="Exported">
  259. <micro:ActionMessage MethodName="Exported">
  260. <micro:Parameter Value="$source" />
  261. <micro:Parameter Value="$eventargs" />
  262. </micro:ActionMessage>
  263. </i:EventTrigger>
  264. <i:EventTrigger EventName="ProgressMessageUpdating">
  265. <micro:ActionMessage MethodName="ProgressUpdating">
  266. <micro:Parameter Value="$source" />
  267. <micro:Parameter Value="$eventargs" />
  268. </micro:ActionMessage>
  269. </i:EventTrigger>
  270. </i:Interaction.Triggers>
  271. </userControls:DataViewDataGrid>
  272. <!--<Grid Margin="15,10,0,0">
  273. <Grid.RowDefinitions>
  274. <RowDefinition Height="26" />
  275. <RowDefinition Height="35" />
  276. <RowDefinition Height="35" />
  277. </Grid.RowDefinitions>
  278. <Grid.ColumnDefinitions>
  279. <ColumnDefinition Width="100" />
  280. <ColumnDefinition Width="49" />
  281. <ColumnDefinition Width="61" />
  282. <ColumnDefinition Width="120" />
  283. </Grid.ColumnDefinitions>
  284. <Label
  285. Grid.Row="0"
  286. Grid.ColumnSpan="4"
  287. HorizontalContentAlignment="Center"
  288. VerticalContentAlignment="Center"
  289. Content="Trend Chart Setting"
  290. Style="{DynamicResource Table_TitleStyle}" />
  291. <Border
  292. Grid.Row="1"
  293. Padding="5,1"
  294. Background="{DynamicResource Table_BG_Title}"
  295. BorderBrush="{DynamicResource Table_BD}"
  296. BorderThickness="1,0,1,1">
  297. <TextBlock
  298. VerticalAlignment="Center"
  299. FontFamily="Arial"
  300. FontSize="12"
  301. Foreground="{DynamicResource FG_Black}"
  302. Text="Interval (ms)"
  303. TextWrapping="Wrap" />
  304. </Border>
  305. <Border
  306. Grid.Row="1"
  307. Grid.Column="1"
  308. Grid.ColumnSpan="2"
  309. Padding="5,1"
  310. Background="{Binding AlignerStatusBackground}"
  311. BorderBrush="{DynamicResource Table_BD}"
  312. BorderThickness="0,0,1,1">
  313. <controls:TextBoxEx
  314. Width="100"
  315. Height="25"
  316. EditBoxMode="UnSignInteger"
  317. MaxValue="60000"
  318. MinValue="100"
  319. Text="{Binding TrendInterval, Mode=TwoWay}"
  320. TextSaved="{Binding IntervalSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  321. Validation.ErrorTemplate="{x:Null}" />
  322. </Border>
  323. <Border
  324. Grid.Row="1"
  325. Grid.Column="3"
  326. Padding="5,1"
  327. Background="{DynamicResource Table_BG_Content}"
  328. BorderBrush="{DynamicResource Table_BD}"
  329. BorderThickness="0,0,1,1">
  330. <Button
  331. Width="70"
  332. Height="25"
  333. Margin="5,0,0,0"
  334. Content="Set">
  335. <i:Interaction.Triggers>
  336. <i:EventTrigger EventName="Click">
  337. <micro:ActionMessage MethodName="SetInterval" />
  338. </i:EventTrigger>
  339. </i:Interaction.Triggers>
  340. </Button>
  341. </Border>
  342. <Border
  343. Grid.Row="2"
  344. Padding="5,1"
  345. Background="{DynamicResource Table_BG_Title}"
  346. BorderBrush="{DynamicResource Table_BD}"
  347. BorderThickness="1,0,1,1">
  348. <TextBlock
  349. VerticalAlignment="Center"
  350. FontFamily="Arial"
  351. FontSize="12"
  352. Foreground="{DynamicResource FG_Black}"
  353. Text="Time Span (s)"
  354. TextWrapping="Wrap" />
  355. </Border>
  356. <Border
  357. Grid.Row="2"
  358. Grid.Column="1"
  359. Grid.ColumnSpan="2"
  360. Padding="5,1"
  361. Background="{Binding AlignerStatusBackground}"
  362. BorderBrush="{DynamicResource Table_BD}"
  363. BorderThickness="0,0,1,1">
  364. <controls:TextBoxEx
  365. Width="100"
  366. Height="25"
  367. EditBoxMode="UnSignInteger"
  368. MaxValue="3600"
  369. MinValue="1"
  370. Text="{Binding TrendTimeSpan, Mode=TwoWay}"
  371. TextSaved="{Binding TimeSpanSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  372. Validation.ErrorTemplate="{x:Null}" />
  373. </Border>
  374. <Border
  375. Grid.Row="2"
  376. Grid.Column="3"
  377. Padding="5,1"
  378. Background="{DynamicResource Table_BG_Content}"
  379. BorderBrush="{DynamicResource Table_BD}"
  380. BorderThickness="0,0,1,1">
  381. <Button
  382. Width="70"
  383. Height="25"
  384. Margin="5,0,0,0"
  385. Content="Set">
  386. <i:Interaction.Triggers>
  387. <i:EventTrigger EventName="Click">
  388. <micro:ActionMessage MethodName="SetTimeSpan" />
  389. </i:EventTrigger>
  390. </i:Interaction.Triggers>
  391. </Button>
  392. </Border>
  393. </Grid>-->
  394. </StackPanel>
  395. <userControls:BusyIndicator
  396. Grid.Row="1" Grid.Column="2"
  397. Width="Auto"
  398. Height="Auto"
  399. HorizontalAlignment="Left"
  400. VerticalAlignment="Center"
  401. BorderBrush="Gray"
  402. BorderThickness="3"
  403. Padding="20 10"
  404. Background="{StaticResource Tab_BG}"
  405. Visibility="{Binding IsBusy, Converter={StaticResource boolVisibilityConverter}}"
  406. Message="{Binding BusyIndicatorContent}" Margin="350,0,0,0">
  407. <i:Interaction.Triggers>
  408. <i:EventTrigger EventName="Canceled">
  409. <micro:ActionMessage MethodName="Cancel" />
  410. </i:EventTrigger>
  411. </i:Interaction.Triggers>
  412. </userControls:BusyIndicator>
  413. </Grid>
  414. </UserControl>