-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
120 lines (113 loc) · 6.55 KB
/
MainWindow.xaml
File metadata and controls
120 lines (113 loc) · 6.55 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<Controls:MetroWindow x:Class="X4LogWatcher.MainWindow"
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:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:local="clr-namespace:X4LogWatcher"
mc:Ignorable="d"
Title="{Binding TitleText}"
Height="600"
Width="800"
GlowBrush="{DynamicResource MahApps.Brushes.Accent}"
Icon="/docs/images/x4logwatcher.ico"
ResizeMode="CanResizeWithGrip">
<DockPanel>
<!-- Menu with DockPanel to position Exit at right -->
<Menu DockPanel.Dock="Top">
<Menu.ItemsPanel>
<ItemsPanelTemplate>
<DockPanel HorizontalAlignment="Stretch"/>
</ItemsPanelTemplate>
</Menu.ItemsPanel>
<MenuItem x:Name="menuProfile"
Header="Profiles"
HorizontalAlignment="Left"
Width="Auto">
<MenuItem x:Name="menuSaveProfile"
Header="Save Profile..."
Click="MenuSaveProfile_Click"/>
<MenuItem x:Name="menuLoadProfile"
Header="Load Profile..."
Click="MenuLoadProfile_Click"/>
<Separator/>
<!-- Recent profiles section - will be populated dynamically -->
<MenuItem x:Name="menuRecentProfilesHeader"
Header="Recent Profiles"
IsEnabled="False"/>
<!-- Placeholder for recent profile items that will be added programmatically -->
</MenuItem>
<MenuItem x:Name="menuAutoTabs"
Header="Auto Tabs"
Click="MenuAutoTabs_Click"/>
<Separator/>
<!-- Left-aligned menu items -->
<MenuItem x:Name="menuWatchLogFile"
Header="Watch File"
IsCheckable="True"
IsChecked="{Binding IsWatchingFile}"
Click="BtnSelectFile_Click"/>
<MenuItem x:Name="menuWatchLogFolder"
Header="Watch Folder"
IsCheckable="True"
IsChecked="{Binding IsWatchingFolder}"
Click="BtnSelectFolder_Click"/>
<MenuItem x:Name="menuForcedRefresh"
Header="Forced Refresh"
IsCheckable="True"
IsChecked="{Binding IsForcedRefreshEnabled}"
Click="MenuForcedRefresh_Click"/>
<Separator/>
<MenuItem x:Name="menuSkipSignatureErrors"
Header="Skip Signature Errors"
IsCheckable="True"
IsChecked="{Binding AppConfig.SkipSignatureErrors, Mode=TwoWay}"/>
<MenuItem x:Name="menuRealTimeStamping"
Header="Real Time Stamping"
IsCheckable="True"
IsChecked="{Binding AppConfig.RealTimeStamping, Mode=TwoWay}"/>
<!-- Right-aligned Exit menu item -->
<MenuItem x:Name="menuExit"
Header="Exit"
Click="Exit_Click"
HorizontalAlignment="Right"
Width="Auto"
DockPanel.Dock="Right"/>
</Menu>
<!-- Find Panel - Initially Hidden -->
<DockPanel x:Name="findPanel" DockPanel.Dock="Top" Visibility="Collapsed" Background="{DynamicResource MahApps.Brushes.Gray10}">
<Button x:Name="btnCloseFindPanel" DockPanel.Dock="Right" Content="×" Width="24" Height="24" Margin="2" Click="BtnCloseFindPanel_Click"/>
<Button x:Name="btnFindPrevious" DockPanel.Dock="Right" Content="▲" Width="24" Height="24" Margin="2" Click="BtnFindPrevious_Click" ToolTip="Find Previous (Shift+F3)"/>
<Button x:Name="btnFindNext" DockPanel.Dock="Right" Content="▼" Width="24" Height="24" Margin="2" Click="BtnFindNext_Click" ToolTip="Find Next (F3)"/>
<CheckBox x:Name="chkMatchCase" DockPanel.Dock="Right" Content="Match case" VerticalAlignment="Center" Margin="5,0" Checked="FindOptions_Changed" Unchecked="FindOptions_Changed"/>
<TextBox x:Name="txtFindText" Margin="5,2" VerticalAlignment="Center" TextChanged="TxtFindText_TextChanged" KeyDown="TxtFindText_KeyDown" MinWidth="150"/>
</DockPanel>
<!-- Status Bar - Always Visible -->
<StatusBar DockPanel.Dock="Bottom" Height="24" Background="{DynamicResource MahApps.Brushes.Gray10}">
<StatusBarItem HorizontalAlignment="Left" Margin="5,0">
<TextBlock x:Name="txtFileStatus" Text="{Binding StatusLineFileInfo}" Foreground="{DynamicResource MahApps.Brushes.Text}" />
</StatusBarItem>
<Separator />
<StatusBarItem HorizontalAlignment="Right" Margin="5,0">
<TextBlock x:Name="txtSearchStatus" Foreground="{DynamicResource MahApps.Brushes.Accent}" />
</StatusBarItem>
</StatusBar>
<!-- Tab Control with special Add Tab button -->
<Controls:MetroAnimatedTabControl x:Name="tabControl"
Margin="5"
Controls:HeaderedControlHelper.HeaderFontSize="16">
<!-- Special Add Tab button that will always be shown as the last tab -->
<Controls:MetroTabItem x:Name="addTabButton"
Header="+"
Width="40"
MouseLeftButtonUp="AddTabButton_MouseLeftButtonUp"
CloseButtonEnabled="False"
Controls:HeaderedControlHelper.HeaderFontSize="18"
Controls:HeaderedControlHelper.HeaderFontWeight="Bold">
<!-- Explicitly set content to empty -->
<Grid></Grid>
</Controls:MetroTabItem>
<!-- Regular tabs will be inserted before this Add tab programmatically -->
</Controls:MetroAnimatedTabControl>
</DockPanel>
</Controls:MetroWindow>