RealTimeView.xaml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  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. </Grid>
  154. <StackPanel
  155. Grid.Row="1"
  156. Grid.Column="2"
  157. Orientation="Vertical" Margin="0,5,0,0" HorizontalAlignment="Left">
  158. <StackPanel Orientation="Horizontal">
  159. <RadioButton x:Name="HoldLine" Width="70" Content="Hold" Margin="2" GroupName="operate" IsChecked="{Binding IsHold, Mode=TwoWay}"/>
  160. <RadioButton x:Name="ReleaseLine" Width="70" Content="Release" Margin="2" GroupName="operate"/>
  161. <RadioButton x:Name="EnablePan" Width="70" Content="Pan" Margin="2" IsChecked="{Binding Source={x:Reference Name=HoldLine},Path=IsChecked,Mode=OneWay}" GroupName="zoomPan"/>
  162. <RadioButton x:Name="EnableZoom" Width="70" Content="Zoom" Margin="2" IsEnabled="{Binding Source={x:Reference Name=HoldLine},Path=IsChecked}" GroupName="zoomPan"/>
  163. <ComboBox x:Name="CbDirection" Width="120" IsEditable="False" SelectedIndex="2">
  164. <ComboBoxItem Content="XDirection"/>
  165. <ComboBoxItem Content="YDirection"/>
  166. <ComboBoxItem Content="XYDirection"/>
  167. </ComboBox>
  168. <Button Margin="2,2,0,2" Width="95" Content="BackWard" IsEnabled="{Binding Source={x:Reference Name=HoldLine},Path=IsChecked}">
  169. <i:Interaction.Triggers>
  170. <i:EventTrigger EventName="Click">
  171. <micro:ActionMessage MethodName="ToLeftClick">
  172. <micro:Parameter Value="{Binding Source={x:Reference Name=CbDirection},Path=SelectedIndex}"/>
  173. </micro:ActionMessage>
  174. </i:EventTrigger>
  175. </i:Interaction.Triggers>
  176. </Button>
  177. <Button Margin="1,2,0,2" Width="95" Content="Forward" IsEnabled="{Binding Source={x:Reference Name=HoldLine},Path=IsChecked}">
  178. <i:Interaction.Triggers>
  179. <i:EventTrigger EventName="Click">
  180. <micro:ActionMessage MethodName="ToRightClick">
  181. <micro:Parameter Value="{Binding Source={x:Reference Name=CbDirection},Path=SelectedIndex}"/>
  182. </micro:ActionMessage>
  183. </i:EventTrigger>
  184. </i:Interaction.Triggers>
  185. </Button>
  186. <Button Content="Zoom In" Width="95" Margin="1,2,0,2" IsEnabled="{Binding Source={x:Reference Name=HoldLine},Path=IsChecked}">
  187. <i:Interaction.Triggers>
  188. <i:EventTrigger EventName="Click">
  189. <micro:ActionMessage MethodName="ZoomInClick">
  190. <micro:Parameter Value="{Binding Source={x:Reference Name=CbDirection},Path=SelectedIndex}"/>
  191. </micro:ActionMessage>
  192. </i:EventTrigger>
  193. </i:Interaction.Triggers>
  194. </Button>
  195. <Button Content="Zoom Out" Width="95" Margin="1,2,0,2" IsEnabled="{Binding Source={x:Reference Name=HoldLine},Path=IsChecked}">
  196. <i:Interaction.Triggers>
  197. <i:EventTrigger EventName="Click">
  198. <micro:ActionMessage MethodName="ZoomOutClick">
  199. <micro:Parameter Value="{Binding Source={x:Reference Name=CbDirection},Path=SelectedIndex}"/>
  200. </micro:ActionMessage>
  201. </i:EventTrigger>
  202. </i:Interaction.Triggers>
  203. </Button>
  204. </StackPanel>
  205. <userControls:DataViewDataGrid
  206. x:Name="dataGrid"
  207. Width="1000"
  208. IsShowStatisticColumn="False"
  209. IsEnabled="{Binding IsBusy, Converter={StaticResource boolReverseConverter}}"
  210. ItemsSource="{Binding Path=SelectedData}">
  211. <i:Interaction.Triggers>
  212. <i:EventTrigger EventName="Deleted">
  213. <micro:ActionMessage MethodName="Deleted">
  214. <micro:Parameter Value="$source" />
  215. <micro:Parameter Value="$eventargs" />
  216. </micro:ActionMessage>
  217. </i:EventTrigger>
  218. <i:EventTrigger EventName="Exporting">
  219. <micro:ActionMessage MethodName="Exporting">
  220. <micro:Parameter Value="$source" />
  221. <micro:Parameter Value="$eventargs" />
  222. </micro:ActionMessage>
  223. </i:EventTrigger>
  224. <i:EventTrigger EventName="Exported">
  225. <micro:ActionMessage MethodName="Exported">
  226. <micro:Parameter Value="$source" />
  227. <micro:Parameter Value="$eventargs" />
  228. </micro:ActionMessage>
  229. </i:EventTrigger>
  230. <i:EventTrigger EventName="ProgressMessageUpdating">
  231. <micro:ActionMessage MethodName="ProgressUpdating">
  232. <micro:Parameter Value="$source" />
  233. <micro:Parameter Value="$eventargs" />
  234. </micro:ActionMessage>
  235. </i:EventTrigger>
  236. </i:Interaction.Triggers>
  237. </userControls:DataViewDataGrid>
  238. <!--<Grid Margin="15,10,0,0">
  239. <Grid.RowDefinitions>
  240. <RowDefinition Height="26" />
  241. <RowDefinition Height="35" />
  242. <RowDefinition Height="35" />
  243. </Grid.RowDefinitions>
  244. <Grid.ColumnDefinitions>
  245. <ColumnDefinition Width="100" />
  246. <ColumnDefinition Width="49" />
  247. <ColumnDefinition Width="61" />
  248. <ColumnDefinition Width="120" />
  249. </Grid.ColumnDefinitions>
  250. <Label
  251. Grid.Row="0"
  252. Grid.ColumnSpan="4"
  253. HorizontalContentAlignment="Center"
  254. VerticalContentAlignment="Center"
  255. Content="Trend Chart Setting"
  256. Style="{DynamicResource Table_TitleStyle}" />
  257. <Border
  258. Grid.Row="1"
  259. Padding="5,1"
  260. Background="{DynamicResource Table_BG_Title}"
  261. BorderBrush="{DynamicResource Table_BD}"
  262. BorderThickness="1,0,1,1">
  263. <TextBlock
  264. VerticalAlignment="Center"
  265. FontFamily="Arial"
  266. FontSize="12"
  267. Foreground="{DynamicResource FG_Black}"
  268. Text="Interval (ms)"
  269. TextWrapping="Wrap" />
  270. </Border>
  271. <Border
  272. Grid.Row="1"
  273. Grid.Column="1"
  274. Grid.ColumnSpan="2"
  275. Padding="5,1"
  276. Background="{Binding AlignerStatusBackground}"
  277. BorderBrush="{DynamicResource Table_BD}"
  278. BorderThickness="0,0,1,1">
  279. <controls:TextBoxEx
  280. Width="100"
  281. Height="25"
  282. EditBoxMode="UnSignInteger"
  283. MaxValue="60000"
  284. MinValue="100"
  285. Text="{Binding TrendInterval, Mode=TwoWay}"
  286. TextSaved="{Binding IntervalSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  287. Validation.ErrorTemplate="{x:Null}" />
  288. </Border>
  289. <Border
  290. Grid.Row="1"
  291. Grid.Column="3"
  292. Padding="5,1"
  293. Background="{DynamicResource Table_BG_Content}"
  294. BorderBrush="{DynamicResource Table_BD}"
  295. BorderThickness="0,0,1,1">
  296. <Button
  297. Width="70"
  298. Height="25"
  299. Margin="5,0,0,0"
  300. Content="Set">
  301. <i:Interaction.Triggers>
  302. <i:EventTrigger EventName="Click">
  303. <micro:ActionMessage MethodName="SetInterval" />
  304. </i:EventTrigger>
  305. </i:Interaction.Triggers>
  306. </Button>
  307. </Border>
  308. <Border
  309. Grid.Row="2"
  310. Padding="5,1"
  311. Background="{DynamicResource Table_BG_Title}"
  312. BorderBrush="{DynamicResource Table_BD}"
  313. BorderThickness="1,0,1,1">
  314. <TextBlock
  315. VerticalAlignment="Center"
  316. FontFamily="Arial"
  317. FontSize="12"
  318. Foreground="{DynamicResource FG_Black}"
  319. Text="Time Span (s)"
  320. TextWrapping="Wrap" />
  321. </Border>
  322. <Border
  323. Grid.Row="2"
  324. Grid.Column="1"
  325. Grid.ColumnSpan="2"
  326. Padding="5,1"
  327. Background="{Binding AlignerStatusBackground}"
  328. BorderBrush="{DynamicResource Table_BD}"
  329. BorderThickness="0,0,1,1">
  330. <controls:TextBoxEx
  331. Width="100"
  332. Height="25"
  333. EditBoxMode="UnSignInteger"
  334. MaxValue="3600"
  335. MinValue="1"
  336. Text="{Binding TrendTimeSpan, Mode=TwoWay}"
  337. TextSaved="{Binding TimeSpanSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
  338. Validation.ErrorTemplate="{x:Null}" />
  339. </Border>
  340. <Border
  341. Grid.Row="2"
  342. Grid.Column="3"
  343. Padding="5,1"
  344. Background="{DynamicResource Table_BG_Content}"
  345. BorderBrush="{DynamicResource Table_BD}"
  346. BorderThickness="0,0,1,1">
  347. <Button
  348. Width="70"
  349. Height="25"
  350. Margin="5,0,0,0"
  351. Content="Set">
  352. <i:Interaction.Triggers>
  353. <i:EventTrigger EventName="Click">
  354. <micro:ActionMessage MethodName="SetTimeSpan" />
  355. </i:EventTrigger>
  356. </i:Interaction.Triggers>
  357. </Button>
  358. </Border>
  359. </Grid>-->
  360. </StackPanel>
  361. <userControls:BusyIndicator
  362. Grid.Row="1" Grid.Column="2"
  363. Width="Auto"
  364. Height="Auto"
  365. HorizontalAlignment="Left"
  366. VerticalAlignment="Center"
  367. BorderBrush="Gray"
  368. BorderThickness="3"
  369. Padding="20 10"
  370. Background="{StaticResource Tab_BG}"
  371. Visibility="{Binding IsBusy, Converter={StaticResource boolVisibilityConverter}}"
  372. Message="{Binding BusyIndicatorContent}" Margin="350,0,0,0">
  373. <i:Interaction.Triggers>
  374. <i:EventTrigger EventName="Canceled">
  375. <micro:ActionMessage MethodName="Cancel" />
  376. </i:EventTrigger>
  377. </i:Interaction.Triggers>
  378. </userControls:BusyIndicator>
  379. </Grid>
  380. </UserControl>