lib/ui/LogWindow.xaml
<Window 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:local="clr-x:Namespace:Fortigi" Title="Log" Width="450" MinWidth="450" MinHeight="300" Background="{DynamicResource {x:Static SystemColors.ScrollBarBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}" Name="LogWindow" > <Window.Resources> <Style TargetType="TextBox"> <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/> </Style> <Style TargetType="Label"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Height" Value="25"/> <Setter Property="Width" Value="100"/> </Style> <Style TargetType="Separator"> <Setter Property="Background" Value="Transparent"/> </Style> <Style TargetType="Button"> <Setter Property="Height" Value="25"/> <Setter Property="Width" Value="95"/> </Style> <Style TargetType="ComboBox"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="HorizontalContentAlignment" Value="Left"/> <Setter Property="Height" Value="25"/> <Setter Property="Width" Value="300"/> </Style> </Window.Resources> <Grid Grid.Row="0" > <Grid.RowDefinitions> <RowDefinition Height="10"/> <RowDefinition Height="*"/> <RowDefinition Height="40"/> <RowDefinition Height="30"/> <RowDefinition Height="10"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="10"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="10"/> </Grid.ColumnDefinitions> <Border Grid.Row="1" Grid.Column="1" BorderBrush="Gray" BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.AppWorkspaceBrushKey}}"> <TextBox x:Name="TextBoxLog" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" FontFamily="Consolas" IsReadOnly="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" VerticalContentAlignment="Top" /> </Border> <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="20"/> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Button x:Name="ButtonExportLogFile" Content="_Export" ToolTip="Export log to file" Grid.Column="1" /> <Button x:Name="ButtonClearLog" Content="_Clear" ToolTip="Clear log window" Grid.Column="3" /> </Grid> </StackPanel> <StackPanel Orientation="Vertical" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center"> <StackPanel Orientation="Horizontal"> <Label x:Name="LabelSelectLogLevel" Content="Log Level:" ToolTip="Select log level" HorizontalAlignment="Left" Width="Auto"/> <Separator Width="10" /> <ComboBox x:Name="ComboBoxSelectLogLevel" SelectedIndex="0" ToolTip="Select log level" Width="80"> <ComboBoxItem Content="INFO"/> <ComboBoxItem Content="ERROR"/> <ComboBoxItem Content="DEBUG"/> <ComboBoxItem Content="VERBOSE"/> <ComboBoxItem Content="VERBOSE2"/> </ComboBox> <Separator Width="20" /> <CheckBox x:Name="CheckboxWordWrap" Content="Word wrap" VerticalAlignment="Center" ToolTip="Word wrap" /> <Separator Width="20" /> <CheckBox x:Name="CheckboxConsoleLog" Content="Console Log" VerticalAlignment="Center" ToolTip="Log output in console" /> </StackPanel> </StackPanel> </Grid> </Window> |