123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406 |
- <UserControl x:Class="VirgoUI.Client.Models.Operate.RealTime.RealTimeView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:cal="http://www.caliburn.org"
- xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
- xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
- xmlns:visuals="http://schemas.abtsoftware.co.uk/scichart"
- xmlns:control="clr-namespace:Aitex.Core.UI.Control;assembly=MECF.Framework.UI.Core"
- xmlns:converters="clr-namespace:Aitex.Core.UI.Converters;assembly=MECF.Framework.UI.Core"
- mc:Ignorable="d" IsEnabled="{Binding PageEnabled}"
- d:DesignHeight="450" d:DesignWidth="1800">
- <UserControl.Resources>
- <converters:LineColorConverter x:Key="colorConverter"/>
- <DataTemplate x:Key="SeriesInfoTemplate" DataType="s:SeriesInfo">
- <StackPanel Margin="0 1" Orientation="Vertical">
- <TextBlock Text="{Binding SeriesName, StringFormat='{}{0}:'}"/>
- <TextBlock Text="{Binding FormattedXValue, StringFormat='X: {0}'}" />
- <TextBlock Text="{Binding FormattedYValue, StringFormat='Y: {0}'}" />
- </StackPanel>
- </DataTemplate>
- <!-- Demonstrates a custom cursor tooltip style -->
- <Style x:Key="CursorTooltipStyle" TargetType="s:CursorLabelControl">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="s:CursorLabelControl">
- <Border Background="Blue"
- BorderBrush="Blue"
- BorderThickness="2"
- Opacity="0.7"
- Padding="2.5">
- <ItemsControl ItemsSource="{Binding DataContext.SeriesData.SeriesInfo, RelativeSource={RelativeSource TemplatedParent}}">
- <ItemsControl.ItemTemplate>
- <DataTemplate DataType="s:SeriesInfo">
- <ContentControl Content="{Binding}" ContentTemplate="{StaticResource SeriesInfoTemplate}" />
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- Demonstrates custom cursor line style -->
- <Style x:Key="CursorLineStyle" TargetType="Line">
- <Setter Property="StrokeThickness" Value="2" />
- <Setter Property="Stroke" Value="Blue" />
- </Style>
- </UserControl.Resources>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="400" ></ColumnDefinition>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition ></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition ></RowDefinition>
- <RowDefinition Height="200" ></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Column="0" Grid.RowSpan="2">
- <Grid.RowDefinitions>
- <RowDefinition Height="0"/>
- <RowDefinition Height="0"/>
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="80"/>
- <ColumnDefinition Width="70"/>
- <ColumnDefinition Width="115"/>
- <ColumnDefinition Width="70"/>
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Height="30">
- <TextBlock Text="Interval(s)" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
- </Border>
- <Border Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
- <TextBox Width="Auto"/>
- </Border>
- <Border Grid.Column="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
- <TextBlock Text="Time Window(s)" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBlock>
- </Border>
- <Border Grid.Column="3" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
- <TextBox Width="Auto"/>
- </Border>
- <Border Grid.Column="4" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
- <Button Content="Apply" Width="50" Height="22">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Apply"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </Border>
- </Grid>
- <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,10">
- <Button Content="Preset Selection" Margin="0,0,5,0" Width="100" Height="30">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Preset"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- <Button Content="Clear Selection" Width="100">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Clear"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </StackPanel>
- <Border Grid.Row="2" BorderBrush="{DynamicResource Tab_BD}" BorderThickness="1" SnapsToDevicePixels="True" Background="{DynamicResource Tab_BG}" Padding="12">
- <TreeView x:Name="ParameterTreeView" ItemsSource="{Binding ParameterNodes}">
- <!--<i:Interaction.Triggers>
- <i:EventTrigger EventName="TreeView.SelectedItemChanged">
- <cal:ActionMessage MethodName="OnTreeSelectedChanged">
- <cal:Parameter Value="{Binding ElementName=ParameterTreeView,Path=SelectedItem}"></cal:Parameter>
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>-->
- <TreeView.ItemTemplate>
- <HierarchicalDataTemplate ItemsSource="{Binding ChildNodes}">
- <StackPanel Orientation="Horizontal">
- <CheckBox IsChecked="{Binding Selected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" >
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="ParameterCheck">
- <cal:Parameter Value="{Binding }"/>
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </CheckBox>
- <TextBlock Text="{Binding Name}" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </TreeView.ItemTemplate>
- </TreeView>
- </Border>
- </Grid>
- <GridSplitter Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" Background="LightBlue"
- HorizontalAlignment="Left" VerticalAlignment="Stretch" Width="5" Margin="0,0,2,0">
- </GridSplitter>
- <!--data chart-->
- <Grid Grid.Column="2" Grid.Row="0" Margin="5,0,0,0">
- <s:SciChartSurface Name="sciChart" RenderableSeries="{Binding SelectedData}"
- s:ThemeManager.Theme="ExpressionLight"
- Padding="0,0,0,0"
- DebugWhyDoesntSciChartRender="False" BorderBrush="Gray" Focusable="False" IsTabStop="False">
- <!-- Create an X Axis -->
- <s:SciChartSurface.XAxis>
- <s:DateTimeAxis DrawMinorTicks="False"
- DrawMinorGridLines="False"
- Margin="0,0,0,0"
- SubDayTextFormatting="HH:mm:ss"
- TitleFontSize="15"
- FontSize="20"
- AutoRange="{Binding ChartAutoRange}"
- TextFormatting="HH:mm:ss"
- Id="DefaultAxisId" TitleFontWeight="Normal" />
-
- </s:SciChartSurface.XAxis>
- <!-- Create a Y Axis -->
- <s:SciChartSurface.YAxis>
- <s:NumericAxis DrawMinorTicks="False"
- DrawMinorGridLines="False"
- AxisAlignment="Right"
- MinWidth="35" MaxWidth="35"
- HorizontalAlignment="Center"
- CursorTextFormatting="0.######"
- Id="DefaultAxisId" MajorDelta="0.001"
- MinorDelta="0.001" DrawMajorBands="False" Focusable="False"
- BorderThickness="0" AutoRange="{Binding ChartAutoRange}"
- DrawLabels="True" DrawMajorGridLines="True" DrawMajorTicks="False">
- <s:NumericAxis.GrowBy>
- <s:DoubleRange Min="0.001" Max="0.001"/>
- </s:NumericAxis.GrowBy>
- </s:NumericAxis>
- </s:SciChartSurface.YAxis>
-
- <s:SciChartSurface.ChartModifier>
- <s:ModifierGroup >
- <s:RubberBandXyZoomModifier x:Name="rubberBandZoomModifier" IsEnabled="True"
- IsXAxisOnly="False"
- ZoomExtentsY="True"
- IsAnimated="True" ExecuteOn="MouseLeftButton" ReceiveHandledEvents="True" />
- <s:CursorModifier x:Name="CursorModifier" IsEnabled="True"
- LineOverlayStyle="{StaticResource CursorLineStyle}"
- ShowAxisLabels="True"
- ShowTooltip="True"
- ShowTooltipOn="MouseOver"
- SourceMode="AllSeries"
- TooltipContainerStyle="{StaticResource CursorTooltipStyle}"
- UseInterpolation="True" />
- <s:LegendModifier ShowLegend="False" GetLegendDataFor="AllSeries" x:Name="legendModifier"/>
- <s:ZoomExtentsModifier x:Name="zoomExtentsModifier" XyDirection="XYDirection" ExecuteOn="MouseDoubleClick"/>
- <s:ZoomPanModifier x:Name="zoomPanModifier" IsEnabled="True" ClipModeX="None" XyDirection="XYDirection" ExecuteOn="MouseRightButton" ZoomExtentsY="False" />
- <s:RolloverModifier x:Name="rolloverModifier"
- UseInterpolation="False" FontSize="9" IsEnabled="False"
- DrawVerticalLine="False" FontFamily="Arial,SimSun"
- SnapsToDevicePixels="False"
- ShowAxisLabels="False" />
-
- <s:MouseWheelZoomModifier x:Name="mouseWheelZoomModifier" XyDirection="XYDirection"/>
- <s:SeriesValueModifier/>
- </s:ModifierGroup>
- </s:SciChartSurface.ChartModifier>
- </s:SciChartSurface>
- <CheckBox IsChecked="{Binding EnableAutoZoom, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="0,10,1208,0" VerticalAlignment="Top" Content="Auto Zoom" HorizontalAlignment="Right"></CheckBox>
- </Grid>
- <DataGrid Grid.Column="2" Grid.Row="1" Margin="5,10,0,0"
- AlternationCount="2" ColumnHeaderHeight="30"
- ItemsSource="{Binding SelectedData}" AutoGenerateColumns="False"
- CanUserAddRows="False" CanUserResizeRows="False" CanUserResizeColumns="True" FontFamily="Arial" FontSize="12">
- <DataGrid.Columns>
- <DataGridTemplateColumn>
- <DataGridTemplateColumn.HeaderTemplate >
- <DataTemplate>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
- <!--<CheckBox Foreground="{DynamicResource FG_White}" VerticalAlignment="Center">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="VisibleCheckAll">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </CheckBox>-->
- <TextBlock Text="Visible" FontFamily="Arial" FontSize="12" VerticalAlignment="Bottom" Margin="3,0,0,0"/>
- </StackPanel>
- </DataTemplate>
- </DataGridTemplateColumn.HeaderTemplate>
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <CheckBox IsChecked="{Binding IsVisible, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" >
- <!--<i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="VisibleCheck">
- <cal:Parameter Value="{Binding }"/>
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>-->
- </CheckBox>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Name" MinWidth="100">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding DataName}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Color" MinWidth="100" >
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button Style="{DynamicResource Color_Button}" HorizontalAlignment="Stretch" Background="{Binding Stroke, Converter={StaticResource colorConverter}}" Width="50">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="SelectColor">
- <cal:Parameter Value="{Binding}" ></cal:Parameter>
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Factor" MinWidth="100">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <ctrl:TextBoxEx AllowBackgroundChange="False" Text="{Binding DataFactor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="80" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center" />
- <!--<i:Interaction.Triggers>
- <i:EventTrigger EventName="LostFocus">
- <cal:ActionMessage MethodName="FactorLostFocus">
- <cal:Parameter Value="{Binding}" />
- </cal:ActionMessage>
- </i:EventTrigger>
- <i:EventTrigger EventName="KeyDown">
- <cal:ActionMessage MethodName="FactorKeyDown">
- <cal:Parameter Value="$eventargs" />
- <cal:Parameter Value="{Binding}" />
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>-->
-
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Offset" MinWidth="100">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <ctrl:TextBoxEx AllowBackgroundChange="False" Text="{Binding DataOffset, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="80" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center" >
- <!--<i:Interaction.Triggers>
- <i:EventTrigger EventName="LostFocus">
- <cal:ActionMessage MethodName="OffsetLostFocus">
- <cal:Parameter Value="{Binding}" />
- </cal:ActionMessage>
- </i:EventTrigger>
- <i:EventTrigger EventName="KeyDown">
- <cal:ActionMessage MethodName="OffsetKeyDown">
- <cal:Parameter Value="$eventargs" />
- <cal:Parameter Value="{Binding}" />
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>-->
- </ctrl:TextBoxEx>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Width" MinWidth="60">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <ctrl:TextBoxEx AllowBackgroundChange="False" Text="{Binding LineThickness, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="80" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center" >
- <!--<i:Interaction.Triggers>
- <i:EventTrigger EventName="LostFocus">
- <cal:ActionMessage MethodName="WidthLostFocus">
- <cal:Parameter Value="{Binding}" />
- </cal:ActionMessage>
- </i:EventTrigger>
- <i:EventTrigger EventName="KeyDown">
- <cal:ActionMessage MethodName="WidthKeyDown">
- <cal:Parameter Value="$eventargs" />
- <cal:Parameter Value="{Binding}" />
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>-->
- </ctrl:TextBoxEx>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Width="80">
- <DataGridTemplateColumn.HeaderTemplate >
- <DataTemplate>
- <Button Content="Export All" Width="65" Height="22">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="ExportAll">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </DataTemplate>
- </DataGridTemplateColumn.HeaderTemplate>
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button Content="Export" Width="65" Height="22">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Export">
- <cal:Parameter Value="{Binding }"/>
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Width="80">
- <DataGridTemplateColumn.HeaderTemplate >
- <DataTemplate>
- <Button Content="Delete All" Width="65" Height="22">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="DeleteAll">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </DataTemplate>
- </DataGridTemplateColumn.HeaderTemplate>
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button Content="Delete" Width="65" Height="22">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Delete">
- <cal:Parameter Value="{Binding }"/>
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- </Grid>
- </UserControl>
|