| | |
| | | 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:hb="clr-namespace:HMI.Base;assembly=HMI.Base" |
| | | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| | | xmlns:local="clr-namespace:HMI.LogViewer" |
| | | mc:Ignorable="d" |
| | | xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base" |
| | | xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI" |
| | | xmlns:pw="https://opensource.panuon.com/wpf" |
| | | xmlns:pu="https://opensource.panuon.com/wpf-ui" |
| | | xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI" |
| | | mc:Ignorable="d" |
| | | Loaded="UserControl_Loaded" |
| | | Background="{StaticResource WorkspaceBackground}" |
| | | Background="{DynamicResource WorkspaceBackground}" |
| | | d:DesignHeight="450" d:DesignWidth="800"> |
| | | |
| | | <UserControl.Resources> |
| | | <ResourceDictionary> |
| | | <ResourceDictionary.MergedDictionaries> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/PanuonResource.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/FormStyle.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/Colors.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/PanuonListView.xaml"/> |
| | | </ResourceDictionary.MergedDictionaries> |
| | | <uic:PathImageConverter x:Key="path2Image"/> |
| | | <uic:DataGridRowNumberConverter x:Key="rowNumber"/> |
| | | |
| | | <Style x:Key="TableBlock" TargetType="TextBlock"> |
| | | <Setter Property="Padding" Value="0"/> |
| | | <Setter Property="Margin" Value="0"/> |
| | | <Setter Property="VerticalAlignment" Value="Center"/> |
| | | <Setter Property="TextWrapping" Value="Wrap"/> |
| | | </Style> |
| | | |
| | | <Style x:Key="TableBox" TargetType="TextBox"> |
| | | <Setter Property="Padding" Value="0"/> |
| | | <Setter Property="Margin" Value="0"/> |
| | | <Setter Property="VerticalAlignment" Value="Center"/> |
| | | <Setter Property="VerticalContentAlignment" Value="Center"/> |
| | | <Setter Property="TextWrapping" Value="Wrap"/> |
| | | <Setter Property="BorderThickness" Value="0"/> |
| | | <Setter Property="BorderBrush" Value="Transparent"/> |
| | | <Setter Property="Background" Value="Transparent"/> |
| | | <Setter Property="Foreground" Value="{Binding Foreground,RelativeSource={RelativeSource Mode=FindAncestor, |
| | | AncestorLevel=1,AncestorType=ListViewItem}}"/> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding IsSelected,RelativeSource={RelativeSource Mode=FindAncestor, |
| | | AncestorLevel=1,AncestorType=ListViewItem}}" Value="True"> |
| | | <Setter Property="Foreground" Value="#FFF"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding IsMouseOver,RelativeSource={RelativeSource Mode=FindAncestor, |
| | | AncestorLevel=1,AncestorType=ListViewItem}}" Value="True"> |
| | | <Setter Property="Foreground" Value="#FFF"/> |
| | | </DataTrigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | |
| | | <Style x:Key="sbCell" TargetType="DataGridCell" BasedOn="{StaticResource {x:Static pu:StyleKeys.DataGridCellStyle}}"> |
| | | <Setter Property="Padding" Value="0"/> |
| | | <Setter Property="Margin" Value="0"/> |
| | | </Style> |
| | | </ResourceDictionary> |
| | | </UserControl.Resources> |
| | | |
| | | <Border Style="{StaticResource CardBoarder}"> |
| | | |
| | | |
| | | <Grid dp:GridHelper.Space="10" Cursor=""> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition/> |
| | | <RowDefinition Height="Auto"/> |
| | | </Grid.RowDefinitions> |
| | | |
| | | <TextBlock FontSize="{StaticResource TitleFontSize}" |
| | | VerticalAlignment="Center" HorizontalAlignment="Left" Text="日志查询"/> |
| | | VerticalAlignment="Center" HorizontalAlignment="Left" Text="{DynamicResource log.title}"/> |
| | | |
| | | <DockPanel Grid.Row="1" Cursor=""> |
| | | <StackPanel DockPanel.Dock="Right" Style="{StaticResource ButtonGroup}"> |
| | | <Button Style="{StaticResource PrimaryButton}" pu:ButtonHelper.Icon="" |
| | | x:Name="queryBtn" Click="Button_Click">查询</Button> |
| | | <Button Style="{StaticResource PrimaryButton}" pu:ButtonHelper.Icon="" |
| | | x:Name="resetBtn" Click="Button_Click" Cursor="Hand">重置</Button> |
| | | <Button x:Name="exportBtn" |
| | | Style="{StaticResource PrimaryButton}" Click="Button_Click">导出</Button> |
| | | <Button Style="{StaticResource QueryBtn}" |
| | | x:Name="queryBtn" Click="Button_Click"/> |
| | | <Button Style="{StaticResource RfhBtn}" |
| | | x:Name="resetBtn" Click="Button_Click"/> |
| | | <!--<Button x:Name="exportBtn" |
| | | Style="{StaticResource ExportBtn}" Click="Button_Click"/>--> |
| | | </StackPanel> |
| | | |
| | | <StackPanel Style="{StaticResource ButtonGroup}" HorizontalAlignment="Left"> |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="级别"/> |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="{DynamicResource log.level}"/> |
| | | <ComboBox Style="{StaticResource FormComboxStyle}" x:Name="levelInput" |
| | | Width="180" |
| | | SelectedValuePath="Content"> |
| | | <ComboBoxItem Content="info"/> |
| | | <ComboBoxItem Content="warn"/> |
| | | <ComboBoxItem Content="error"/> |
| | | <ComboBoxItem Content="Debug"/> |
| | | <ComboBoxItem Content="Info"/> |
| | | <ComboBoxItem Content="Warn"/> |
| | | <ComboBoxItem Content="Error"/> |
| | | </ComboBox> |
| | | |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="开始时间"/> |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="{DynamicResource App.StartTime}"/> |
| | | <pu:DateTimePicker Style="{StaticResource TimePicker}" x:Name="startTimeInput"/> |
| | | |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="结束时间"/> |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="{DynamicResource App.EndTime}"/> |
| | | <pu:DateTimePicker Style="{StaticResource TimePicker}" x:Name="endTimeInput"/> |
| | | |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="来源"/> |
| | | <!--<ComboBox Style="{StaticResource FormComboxStyle}" x:Name="sourceInput" Width="180"></ComboBox>--> |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="{DynamicResource log.source}"/> |
| | | <TextBox Style="{StaticResource EditorTextBoxStyle}" x:Name="sourceInput" Width="180"/> |
| | | |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="实时刷新"/> |
| | | <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="{DynamicResource log.autoRefresh}"/> |
| | | <CheckBox x:Name="autoRfhInput" HorizontalAlignment="Center" VerticalAlignment="Center" |
| | | IsChecked="{Binding AutoRfh,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" |
| | | /> |
| | | IsChecked="{Binding AutoRfh,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | </StackPanel> |
| | | </DockPanel> |
| | | |
| | | <ListView Grid.Row="2" Style="{StaticResource DefaultListTable}" x:Name="table" |
| | | VirtualizingPanel.VirtualizationMode="Standard" > |
| | | <ListView.ItemContainerStyle> |
| | | <Style TargetType="ListViewItem" BasedOn="{StaticResource {x:Static pu:StyleKeys.ListViewItemStyle}}"> |
| | | <Setter Property="Height" Value="{StaticResource nanD}" /> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding level}" Value="Warn"> |
| | | <Setter Property="Foreground" Value="{DynamicResource WarningColor}"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding level}" Value="Error"> |
| | | <Setter Property="Foreground" Value="{DynamicResource DangerColor}"/> |
| | | </DataTrigger> |
| | | <Trigger Property="IsSelected" Value="True"> |
| | | <Setter Property="Background" Value="Transparent"/> |
| | | </Trigger> |
| | | <Trigger Property="IsMouseOver" Value="True"> |
| | | <Setter Property="Background" Value="Transparent"/> |
| | | </Trigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </ListView.ItemContainerStyle> |
| | | |
| | | <DataGrid Grid.Row="2" x:Name="table" Style="{StaticResource DefaultDataGrid}"> |
| | | <ListView.View> |
| | | <GridView> |
| | | <GridViewColumn Width="50"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="#"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <TextBlock Text="{Binding Converter={StaticResource lvRowNumber}, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ListViewItem,AncestorLevel=1}}"/> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Width="80"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.level}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock VerticalAlignment="Center" Text="{Binding level}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Width="150"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.time}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock VerticalAlignment="Center" Text="{Binding time}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Width="150"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.source}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock VerticalAlignment="Center" Text="{Binding source}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="1420"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.text}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBox IsReadOnly="True" Style="{StaticResource TableBox}" |
| | | Text="{Binding text}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | </GridView> |
| | | </ListView.View> |
| | | </ListView> |
| | | |
| | | <!--<DataGrid Grid.Row="2" x:Name="table" |
| | | CellStyle="{StaticResource sbCell}" |
| | | RowHeight="{StaticResource nanD}" Style="{StaticResource DefaultDataGrid}"> |
| | | <DataGrid.RowStyle> |
| | | <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Static pu:StyleKeys.DataGridRowStyle}}"> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding type}" Value="warn"> |
| | | <Setter Property="Background" Value="{StaticResource WarningColor}"/> |
| | | <DataTrigger Binding="{Binding level}" Value="Warn"> |
| | | <Setter Property="Background" Value="{DynamicResource WarningColor}"/> |
| | | <Setter Property="Foreground" Value="Black"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding type}" Value="error"> |
| | | <Setter Property="Background" Value="{StaticResource DangerColor}"/> |
| | | <DataTrigger Binding="{Binding level}" Value="Error"> |
| | | <Setter Property="Background" Value="{DynamicResource DangerColor}"/> |
| | | <Setter Property="Foreground" Value="Black"/> |
| | | </DataTrigger> |
| | | <Trigger Property="IsSelected" Value="True"> |
| | |
| | | </Style> |
| | | </DataGrid.RowStyle> |
| | | <DataGrid.Columns> |
| | | <DataGridTemplateColumn Header="" Width="Auto" CanUserResize="False"> |
| | | <DataGridTemplateColumn Header="#" Width="60" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <CheckBox VerticalAlignment="Center" IsChecked="{Binding Selected,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | <DataGridTemplateColumn Header="#" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <TextBlock Text="{Binding Converter={StaticResource rowNumber}, |
| | | <TextBlock Style="{StaticResource TableBlock}" Text="{Binding Converter={StaticResource rowNumber}, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding type}" Header="级别" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding time}" Header="时间" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding source}" Header="来源" /> |
| | | <DataGridTextColumn Width="*" Binding="{Binding text}" Header="文本" /> |
| | | <DataGridTextColumn Width="80" Binding="{Binding level}" |
| | | ElementStyle="{StaticResource TableBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.level}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="150" Binding="{Binding time}" |
| | | ElementStyle="{StaticResource TableBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.time}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="150" Binding="{Binding source}" |
| | | ElementStyle="{StaticResource TableBlock}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.source}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTemplateColumn Width="*"> |
| | | <DataGridTemplateColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.text}"/> |
| | | </DataGridTemplateColumn.Header> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <TextBox IsReadOnly="True" Style="{StaticResource TableBox}" Text="{Binding text}"/> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | </DataGrid.Columns> |
| | | </DataGrid> |
| | | </DataGrid>--> |
| | | |
| | | <!--<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right"> |
| | | <pu:Pagination |
| | | Height="36" Margin="10" |
| | | HorizontalAlignment="Left" |
| | | Foreground="Black" |
| | | ItemsBackground="Transparent" |
| | | ItemsCornerRadius="12" |
| | | ItemsSelectedBackground="{DynamicResource SecondPrimaryColor}" |
| | | x:Name="page" |
| | | CurrentPage="{Binding CurrentPage}" |
| | | MaxPage="{Binding MaxPage}"/> |
| | | </StackPanel>--> |
| | | |
| | | <!--<ListView Grid.Row="2" Style="{StaticResource DefaultListTable}" x:Name="table" VirtualizingPanel.IsContainerVirtualizable="True" |
| | | VirtualizingPanel.IsVirtualizing="True" |
| | | VirtualizingPanel.VirtualizationMode="Standard"> |
| | | <ListView.ItemContainerStyle> |
| | | <Style TargetType="ListViewItem" BasedOn="{StaticResource {x:Static pu:StyleKeys.ListViewItemStyle}}"> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding level}" Value="Warn"> |
| | | <Setter Property="Background" Value="{DynamicResource WarningColor}"/> |
| | | <Setter Property="Foreground" Value="Black"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding level}" Value="Error"> |
| | | <Setter Property="Background" Value="{DynamicResource DangerColor}"/> |
| | | <Setter Property="Foreground" Value="Black"/> |
| | | </DataTrigger> |
| | | <Trigger Property="IsSelected" Value="True"> |
| | | <Setter Property="Background" Value="Transparent"/> |
| | | </Trigger> |
| | | <Trigger Property="IsMouseOver" Value="True"> |
| | | <Setter Property="Background" Value="Transparent"/> |
| | | </Trigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </ListView.ItemContainerStyle> |
| | | <ListView.View> |
| | | <GridView AllowsColumnReorder="False"> |
| | | <GridViewColumn Width="60" Header="#"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <TextBlock Text="{Binding Converter={StaticResource lvRowNumber}, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ListViewItem,AncestorLevel=1}}"/> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Width="80"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.level}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding level}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="150"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.time}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding time}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="150"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.source}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding source}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | <GridViewColumn Width="1410"> |
| | | <GridViewColumn.Header> |
| | | <TextBlock Text="{DynamicResource log.text}"/> |
| | | </GridViewColumn.Header> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Style="{StaticResource ListTableTextBlock}" |
| | | Text="{Binding text}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | </GridView> |
| | | </ListView.View> |
| | | </ListView>--> |
| | | <!--<pu:Pagination HorizontalContentAlignment="Right" Grid.Row="3" Margin="0,10,0,0" Height="30" |
| | | FontSize="14" |
| | | HorizontalAlignment="Left" |
| | | Foreground="Black" |
| | | ItemsBackground="Transparent" |
| | | ItemsCornerRadius="12" |
| | | ItemsSelectedBackground="#36AAF7" CurrentPage="1" MaxPage="10"/>--> |
| | | </Grid> |
| | | </Border> |
| | | </hb:PluginControl> |