-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
248 lines (238 loc) · 15.6 KB
/
MainWindow.xaml
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<Window x:Class="IDT2025.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:material="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:IDT2025"
mc:Ignorable="d"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
Title="InfoDev Tools" Height="800" Width="1200"
MinWidth="1200" MinHeight="800"
Icon="pack://application:,,,/images/IDT.ico"
WindowStartupLocation="CenterScreen"
StateChanged="Window_StateChanged">
<Window.Resources>
<local:VpnStatusToColorConverter x:Key="VpnStatusToColorConverter"/>
<Style x:Key="appBtn" TargetType="Button">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="Width" Value="40"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="Padding" Value="0,0,0,0"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Cursor" Value="Hand"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#171b22"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="NavIconCell" TargetType="Border">
<Setter Property="BorderBrush" Value="#3b4a5e"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Background" Value="#3b4a5e"/>
<Setter Property="Cursor" Value="Hand"/>
</Style>
<Style x:Key="NavLabel" TargetType="Label">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Padding" Value="20,0,0,0"/>
<!--<Setter Property="FontWeight" Value="Bold"/>-->
<Setter Property="FontSize" Value="18"/>
<Setter Property="Foreground" Value="#7290b7"/>
<Setter Property="Cursor" Value="Hand"/>
</Style>
<Style x:Key="NavLabelCell" TargetType="Border">
<Setter Property="Width" Value="150"/>
<Setter Property="BorderBrush" Value="#3b4a5e"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Background" Value="#171b22"/>
</Style>
<Style x:Key="NavIcon" TargetType="material:PackIcon">
<Setter Property="Width" Value="28"/>
<Setter Property="Height" Value="28"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
</Style>
</Window.Resources>
<Grid x:Name="MainGrid">
<Border x:Name="MainBorder" Background="#3b4a5e" BorderBrush="#3b4a5e" BorderThickness="1">
<Grid>
<Grid.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Color="#070708" Offset="0" />
<GradientStop Color="#43546B" Offset="0.4" />
<GradientStop Color="#43546B" Offset="0.5" />
<GradientStop Color="#26242B" Offset="1" />
</LinearGradientBrush>
</Grid.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<!-- Title Bar Row -->
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<!--<ColumnDefinition Width="20"/>-->
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<!-- Title Bar -->
<Border Grid.Row="0" Grid.ColumnSpan="5" Background="#3b4a5e" Margin="0" MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10" />
<ColumnDefinition Width="40" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="450" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="40" />
<ColumnDefinition Width="40" />
<ColumnDefinition Width="40" />
<ColumnDefinition Width="10" />
</Grid.ColumnDefinitions>
<Button Style="{StaticResource appBtn}" Click="NavToggleButton_Click" Grid.Column="1">
<material:PackIcon Kind="ArrowLeftBox" x:Name="ToggleNavButton" Foreground="White" Width="20" Height="20"/>
</Button>
<Label VerticalAlignment="Center" Foreground="White" FontSize="24" Padding="20,0,20,0" Grid.Column="2">
<TextBlock>
<Run Text="InfoDev Tools"/>
<Run x:Name="TitleVersionValue" FontSize="12"/>
</TextBlock>
</Label>
<StackPanel x:Name="TopNav" Orientation="Horizontal" HorizontalAlignment="Left"
VerticalAlignment="Center" Grid.Column="3" Margin="40,0,0,0" Visibility="Collapsed">
<Button Style="{StaticResource appBtn}" Margin="0,0,20,0" ToolTip="Dashboard"
Click="TopNavDashboardButton_Click">
<material:PackIcon Kind="GraphBar" Style="{StaticResource NavIcon}"/>
</Button>
<Button Style="{StaticResource appBtn}" Margin="0,0,20,0" ToolTip="PubAssist"
Click="TopNavPubAssistButton_Click">
<material:PackIcon Kind="CloudUpload" Style="{StaticResource NavIcon}"/>
</Button>
<Button Style="{StaticResource appBtn}" Margin="0,0,20,0" ToolTip="Single File">
<material:PackIcon Kind="Upload" Style="{StaticResource NavIcon}"/>
</Button>
<Button Style="{StaticResource appBtn}" Margin="0,0,20,0" ToolTip="Editor">
<material:PackIcon Kind="Edit" Style="{StaticResource NavIcon}"/>
</Button>
<Button Style="{StaticResource appBtn}" Margin="0,0,20,0" ToolTip="Settings">
<material:PackIcon Kind="Settings" Style="{StaticResource NavIcon}"/>
</Button>
<Button Style="{StaticResource appBtn}" Margin="0,0,0,0" ToolTip="VPN Status">
<material:PackIcon Kind="Plug" x:Name="TopVpnIcon" Style="{StaticResource NavIcon}"/>
</Button>
</StackPanel>
<Button x:Name="HelpButton" Style="{StaticResource appBtn}" Click="HelpButton_Click" Grid.Column="4">
<material:PackIcon Kind="Help" Foreground="White" Width="20" Height="20"/>
<Button.ContextMenu>
<ContextMenu x:Name="HelpContextMenu">
<MenuItem Header="View Help" Click="ViewHelp_Click"/>
<MenuItem Header="Release Notes" Click="ReleaseNotes_Click"/>
<MenuItem Header="About IDT2025" Click="About_Click"/>
</ContextMenu>
</Button.ContextMenu>
</Button>
<Button Style="{StaticResource appBtn}" Click="MinimizeButton_Click" Grid.Column="5">
<material:PackIcon Kind="WindowMinimize" Foreground="White" Width="20" Height="20"/>
</Button>
<Button Style="{StaticResource appBtn}" Click="MaximizeButton_Click" Grid.Column="6">
<material:PackIcon Kind="WindowMaximize" Foreground="White" Width="20" Height="20"/>
</Button>
<Button Style="{StaticResource appBtn}" Click="CloseButton_Click" Grid.Column="7">
<material:PackIcon Kind="Close" Foreground="White" Width="20" Height="20"/>
</Button>
</Grid>
</Border>
<!-- Sidebar -->
<Border x:Name="SidebarContainer" Grid.Row="3" Grid.ColumnSpan="2">
<!-- #region Sidebar content -->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="20"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border x:Name="DashboardIconCell" Style="{StaticResource NavIconCell}" ToolTip="Dashboard"
MouseLeftButtonDown="DashboardIconCell_MouseLeftButtonDown" Grid.Row="0" Grid.Column="0">
<material:PackIcon Kind="GraphBar" Style="{StaticResource NavIcon}"/>
</Border>
<Border x:Name="DashboardLabelCell" Style="{StaticResource NavLabelCell}" Grid.Column="1" Grid.Row="0"
MouseLeftButtonDown="DashboardIconCell_MouseLeftButtonDown">
<Label Content="Dashboard" VerticalAlignment="Center" Style="{StaticResource NavLabel}"
MouseLeftButtonDown="DashboardIconCell_MouseLeftButtonDown"/>
</Border>
<Border x:Name="PubAssistIconCell" Style="{StaticResource NavIconCell}" ToolTip="PubAssist"
MouseLeftButtonDown="PubAssistIconCell_MouseLeftButtonDown" Grid.Row="1" Grid.Column="0" >
<material:PackIcon Kind="CloudUpload" Style="{StaticResource NavIcon}"/>
</Border>
<Border x:Name="PubAssistLabelCell" Style="{StaticResource NavLabelCell}" Grid.Column="1" Grid.Row="1"
MouseLeftButtonDown="PubAssistIconCell_MouseLeftButtonDown" >
<Label Content="PubAssist" VerticalAlignment="Center" Style="{StaticResource NavLabel}"/>
</Border>
<Border x:Name="SingleFileIconCell" Style="{StaticResource NavIconCell}" Grid.Row="2" Grid.Column="0" ToolTip="Single Files">
<material:PackIcon Kind="Upload" Style="{StaticResource NavIcon}"/>
</Border>
<Border x:Name="SingleFileLabelCell" Style="{StaticResource NavLabelCell}" Grid.Column="1" Grid.Row="2">
<Label Content="Single File" VerticalAlignment="Center" Style="{StaticResource NavLabel}"/>
</Border>
<Border x:Name="EditorIconCell" Style="{StaticResource NavIconCell}" Grid.Row="3" Grid.Column="0" ToolTip="Editor">
<material:PackIcon Kind="Edit" Style="{StaticResource NavIcon}"/>
</Border>
<Border x:Name="EditorLabelCell" Style="{StaticResource NavLabelCell}" Grid.Column="1" Grid.Row="3">
<Label Content="Editor" VerticalAlignment="Center" Style="{StaticResource NavLabel}"/>
</Border>
<Border x:Name="SettingsIconCell" Style="{StaticResource NavIconCell}" Grid.Row="4" Grid.Column="0" ToolTip="Settings">
<material:PackIcon Kind="Settings" Style="{StaticResource NavIcon}"/>
</Border>
<Border x:Name="SettingsLabelCell" Style="{StaticResource NavLabelCell}" Grid.Column="1" Grid.Row="4">
<Label Content="Settings" VerticalAlignment="Center" Style="{StaticResource NavLabel}"/>
</Border>
<Border x:Name="VpnIconCell" Style="{StaticResource NavIconCell}" Grid.Row="6" Grid.Column="0" ToolTip="VPN Status" Cursor="Arrow">
<material:PackIcon Kind="Plug" x:Name="VpnIcon" Style="{StaticResource NavIcon}" Foreground="{Binding IsVpnConnected, Converter={StaticResource VpnStatusToColorConverter}}"/>
</Border>
<Border x:Name="VpnLabelCell" Style="{StaticResource NavLabelCell}" Grid.Column="1" Grid.Row="6" Cursor="Arrow">
<Label Content="VPN Status" VerticalAlignment="Center" Style="{StaticResource NavLabel}"/>
</Border>
</Grid>
<!-- #endregion -->
</Border>
<!-- Main Content -->
<Border x:Name="MainContentContainer" Grid.Row="3" Grid.ColumnSpan="5" Margin="10,10,10,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" />
<ColumnDefinition Width="150" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- #region Content area -->
<ContentControl x:Name="MainContent" Grid.Column="2"/>
<!--#endregion-->
</Grid>
</Border>
</Grid>
</Grid>
</Border>
</Grid>
</Window>