131 lines
4.9 KiB
XML
131 lines
4.9 KiB
XML
<UserControl
|
|
x:Class="FATrace.WPLApp.Views.LogView"
|
|
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:prism="http://prismlibrary.com/"
|
|
d:DesignHeight="720"
|
|
d:DesignWidth="1280"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
mc:Ignorable="d">
|
|
<Grid Background="#F5F7FA">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Toolbar -->
|
|
<Border
|
|
Padding="10"
|
|
Background="White"
|
|
BorderBrush="#E6ECF2"
|
|
BorderThickness="0,0,0,1">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="200" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel
|
|
Margin="0,0,16,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock VerticalAlignment="Center" Text="日期:" />
|
|
<DatePicker SelectedDate="{Binding SelectedDate}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
Margin="0,0,16,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock VerticalAlignment="Center" Text="级别:" />
|
|
<ComboBox
|
|
Width="110"
|
|
ItemsSource="{Binding Levels}"
|
|
SelectedItem="{Binding LevelFilter}" />
|
|
</StackPanel>
|
|
|
|
<TextBox
|
|
Grid.Column="2"
|
|
Height="28"
|
|
Margin="0,0,16,0"
|
|
VerticalContentAlignment="Center"
|
|
Text="{Binding Keyword, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
<CheckBox
|
|
Grid.Column="3"
|
|
Margin="0,0,16,0"
|
|
VerticalAlignment="Center"
|
|
Content="自动刷新"
|
|
IsChecked="{Binding AutoRefresh}" />
|
|
|
|
<StackPanel
|
|
Grid.Column="4"
|
|
Margin="0,0,16,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock VerticalAlignment="Center" Text="最大行数:" />
|
|
<TextBox Width="80" Text="{Binding MaxLines, UpdateSourceTrigger=PropertyChanged}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Column="5"
|
|
HorizontalAlignment="Left"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Margin="0,0,8,0"
|
|
Command="{Binding RefreshCommand}"
|
|
Content="刷新" />
|
|
<Button Command="{Binding OpenFolderCommand}" Content="打开日志文件夹" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Log list -->
|
|
<Border
|
|
Grid.Row="1"
|
|
Margin="10"
|
|
Background="White"
|
|
BorderBrush="#E6ECF2"
|
|
BorderThickness="1">
|
|
<DataGrid
|
|
AutoGenerateColumns="False"
|
|
CanUserAddRows="False"
|
|
GridLinesVisibility="None"
|
|
HeadersVisibility="Column"
|
|
IsReadOnly="True"
|
|
ItemsSource="{Binding Items}">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn
|
|
Width="180"
|
|
Binding="{Binding Time}"
|
|
Header="时间" />
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding Level}"
|
|
Header="级别" />
|
|
<DataGridTextColumn
|
|
Width="200"
|
|
Binding="{Binding Logger}"
|
|
Header="记录器" />
|
|
<DataGridTextColumn
|
|
Width="80"
|
|
Binding="{Binding ThreadId}"
|
|
Header="线程" />
|
|
<DataGridTextColumn
|
|
Width="*"
|
|
Binding="{Binding Message}"
|
|
Header="内容" />
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</Border>
|
|
</Grid>
|
|
</UserControl>
|