Added running log panel in the below screen
This commit is contained in:
@@ -51,7 +51,14 @@
|
||||
</Window.Resources>
|
||||
|
||||
<Grid>
|
||||
<shared:TabControlEx ItemsSource="{Binding Editors}"
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" MinHeight="0" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<shared:TabControlEx Grid.Row="0"
|
||||
ItemsSource="{Binding Editors}"
|
||||
SelectedItem="{Binding SelectedEditor}"
|
||||
AddTabCommand="{Binding AddEditorCommand}"
|
||||
AutoScrollToEnd="{Binding AutoSelectNewEditor}">
|
||||
@@ -70,7 +77,110 @@
|
||||
</shared:TabControlEx.ItemContainerStyle>
|
||||
</shared:TabControlEx>
|
||||
|
||||
<Expander Header="Click to hide/show"
|
||||
<!-- Log Panel -->
|
||||
<Border Grid.Row="1" Height="3" Cursor="SizeNS"
|
||||
Background="Transparent">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding LogPanel.IsOpen}" Value="False">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<GridSplitter HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="#FF3F3F46"
|
||||
ResizeBehavior="PreviousAndNext"
|
||||
ResizeDirection="Rows" />
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="2" Background="#FF1E1E1E" BorderBrush="#FF3F3F46" BorderThickness="0,1,0,0">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Height" Value="180" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding LogPanel.IsOpen}" Value="False">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
<Setter Property="Height" Value="0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Header bar -->
|
||||
<Border Grid.Row="0" Background="#FF2D2D30" BorderBrush="#FF3F3F46" BorderThickness="0,0,0,1">
|
||||
<DockPanel Margin="8,0">
|
||||
<TextBlock Text="⚡ Output" VerticalAlignment="Center" Foreground="#FFDCDCDC" FontWeight="SemiBold" FontSize="12" />
|
||||
<TextBlock VerticalAlignment="Center" Margin="10,0,0,0" Foreground="#FF888888" FontSize="11">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Text" Value="" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding LogPanel.IsRunning}" Value="True">
|
||||
<Setter Property="Text" Value="● Running..." />
|
||||
<Setter Property="Foreground" Value="#FF4EC9B0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Content="🗑 Clear" Command="{Binding LogPanel.ClearLogsCommand}"
|
||||
Background="Transparent" Foreground="#FFAAAAAA" BorderThickness="0"
|
||||
Padding="6,2" FontSize="11" Cursor="Hand" Margin="0,0,4,0" />
|
||||
<Button Content="✕" Command="{Binding LogPanel.ClosePanelCommand}"
|
||||
Background="Transparent" Foreground="#FFAAAAAA" BorderThickness="0"
|
||||
Padding="6,2" FontSize="11" Cursor="Hand" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Log entries -->
|
||||
<ListBox Grid.Row="1" x:Name="LogListBox"
|
||||
ItemsSource="{Binding LogPanel.LogEntries}"
|
||||
Background="#FF1E1E1E" BorderThickness="0"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
FontFamily="Consolas" FontSize="12">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Padding" Value="8,1" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
|
||||
<ContentPresenter />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock TextWrapping="NoWrap">
|
||||
<Run Text="{Binding Timestamp, Mode=OneTime}" Foreground="#FF608B4E" />
|
||||
<Run Text=" " />
|
||||
<Run Text="{Binding Message, Mode=OneTime}" Foreground="{Binding Color, Mode=OneTime}" />
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Expander Grid.Row="0" Header="Click to hide/show"
|
||||
IsExpanded="False"
|
||||
Margin="10"
|
||||
HorizontalAlignment="Left"
|
||||
|
||||
Reference in New Issue
Block a user