-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAutoTabConfigDialog.xaml
More file actions
45 lines (42 loc) · 2.75 KB
/
AutoTabConfigDialog.xaml
File metadata and controls
45 lines (42 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<Window x:Class="X4LogWatcher.AutoTabConfigDialog"
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:local="clr-namespace:X4LogWatcher"
xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"
mc:Ignorable="d"
Title="Auto Tab Configuration" Height="320" Width="600"
WindowStartupLocation="CenterOwner">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="180"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions><!-- Description -->
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" TextWrapping="Wrap" Margin="0,0,0,15">
Auto tabs allow you to dynamically create tabs based on log line patterns.<LineBreak/>
The pattern must contain a named capturing group "unique" for the part that creates unique instances.<LineBreak/>
Everything outside the unique group is treated as constant and identifies the tab type.<LineBreak/><LineBreak/>
Example: <LineBreak/> Error: (?<unique>.*?) in module .*
</TextBlock>
<CheckBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Name="chkEnabled" Content="Enabled" IsChecked="{Binding IsEnabled}" Margin="0,10"/>
<!-- Pattern input -->
<Label Grid.Row="2" Grid.Column="0" Content="Pattern Regex:" VerticalAlignment="Center"/>
<TextBox Grid.Row="2" Grid.Column="1" Name="txtPattern" Text="{Binding PatternRegex}" Margin="0,5" ToolTip="Regular expression with a named group 'unique'. Example: Error: (?<unique>.*?) in module .*"/>
<!-- After Lines -->
<Label Grid.Row="3" Grid.Column="0" Content="After Lines:" VerticalAlignment="Center"/>
<TextBox Grid.Row="3" Grid.Column="1" Name="txtAfterLines" Text="{Binding AfterLines}" Margin="0,5" ToolTip="Number of lines to show after a match"/> <!-- Enabled Checkbox -->
<!-- Buttons -->
<StackPanel Grid.Row="4" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,15,0,0">
<Button Name="btnOK" Content="OK" Click="BtnOK_Click" Width="80" Margin="5,0"/>
<Button Name="btnCancel" Content="Cancel" Click="BtnCancel_Click" Width="80" Margin="5,0"/>
</StackPanel>
</Grid>
</Window>