121 lines
5.4 KiB
XML
121 lines
5.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<UserControl
|
|
x:Class="Vav2Player.LogMessagePage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="using:Vav2Player"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d">
|
|
|
|
<Grid Background="{ThemeResource SystemControlBackgroundChromeMediumLowBrush}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Header -->
|
|
<Border Grid.Row="0" Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}" Padding="10,5">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0"
|
|
Text="Log Messages"
|
|
FontWeight="Bold"
|
|
Foreground="{ThemeResource SystemControlForegroundBaseHighBrush}"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="5">
|
|
<Button x:Name="CopyLogButton"
|
|
Content="Copy"
|
|
Background="LightGreen"
|
|
Foreground="DarkGreen"
|
|
BorderThickness="0"
|
|
Padding="8,2"
|
|
CornerRadius="3"
|
|
Click="CopyLogButton_Click"/>
|
|
|
|
<Button x:Name="ClearLogButton"
|
|
Content="Clear"
|
|
Background="Yellow"
|
|
Foreground="DarkBlue"
|
|
BorderThickness="0"
|
|
Padding="8,2"
|
|
CornerRadius="3"
|
|
Click="ClearLogButton_Click"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Log Display Area -->
|
|
<ScrollViewer Grid.Row="1"
|
|
x:Name="LogScrollViewer"
|
|
VerticalScrollBarVisibility="Auto"
|
|
HorizontalScrollBarVisibility="Auto"
|
|
ZoomMode="Disabled"
|
|
Padding="5">
|
|
<ItemsControl x:Name="LogItemsControl">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Margin="2"
|
|
Padding="8,4"
|
|
BorderBrush="{ThemeResource SystemControlForegroundBaseLowBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="3"
|
|
Loaded="LogBorder_Loaded">
|
|
<TextBlock Text="{Binding}"
|
|
FontFamily="Consolas"
|
|
FontSize="12"
|
|
TextWrapping="Wrap"
|
|
Foreground="{ThemeResource SystemControlForegroundBaseHighBrush}"
|
|
x:Name="LogTextBlock"/>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
|
|
<!-- Status Bar -->
|
|
<Border Grid.Row="2" Background="{ThemeResource SystemControlBackgroundChromeMediumBrush}" Padding="10,3">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0"
|
|
x:Name="LogCountText"
|
|
Text="0 messages"
|
|
FontSize="11"
|
|
Foreground="{ThemeResource SystemControlForegroundBaseMediumHighBrush}"
|
|
VerticalAlignment="Center"/>
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="10">
|
|
<CheckBox x:Name="AutoScrollCheckBox"
|
|
Content="Auto-scroll"
|
|
FontSize="11"
|
|
IsChecked="True"
|
|
VerticalAlignment="Center"
|
|
Checked="AutoScrollCheckBox_CheckedChanged"
|
|
Unchecked="AutoScrollCheckBox_CheckedChanged"/>
|
|
|
|
<ComboBox x:Name="LogLevelFilterComboBox"
|
|
Width="80"
|
|
FontSize="11"
|
|
VerticalAlignment="Center"
|
|
SelectionChanged="LogLevelFilterComboBox_SelectionChanged">
|
|
<ComboBoxItem Content="All" IsSelected="True" Tag="ALL"/>
|
|
<ComboBoxItem Content="Debug" Tag="DEBUG"/>
|
|
<ComboBoxItem Content="Info" Tag="INFO"/>
|
|
<ComboBoxItem Content="Warning" Tag="WARNING"/>
|
|
<ComboBoxItem Content="Error" Tag="ERROR"/>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</UserControl> |