82 lines
3.9 KiB
XML
82 lines
3.9 KiB
XML
<UserControl x:Class="EmbyToolbox.Views.LogsView"
|
|
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"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="560"
|
|
d:DesignWidth="900">
|
|
<Border BorderBrush="{DynamicResource Ui.Brush.BorderSubtle}"
|
|
BorderThickness="1"
|
|
Background="{DynamicResource Ui.Brush.Surface}"
|
|
Padding="8">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Row="0"
|
|
Orientation="Horizontal"
|
|
Margin="0,0,0,12"
|
|
VerticalAlignment="Center">
|
|
<Button MinWidth="120"
|
|
Margin="{StaticResource Ui.HStack.8}"
|
|
Style="{StaticResource UiButtonSecondary}"
|
|
Command="{Binding RefreshLogViewCommand}"
|
|
ToolTip="Прокрутить к последним сообщениям">
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
<TextBlock Style="{StaticResource UiMdlGlyphButton}" Text="" />
|
|
<TextBlock VerticalAlignment="Center" Text="Обновить" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button MinWidth="200"
|
|
Margin="{StaticResource Ui.HStack.8}"
|
|
Style="{StaticResource UiButtonSecondary}"
|
|
Command="{Binding OpenLogsFolderCommand}">
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
<TextBlock Style="{StaticResource UiMdlGlyphButton}" Text="" />
|
|
<TextBlock Text="Открыть папку логов" VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button MinWidth="168"
|
|
Style="{StaticResource UiButtonGhost}"
|
|
Command="{Binding ClearUiLogCommand}">
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
<TextBlock Style="{StaticResource UiMdlGlyphButton}" Text="" />
|
|
<TextBlock VerticalAlignment="Center" Text="Очистить UI-лог" />
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<Border Grid.Row="1"
|
|
BorderBrush="{DynamicResource Ui.Brush.BorderSubtle}"
|
|
BorderThickness="1"
|
|
Background="{DynamicResource Ui.Brush.LogBg}">
|
|
<!-- Цвет уровня строки: ресурсы + SetResourceReference на Run в code-behind. -->
|
|
<RichTextBox x:Name="LogRichTextBox"
|
|
IsReadOnly="True"
|
|
IsUndoEnabled="False"
|
|
AcceptsTab="False"
|
|
AcceptsReturn="False"
|
|
BorderThickness="0"
|
|
Padding="6"
|
|
Background="Transparent"
|
|
Foreground="{DynamicResource Ui.Brush.LogInfo}"
|
|
FontFamily="Consolas"
|
|
FontSize="13"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Auto"
|
|
HorizontalContentAlignment="Stretch">
|
|
<RichTextBox.Resources>
|
|
<SolidColorBrush x:Key="LogDebugBrush" Color="{DynamicResource C.LogDebug}" />
|
|
<SolidColorBrush x:Key="LogInfoBrush" Color="{DynamicResource C.LogInfo}" />
|
|
<SolidColorBrush x:Key="LogWarningBrush" Color="{DynamicResource C.LogWarning}" />
|
|
<SolidColorBrush x:Key="LogErrorBrush" Color="{DynamicResource C.LogError}" />
|
|
</RichTextBox.Resources>
|
|
</RichTextBox>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</UserControl>
|