LogTrace.xaml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <UserControl x:Class="HistoryUI.Views.LogTrace"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:HistoryUI.Views"
  7. mc:Ignorable="d"
  8. xmlns:hc="https://handyorg.github.io/handycontrol"
  9. xmlns:ScottPlot="clr-namespace:ScottPlot.WPF;assembly=ScottPlot.WPF"
  10. xmlns:prism="http://prismlibrary.com/"
  11. prism:ViewModelLocator.AutoWireViewModel="True">
  12. <Grid Background="{StaticResource BackgroundColor}">
  13. <!--<Grid Background="#50FFFFFF" Panel.ZIndex="1" Visibility="{Binding Loading}">
  14. <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
  15. <TextBlock FontSize="32">Loading Data...</TextBlock>
  16. </StackPanel>
  17. </Grid>-->
  18. <Grid Margin="8">
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="auto"/>
  21. <RowDefinition Height="0"/>
  22. <RowDefinition Height="*"/>
  23. <RowDefinition Height="16"/>
  24. <RowDefinition Height="auto"/>
  25. <RowDefinition Height="8"/>
  26. </Grid.RowDefinitions>
  27. <Grid Grid.Row="0" Margin="8,0">
  28. <Grid.ColumnDefinitions>
  29. <ColumnDefinition Width="auto"/>
  30. <ColumnDefinition Width="8"/>
  31. <ColumnDefinition Width="auto"/>
  32. <ColumnDefinition Width="8"/>
  33. <ColumnDefinition Width="auto"/>
  34. <ColumnDefinition Width="*"/>
  35. <ColumnDefinition Width="auto"/>
  36. <ColumnDefinition Width="8"/>
  37. <ColumnDefinition Width="auto"/>
  38. <ColumnDefinition Width="8"/>
  39. </Grid.ColumnDefinitions>
  40. <GroupBox Header="Start Time" BorderThickness="0">
  41. <hc:DateTimePicker MinWidth="160" Height="32" SelectedDateTime="{Binding StartTime}"/>
  42. </GroupBox>
  43. <GroupBox Grid.Column="2" Header="End Time" BorderThickness="0">
  44. <hc:DateTimePicker MinWidth="160" Height="32" SelectedDateTime="{Binding EndTime}"/>
  45. </GroupBox>
  46. <GroupBox Grid.Column="4" Header="Mini8" BorderThickness="0">
  47. <hc:ComboBox MinWidth="160" Height="32" ItemsSource="{Binding Hardwares.Mini8s}" SelectedItem="{Binding SelectedMini8}" DisplayMemberPath="Value.Name"/>
  48. </GroupBox>
  49. <Button Grid.Column="6" Margin="0,8,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Style="{StaticResource FunctionButton}" Command="{Binding QueryCommand}" MinWidth="80" Height="32">Query</Button>
  50. <Button Grid.Column="8" Margin="0,8,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Style="{StaticResource FunctionButton}" Command="{Binding ExitCommand}" Background="{StaticResource EmergencyColor}" MinWidth="80" Height="32">Exit</Button>
  51. </Grid>
  52. <ContentControl Grid.Row="2" Content="{Binding PlotControl, Mode=OneTime}"/>
  53. <Grid Grid.Row="4">
  54. <ItemsControl ItemsSource="{Binding ChannelDetails}">
  55. <ItemsControl.ItemTemplate>
  56. <DataTemplate>
  57. <CheckBox Style="{StaticResource FunctionCheckBox}" Content="{Binding Value.ChannelData.Name}" Background="{Binding Value.ChannelColor}" IsChecked="{Binding Value.IsSelected, Mode=TwoWay}" Width="88"/>
  58. </DataTemplate>
  59. </ItemsControl.ItemTemplate>
  60. <ItemsControl.ItemsPanel>
  61. <ItemsPanelTemplate>
  62. <WrapPanel/>
  63. </ItemsPanelTemplate>
  64. </ItemsControl.ItemsPanel>
  65. </ItemsControl>
  66. <StackPanel Grid.Column="4" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="20,0" Orientation="Horizontal">
  67. <Button VerticalAlignment="Center" Width="48" Command="{Binding ReScaleCommand}" CommandParameter="add">↑</Button>
  68. <Button VerticalAlignment="Center" Width="48" Margin="8,0" Command="{Binding ReScaleCommand}" CommandParameter="minus">↓</Button>
  69. <Button VerticalAlignment="Center" Width="48" Command="{Binding ReScaleCommand}" CommandParameter="+">+</Button>
  70. <Button VerticalAlignment="Center" Width="48" Margin="8,0" Command="{Binding ReScaleCommand}" CommandParameter="-">-</Button>
  71. <Button VerticalAlignment="Center" Command="{Binding ReScaleCommand}" CommandParameter="Re">AutoScale</Button>
  72. </StackPanel>
  73. </Grid>
  74. </Grid>
  75. </Grid>
  76. </UserControl>