252RB日志查询工具
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
3.3 KiB

<Window x:Class="LogAnalyzer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:LogAnalyzer"
mc:Ignorable="d"
Title="MainWindow" Height="720" Width="1080">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- 操作栏 -->
<StackPanel Orientation="Horizontal" Grid.Row="0" Margin="0,0,0,10">
<Button Content="加载日志文件" Click="BtnLoadLog_Click" Width="100" Height="30" Margin="0,0,10,0"/>
<Button Content="搜索数据库指令" Click="Button_Click" Width="100" Height="30" Margin="0,0,10,0"/>
<Button Content="寻找T1日志" Click="Button_Click1" Width="100" Height="30" Margin="0,0,10,0"/>
<Button Content="寻找T2日志" Click="Button_Click2" Width="100" Height="30" Margin="0,0,10,0"/>
<Button Content="寻找T3日志" Click="Button_Click3" Width="100" Height="30" Margin="0,0,10,0"/>
<Button Content="寻找T4日志" Click="Button_Click4" Width="100" Height="30" Margin="0,0,10,0"/>
<TextBlock x:Name="TxtStatus" VerticalAlignment="Center" Foreground="Green"/>
</StackPanel>
<Grid Grid.Row="1" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="400"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- 数据展示区 -->
<DataGrid x:Name="LogDataGrid"
Grid.Column="0"
AutoGenerateColumns="True"
CanUserAddRows="False"
IsReadOnly="True"
ItemsSource="{Binding}">
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<!-- 简单的隔行变色,提高可读性 -->
<Setter Property="Background" Value="White"/>
<Style.Triggers>
<Trigger Property="AlternationIndex" Value="1">
<Setter Property="Background" Value="#F2F2F2"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
</DataGrid>
<DataGrid x:Name="LogDataGrid1"
Grid.Column="1"
AutoGenerateColumns="True"
CanUserAddRows="False"
IsReadOnly="True"
ItemsSource="{Binding}">
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<!-- 简单的隔行变色,提高可读性 -->
<Setter Property="Background" Value="White"/>
<Style.Triggers>
<Trigger Property="AlternationIndex" Value="1">
<Setter Property="Background" Value="#F2F2F2"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
</DataGrid>
</Grid>
</Grid>
</Window>