wenxiangchao
3 天以前 b544d5cccd76735e034c8055918a50927b437474
HMI.LogViewer/LogViewer.xaml
@@ -11,7 +11,7 @@
             xmlns:pu="https://opensource.panuon.com/wpf-ui"
             xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
             Loaded="UserControl_Loaded"
             Background="{StaticResource WorkspaceBackground}"
             Background="{DynamicResource WorkspaceBackground}"
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <ResourceDictionary>
@@ -71,7 +71,7 @@
                <StackPanel DockPanel.Dock="Right" Style="{StaticResource ButtonGroup}">
                    <Button Style="{StaticResource QueryBtn}"
                            x:Name="queryBtn" Click="Button_Click"/>
                    <Button Style="{StaticResource RfhBtn}"
                    <Button Style="{StaticResource ResetBtn}"
                            x:Name="resetBtn" Click="Button_Click"/>
                    <Button x:Name="exportBtn"
                            Style="{StaticResource ExportBtn}" Click="Button_Click"/>
@@ -88,14 +88,16 @@
                        <ComboBoxItem Content="Error"/>
                    </ComboBox>
                    <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="{DynamicResource App.EndTime}"/>
                    <pu:DateTimePicker Style="{StaticResource TimePicker}" x:Name="endTimeInput"/>
                    <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="{DynamicResource App.StartTime}"/>
                    <pu:DateTimePicker Style="{StaticResource TimePicker}" IsEnabled="{Binding AutoRfh,Converter={StaticResource reverseBool}}"
                                       x:Name="startTimeInput"/>
                    <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="{DynamicResource App.EndTime}"/>
                    <pu:DateTimePicker Style="{StaticResource TimePicker}" IsEnabled="{Binding AutoRfh,Converter={StaticResource reverseBool}}"
                                       x:Name="endTimeInput"/>
                    <TextBlock Style="{StaticResource TitleBox}" FontSize="14" Text="{DynamicResource log.autoRefresh}"/>
                    <CheckBox x:Name="autoRfhInput" HorizontalAlignment="Center" VerticalAlignment="Center"
@@ -110,10 +112,10 @@
                        <Setter Property="Height" Value="{StaticResource nanD}" />
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding level}" Value="Warn">
                                <Setter Property="Foreground" Value="{StaticResource WarningColor}"/>
                                <Setter Property="Foreground" Value="{DynamicResource WarningColor}"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding level}" Value="Error">
                                <Setter Property="Foreground" Value="{StaticResource DangerColor}"/>
                                <Setter Property="Foreground" Value="{DynamicResource DangerColor}"/>
                            </DataTrigger>
                            <Trigger Property="IsSelected" Value="True">
                                <Setter Property="Background" Value="Transparent"/>
@@ -159,7 +161,7 @@
                            <GridViewColumn.CellTemplate>
                                <DataTemplate>
                                    <Border Style="{StaticResource CellBorder}">
                                        <TextBlock VerticalAlignment="Center" Text="{Binding time}"/>
                                        <TextBlock VerticalAlignment="Center" Text="{Binding time,Converter={x:Static uic:DateStrConverter.Instance},ConverterParameter='yyyy-MM-dd HH:mm:ss.fff'}"/>
                                    </Border>
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
@@ -177,6 +179,7 @@
                                </DataTemplate>
                            </GridViewColumn.CellTemplate>
                        </GridViewColumn>
                        <GridViewColumn Width="1420">
                            <GridViewColumn.Header>
                                <TextBlock Text="{DynamicResource log.text}"/>
@@ -194,6 +197,12 @@
                </ListView.View>
            </ListView>
            <StackPanel Grid.Row="3" HorizontalAlignment="Right">
                <pu:Pagination Style="{StaticResource DefaultPage}"
                               CurrentPage="{Binding CurrentPage}"
                               MaxPage="{Binding MaxPage}"/>
            </StackPanel>
            <!--<DataGrid Grid.Row="2" x:Name="table" 
                      CellStyle="{StaticResource sbCell}"
                  RowHeight="{StaticResource nanD}" Style="{StaticResource DefaultDataGrid}">
@@ -201,11 +210,11 @@
                    <Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Static pu:StyleKeys.DataGridRowStyle}}">
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding level}" Value="Warn">
                                <Setter Property="Background" Value="{StaticResource WarningColor}"/>
                                <Setter Property="Background" Value="{DynamicResource WarningColor}"/>
                                <Setter Property="Foreground" Value="Black"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding level}" Value="Error">
                                <Setter Property="Background" Value="{StaticResource DangerColor}"/>
                                <Setter Property="Background" Value="{DynamicResource DangerColor}"/>
                                <Setter Property="Foreground" Value="Black"/>
                            </DataTrigger>
                            <Trigger Property="IsSelected" Value="True">
@@ -277,11 +286,11 @@
                    <Style TargetType="ListViewItem" BasedOn="{StaticResource {x:Static pu:StyleKeys.ListViewItemStyle}}">
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding level}" Value="Warn">
                                <Setter Property="Background" Value="{StaticResource WarningColor}"/>
                                <Setter Property="Background" Value="{DynamicResource WarningColor}"/>
                                <Setter Property="Foreground" Value="Black"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding level}" Value="Error">
                                <Setter Property="Background" Value="{StaticResource DangerColor}"/>
                                <Setter Property="Background" Value="{DynamicResource DangerColor}"/>
                                <Setter Property="Foreground" Value="Black"/>
                            </DataTrigger>
                            <Trigger Property="IsSelected" Value="True">