Sic.Framework/MECF.Framework.UI.Client/CenterViews/DataLogs/DataHistory/DataView.xaml

255 lines
12 KiB
Plaintext
Raw Normal View History

2023-04-13 11:51:03 +08:00
<UserControl
x:Class="MECF.Framework.UI.Client.CenterViews.DataLogs.DataHistory.DataView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converter="clr-namespace:MECF.Framework.UI.Client.Ctrlib.Converter"
2023-11-30 13:42:06 +08:00
xmlns:cv="clr-namespace:MECF.Framework.UI.Core.Converters;assembly=MECF.Framework.UI.Core"
2023-04-13 11:51:03 +08:00
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:micro="clr-namespace:Caliburn.Micro"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:userControls="clr-namespace:MECF.Framework.UI.Client.CenterViews.Core.UserControls"
xmlns:userControls1="clr-namespace:Sicentury.Core.UserControls;assembly=Sicentury.Core"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
d:DesignHeight="450"
d:DesignWidth="1500"
mc:Ignorable="d">
<UserControl.Resources>
2023-11-30 13:42:06 +08:00
<cv:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
<cv:BoolReverseConverter x:Key="BoolReverseConverter" />
2023-04-13 11:51:03 +08:00
<system:Boolean x:Key="True">True</system:Boolean>
<system:Boolean x:Key="False">False</system:Boolean>
</UserControl.Resources>
<Grid IsEnabled="{Binding IsPermission}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="400" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="200" />
</Grid.RowDefinitions>
<Grid Grid.RowSpan="2" Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition Height="80" />
<RowDefinition Height="0" />
<RowDefinition Height="1" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border
Grid.Row="0"
Padding="5,1"
Background="{StaticResource Table_BG_Content}"
BorderBrush="{StaticResource Table_BD}"
BorderThickness="1,0,1,1"
IsEnabled="{Binding IsBusy, Converter={StaticResource BoolReverseConverter}}">
2023-04-13 11:51:03 +08:00
<StackPanel Orientation="Horizontal">
<StackPanel Width="260" Margin="0,15">
<StackPanel.Resources>
<Style TargetType="xctk:DateTimeUpDown">
<Setter Property="Width" Value="180" />
<Setter Property="Format" Value="Custom" />
<Setter Property="FormatString" Value="yyyy/MM/dd HH:mm:ss" />
</Style>
</StackPanel.Resources>
<StackPanel Orientation="Horizontal">
<TextBlock
Width="70"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14"
Foreground="{StaticResource FG_Black}"
Text="Start Time" />
<WindowsFormsHost
Width="170"
Height="22"
Margin="5,0,0,0"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14">
<forms:DateTimePicker
x:Name="wfTimeFrom"
CustomFormat="yyyy/MM/dd HH:mm:ss"
Format="Custom"
Value="2011-8-1" />
</WindowsFormsHost>
</StackPanel>
<StackPanel Margin="0,5,0,0" Orientation="Horizontal">
<TextBlock
Width="70"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14"
Foreground="{StaticResource FG_Black}"
Text="End Time" />
<WindowsFormsHost
Width="170"
Height="22"
Margin="5,0,0,0"
VerticalAlignment="Center"
FontFamily="Arial"
FontSize="14">
<forms:DateTimePicker
x:Name="wfTimeTo"
CustomFormat="yyyy/MM/dd HH:mm:ss"
Format="Custom"
Value="2011-8-1" />
</WindowsFormsHost>
</StackPanel>
</StackPanel>
<StackPanel>
<Button
Width="100"
Height="30"
Margin="0,5,5,0"
HorizontalAlignment="Right"
Content="Query">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<micro:ActionMessage MethodName="Query">
<micro:ActionMessage.Parameters>
<micro:Parameter Value="{StaticResource False}" />
</micro:ActionMessage.Parameters>
</micro:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
<Button
Width="100"
Height="30"
Margin="0,5,5,0"
HorizontalAlignment="Right"
Content="Append"
ToolTip="Append selected items to current chart">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<micro:ActionMessage MethodName="Query">
<micro:ActionMessage.Parameters>
<micro:Parameter Value="{StaticResource True}" />
</micro:ActionMessage.Parameters>
</micro:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
</StackPanel>
</Border>
<Border
Grid.Row="3"
Padding="5"
Background="{StaticResource Tab_BG}"
BorderBrush="{StaticResource Tab_BD}"
BorderThickness="1"
IsEnabled="{Binding IsBusy, Converter={StaticResource BoolReverseConverter}}"
2023-04-13 11:51:03 +08:00
SnapsToDevicePixels="True">
<userControls1:ParameterNodeTreeViewControl
x:Name="tvParameterNodes"
PresetGroupsFolderName="DataHistory"
TreeRoot="{Binding ParameterNodes}" />
</Border>
</Grid>
<GridSplitter
Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="1"
Width="5"
Margin="0,0,2,0"
HorizontalAlignment="Left"
VerticalAlignment="Stretch"
Background="LightBlue"
IsEnabled="{Binding IsBusy, Converter={StaticResource BoolReverseConverter}}" />
2023-04-13 11:51:03 +08:00
<!-- data chart -->
<Grid
Grid.Row="0"
Grid.Column="2"
Margin="5,0,0,0">
<userControls:DataViewChart
x:Name="chart"
AutoRange="{Binding ChartAutoRange}"
IsEnabled="{Binding IsBusy, Converter={StaticResource BoolReverseConverter}}"
2023-04-13 11:51:03 +08:00
RenderableSeries="{Binding SelectedData}"
VisibleRangeTime="{Binding VisibleRangeTime}"
VisibleRangeValue="{Binding VisibleRangeValue}" />
<userControls1:BusyIndicator
Width="Auto"
Height="Auto"
Padding="20,10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="{StaticResource Tab_BG}"
BorderBrush="Gray"
BorderThickness="3"
Message="{Binding BusyIndicatorContent}"
Visibility="{Binding IsBusy, Converter={StaticResource BoolVisibilityConverter}}">
2023-04-13 11:51:03 +08:00
<i:Interaction.Triggers>
<i:EventTrigger EventName="Canceled">
<micro:ActionMessage MethodName="CancelQuery" />
</i:EventTrigger>
</i:Interaction.Triggers>
</userControls1:BusyIndicator>
</Grid>
<GridSplitter
Grid.Row="1"
Grid.Column="2"
Height="5"
Margin="0,0,2,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
Background="LightBlue"
IsEnabled="{Binding IsBusy, Converter={StaticResource BoolReverseConverter}}" />
2023-04-13 11:51:03 +08:00
<userControls:DataViewDataGrid
x:Name="dataGrid"
Grid.Row="1"
Grid.Column="2"
Margin="0,5,0,0"
IsEnabled="{Binding IsBusy, Converter={StaticResource BoolReverseConverter}}"
2023-04-13 11:51:03 +08:00
IsShowStatisticColumn="True"
ItemsSource="{Binding Path=SelectedData}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Deleted">
<micro:ActionMessage MethodName="Deleted">
<micro:Parameter Value="$source" />
<micro:Parameter Value="$eventargs" />
</micro:ActionMessage>
</i:EventTrigger>
<i:EventTrigger EventName="Exporting">
<micro:ActionMessage MethodName="Exporting">
<micro:Parameter Value="$source" />
<micro:Parameter Value="$eventargs" />
</micro:ActionMessage>
</i:EventTrigger>
<i:EventTrigger EventName="Exported">
<micro:ActionMessage MethodName="Exported">
<micro:Parameter Value="$source" />
<micro:Parameter Value="$eventargs" />
</micro:ActionMessage>
</i:EventTrigger>
<i:EventTrigger EventName="ProgressMessageUpdating">
<micro:ActionMessage MethodName="ProgressUpdating">
<micro:Parameter Value="$source" />
<micro:Parameter Value="$eventargs" />
</micro:ActionMessage>
</i:EventTrigger>
</i:Interaction.Triggers>
</userControls:DataViewDataGrid>
</Grid>
</UserControl>