Repository navigation
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
471 lines (428 loc) · 31.2 KB
/
Copy pathMainWindow.xaml
File metadata and controls
471 lines (428 loc) · 31.2 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
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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
<Window x:Class="ProcMaster.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:local="clr-namespace:ProcMaster"
xmlns:models="clr-namespace:ProcMaster.Models"
xmlns:vm="clr-namespace:ProcMaster.ViewModels"
xmlns:conv="clr-namespace:ProcMaster.Converters"
mc:Ignorable="d"
Title="ProcMaster" Height="780" Width="1240"
Background="#191919" Foreground="#E0E0E0"
WindowStartupLocation="CenterScreen"
FontFamily="Segoe UI Variable Display, Segoe UI, sans-serif"
UseLayoutRounding="True" SnapsToDevicePixels="True">
<Window.Resources>
<conv:CpuColorConverter x:Key="CpuColorConverter" />
<conv:CpuSparklineConverter x:Key="CpuSparklineConverter" />
<BooleanToVisibilityConverter x:Key="BoolToVis" />
<!-- Modern Dark ScrollBar Style -->
<Style TargetType="{x:Type ScrollBar}">
<Setter Property="Background" Value="#181818"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Width" Value="8"/>
</Style>
<!-- Base TextBlock -->
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="#CCCCCC"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<!-- Modern Dark DataGrid -->
<Style TargetType="DataGrid">
<Setter Property="Background" Value="#1C1C1C"/>
<Setter Property="Foreground" Value="#E0E0E0"/>
<Setter Property="GridLinesVisibility" Value="Horizontal"/>
<Setter Property="HorizontalGridLinesBrush" Value="#2A2A2A"/>
<Setter Property="RowBackground" Value="#1C1C1C"/>
<Setter Property="AlternatingRowBackground" Value="#202020"/>
<Setter Property="BorderBrush" Value="#2A2A2A"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HeadersVisibility" Value="Column"/>
<Setter Property="AutoGenerateColumns" Value="False"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="SelectionMode" Value="Single"/>
<Setter Property="RowHeight" Value="24"/>
<Setter Property="FontSize" Value="12"/>
</Style>
<!-- DataGrid Column Header -->
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="#212121"/>
<Setter Property="Foreground" Value="#9E9E9E"/>
<Setter Property="Padding" Value="10,6"/>
<Setter Property="BorderBrush" Value="#2B2B2B"/>
<Setter Property="BorderThickness" Value="0,0,1,1"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="FontSize" Value="12"/>
</Style>
<!-- Lower Pane Modern TabItem Style (Matching Screenshot) -->
<Style x:Key="LowerTabItemStyle" TargetType="TabItem">
<Setter Property="Foreground" Value="#8E8E8E"/>
<Setter Property="FontSize" Value="12.5"/>
<Setter Property="Padding" Value="14,6"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border Name="TabBorder" Background="Transparent" CornerRadius="4" Margin="2,3" Padding="{TemplateBinding Padding}">
<ContentPresenter x:Name="TabContent" ContentSource="Header" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="TabBorder" Property="Background" Value="#262626"/>
<Setter Property="Foreground" Value="#FFFFFF"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="#E0E0E0"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Top Header Navigation Tab Button Style -->
<Style x:Key="TopNavButtonStyle" TargetType="RadioButton">
<Setter Property="Foreground" Value="#8A8A8A"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="Padding" Value="16,5"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border x:Name="Border" Background="{TemplateBinding Background}" CornerRadius="4" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="#282828"/>
<Setter Property="Foreground" Value="#FFFFFF"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="#FFFFFF"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Action Button Style in Top Bar -->
<Style x:Key="HeaderActionButton" TargetType="Button">
<Setter Property="Background" Value="#262626"/>
<Setter Property="Foreground" Value="#D0D0D0"/>
<Setter Property="BorderBrush" Value="#353535"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="8,4"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#333333"/>
<Setter Property="Foreground" Value="#FFFFFF"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Background="#161616">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- Modern Title/App Bar -->
<RowDefinition Height="Auto"/> <!-- Quick Action Subbar -->
<RowDefinition Height="3*"/> <!-- Process Hierarchy Tree -->
<RowDefinition Height="4"/> <!-- Sleek Splitter -->
<RowDefinition Height="2*"/> <!-- Lower Inspection Pane -->
<RowDefinition Height="Auto"/> <!-- Modern Footer Bar -->
</Grid.RowDefinitions>
<!-- 1. Sleek Modern App & Title Bar (matching screenshot top bar) -->
<Border Grid.Row="0" Background="#1D1D1D" BorderBrush="#262626" BorderThickness="0,0,0,1" Padding="14,8">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <!-- Menu Hamburger + Icon + ProcMaster Title -->
<ColumnDefinition Width="*"/> <!-- Centered Nav (Processes, Performance, Services) -->
<ColumnDefinition Width="Auto"/> <!-- Search Box -->
</Grid.ColumnDefinitions>
<!-- Left: Hamburger Menu + Neon Cyan Icon + ProcMaster -->
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
<!-- Hamburger Menu Button -->
<Menu Background="Transparent" Margin="0,0,10,0" VerticalAlignment="Center">
<MenuItem Header="☰" FontSize="16" Foreground="#B0B0B0" Background="Transparent" BorderThickness="0" Padding="4,2" Cursor="Hand" ToolTip="Application Menu">
<MenuItem Header="📁 Run New Task..." Click="OnRunNewTask_Click" Background="#222222" Foreground="#E0E0E0"/>
<Separator Background="#333333"/>
<MenuItem Header="🔄 Refresh Now (F5)" Click="OnRefresh_Click" Background="#222222" Foreground="#E0E0E0"/>
<MenuItem Header="⏱ Update Speed" Background="#222222" Foreground="#E0E0E0">
<MenuItem Header="High (0.5 sec)" Click="OnSpeedHigh_Click" Background="#222222" Foreground="#E0E0E0"/>
<MenuItem Header="Normal (1.0 sec)" Click="OnSpeedNormal_Click" Background="#222222" Foreground="#E0E0E0"/>
<MenuItem Header="Low (2.0 sec)" Click="OnSpeedLow_Click" Background="#222222" Foreground="#E0E0E0"/>
<MenuItem Header="Paused" Click="OnSpeedPaused_Click" Background="#222222" Foreground="#E0E0E0"/>
</MenuItem>
<Separator Background="#333333"/>
<MenuItem Header="🛡️ Restart as Administrator" Click="OnRestartAdmin_Click" Background="#222222" Foreground="#E0E0E0"/>
<Separator Background="#333333"/>
<MenuItem Header="🌐 View on GitHub" Click="OnGitHub_Click" Background="#222222" Foreground="#E0E0E0"/>
<MenuItem Header="ℹ️ About ProcMaster" Click="OnAbout_Click" Background="#222222" Foreground="#E0E0E0"/>
<Separator Background="#333333"/>
<MenuItem Header="❌ Exit" Click="OnExit_Click" Background="#222222" Foreground="#E0E0E0"/>
</MenuItem>
</Menu>
<!-- Glowing Cyan Process Tree Glyph matching screenshot icon -->
<Border Width="24" Height="24" Background="#142C2C" BorderBrush="#00E5FF" BorderThickness="1.5" CornerRadius="4" Margin="0,0,8,0">
<Path Data="M 6,6 H 12 V 10 H 6 Z M 12,8 H 18 V 16 H 14 M 18,12 H 20" Stroke="#00E5FF" StrokeThickness="1.5" Fill="Transparent" Stretch="Uniform" Margin="3"/>
</Border>
<!-- Title -->
<TextBlock Text="ProcMaster" FontSize="15" FontWeight="SemiBold" Foreground="#FFFFFF" VerticalAlignment="Center"/>
</StackPanel>
<!-- Center: Segmented Navigation (Processes, Performance, Services) -->
<Border Grid.Column="1" HorizontalAlignment="Center" Background="#151515" BorderBrush="#252525" BorderThickness="1" CornerRadius="5" Padding="2">
<StackPanel Orientation="Horizontal">
<RadioButton Content="Processes" IsChecked="True" Style="{StaticResource TopNavButtonStyle}"/>
<RadioButton Content="Performance" Style="{StaticResource TopNavButtonStyle}"/>
<RadioButton Content="Services" Style="{StaticResource TopNavButtonStyle}"/>
</StackPanel>
</Border>
<!-- Right: Clean Search Filter Box -->
<Border Grid.Column="2" Background="#161616" BorderBrush="#303030" BorderThickness="1" CornerRadius="4" Padding="6,3" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal">
<TextBlock Text="🔍" FontSize="10" Foreground="#707070" Margin="0,0,5,0" VerticalAlignment="Center"/>
<TextBox Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" Width="160" Background="Transparent" Foreground="#FFFFFF" BorderThickness="0" FontSize="11" VerticalAlignment="Center"/>
</StackPanel>
</Border>
</Grid>
</Border>
<!-- 2. Action Controls Subbar -->
<Border Grid.Row="1" Background="#1A1A1A" BorderBrush="#242424" BorderThickness="0,0,0,1" Padding="12,4">
<DockPanel LastChildFill="True">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Left">
<Button Content="Kill Process" Click="OnKillProcess_Click" Style="{StaticResource HeaderActionButton}" Margin="0,0,4,0" Foreground="#FF6B6B"/>
<Button Content="Kill Tree" Click="OnKillTree_Click" Style="{StaticResource HeaderActionButton}" Margin="0,0,4,0" Foreground="#E57373"/>
<Button Content="Suspend" Click="OnSuspend_Click" Style="{StaticResource HeaderActionButton}" Margin="0,0,4,0"/>
<Button Content="Resume" Click="OnResume_Click" Style="{StaticResource HeaderActionButton}" Margin="0,0,6,0" Foreground="#81C784"/>
<Menu Background="Transparent" VerticalAlignment="Center">
<MenuItem Header="Priority ▾" Background="#262626" Foreground="#CCCCCC" Padding="8,4" FontSize="11" BorderBrush="#353535" BorderThickness="1">
<MenuItem Header="Realtime" Click="OnPriorityRealtime_Click" Background="#222" Foreground="#FFF"/>
<MenuItem Header="High" Click="OnPriorityHigh_Click" Background="#222" Foreground="#FFF"/>
<MenuItem Header="Above Normal" Click="OnPriorityAboveNormal_Click" Background="#222" Foreground="#FFF"/>
<MenuItem Header="Normal" Click="OnPriorityNormal_Click" Background="#222" Foreground="#FFF"/>
<MenuItem Header="Below Normal" Click="OnPriorityBelowNormal_Click" Background="#222" Foreground="#FFF"/>
<MenuItem Header="Idle" Click="OnPriorityIdle_Click" Background="#222" Foreground="#FFF"/>
</MenuItem>
</Menu>
<Button Content="🔄 Refresh" Click="OnRefresh_Click" Style="{StaticResource HeaderActionButton}" Margin="6,0,0,0"/>
</StackPanel>
<!-- Status indicator -->
<TextBlock DockPanel.Dock="Right" Text="{Binding StatusText}" Foreground="#666666" FontSize="11" HorizontalAlignment="Right" VerticalAlignment="Center"/>
</DockPanel>
</Border>
<!-- 3. Process Tree Area (Exact Column Alignments from Screenshot) -->
<Grid Grid.Row="2" Background="#181818">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- Column Header Bar -->
<RowDefinition Height="*"/> <!-- Process Items -->
</Grid.RowDefinitions>
<!-- Column Header Bar matching Screenshot -->
<Border Grid.Row="0" Background="#1E1E1E" BorderBrush="#282828" BorderThickness="0,0,0,1" Padding="8,5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="260"/> <!-- Process Name -->
<ColumnDefinition Width="65"/> <!-- PID -->
<ColumnDefinition Width="95"/> <!-- CPU % with sparkline -->
<ColumnDefinition Width="140"/> <!-- Memory Private Bytes -->
<ColumnDefinition Width="105"/> <!-- Working Set -->
<ColumnDefinition Width="70"/> <!-- Handles -->
<ColumnDefinition Width="70"/> <!-- Threads -->
<ColumnDefinition Width="*"/> <!-- Description -->
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Process Name" FontSize="11.5" Foreground="#A0A0A0" Margin="4,0,0,0"/>
<TextBlock Grid.Column="1" Text="PID" FontSize="11.5" Foreground="#A0A0A0" HorizontalAlignment="Right" Margin="0,0,8,0"/>
<TextBlock Grid.Column="2" Text="CPU %" FontSize="11.5" Foreground="#A0A0A0" HorizontalAlignment="Right" Margin="0,0,8,0"/>
<TextBlock Grid.Column="3" Text="Memory Private Bytes" FontSize="11.5" Foreground="#A0A0A0" HorizontalAlignment="Right" Margin="0,0,10,0"/>
<TextBlock Grid.Column="4" Text="Working Set" FontSize="11.5" Foreground="#A0A0A0" HorizontalAlignment="Right" Margin="0,0,10,0"/>
<TextBlock Grid.Column="5" Text="Handles" FontSize="11.5" Foreground="#A0A0A0" HorizontalAlignment="Right" Margin="0,0,10,0"/>
<TextBlock Grid.Column="6" Text="Threads" FontSize="11.5" Foreground="#A0A0A0" HorizontalAlignment="Right" Margin="0,0,10,0"/>
<TextBlock Grid.Column="7" Text="Description" FontSize="11.5" Foreground="#A0A0A0" Margin="10,0,0,0"/>
</Grid>
</Border>
<!-- Virtualized Process TreeView -->
<TreeView Grid.Row="1"
ItemsSource="{Binding ProcessTree}"
Background="#181818"
BorderThickness="0"
VirtualizingStackPanel.IsVirtualizing="True"
VirtualizingStackPanel.VirtualizationMode="Recycling"
ScrollViewer.CanContentScroll="True"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
HorizontalContentAlignment="Stretch"
SelectedItemChanged="OnTreeViewSelectedItemChanged">
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="Background" Value="{Binding HighlightColor}" />
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Padding" Value="0,1"/>
<Setter Property="MinHeight" Value="24"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#253746"/>
<Setter Property="Foreground" Value="#FFFFFF"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#222A30"/>
</Trigger>
</Style.Triggers>
</Style>
</TreeView.ItemContainerStyle>
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<Grid Margin="0,1" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="260"/> <!-- Process Name & Icon -->
<ColumnDefinition Width="65"/> <!-- PID -->
<ColumnDefinition Width="95"/> <!-- CPU % with sparkline -->
<ColumnDefinition Width="140"/> <!-- Memory Private Bytes -->
<ColumnDefinition Width="105"/> <!-- Working Set -->
<ColumnDefinition Width="70"/> <!-- Handles -->
<ColumnDefinition Width="70"/> <!-- Threads -->
<ColumnDefinition Width="*"/> <!-- Description -->
</Grid.ColumnDefinitions>
<!-- Process Name & Icon -->
<StackPanel Orientation="Horizontal" Grid.Column="0" VerticalAlignment="Center">
<Image Source="{Binding Icon}" Width="15" Height="15" Margin="0,0,6,0" VerticalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality"/>
<TextBlock Text="{Binding ProcessName}" FontSize="12" FontWeight="Normal" Foreground="#E4E4E4" VerticalAlignment="Center"/>
</StackPanel>
<!-- PID -->
<TextBlock Grid.Column="1" Text="{Binding ProcessId}" FontSize="11.5" Foreground="#999999" HorizontalAlignment="Right" Margin="0,0,8,0" VerticalAlignment="Center"/>
<!-- CPU % with Teal Sparkline Curve matching screenshot -->
<Grid Grid.Column="2" HorizontalAlignment="Right" Margin="0,0,8,0" VerticalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"/>
<ColumnDefinition Width="38"/>
</Grid.ColumnDefinitions>
<Path Grid.Column="0" Data="{Binding CpuUsage, Converter={StaticResource CpuSparklineConverter}}" Stroke="#4DD0E1" StrokeThickness="1.2" Fill="Transparent" Width="36" Height="12" VerticalAlignment="Center" Opacity="0.8"/>
<TextBlock Grid.Column="1" Text="{Binding CpuUsage, StringFormat={}{0:F1}}" FontSize="11.5" Foreground="{Binding CpuUsage, Converter={StaticResource CpuColorConverter}}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
</Grid>
<!-- Memory Private Bytes -->
<TextBlock Grid.Column="3" Text="{Binding PrivateBytesDisplay}" FontSize="11.5" Foreground="#CCCCCC" HorizontalAlignment="Right" Margin="0,0,10,0" VerticalAlignment="Center"/>
<!-- Working Set -->
<TextBlock Grid.Column="4" Text="{Binding WorkingSetDisplay}" FontSize="11.5" Foreground="#B0B0B0" HorizontalAlignment="Right" Margin="0,0,10,0" VerticalAlignment="Center"/>
<!-- Handles -->
<TextBlock Grid.Column="5" Text="{Binding HandleCount}" FontSize="11.5" Foreground="#999999" HorizontalAlignment="Right" Margin="0,0,10,0" VerticalAlignment="Center"/>
<!-- Threads -->
<TextBlock Grid.Column="6" Text="{Binding ThreadCount}" FontSize="11.5" Foreground="#999999" HorizontalAlignment="Right" Margin="0,0,10,0" VerticalAlignment="Center"/>
<!-- Description -->
<TextBlock Grid.Column="7" Text="{Binding Description}" FontSize="11.5" Foreground="#858585" TextTrimming="CharacterEllipsis" Margin="10,0,0,0" VerticalAlignment="Center"/>
</Grid>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
</Grid>
<!-- 4. Sleek Separator Splitter -->
<GridSplitter Grid.Row="3" Height="4" HorizontalAlignment="Stretch" Background="#262626" Cursor="SizeNS"/>
<!-- 5. Lower Inspection Pane with Modern Floating Tabs -->
<TabControl Grid.Row="4" Background="#1C1C1C" BorderBrush="#252525" BorderThickness="0,1,0,0">
<!-- Loaded Modules -->
<TabItem Header="Loaded Modules" Style="{StaticResource LowerTabItemStyle}">
<DataGrid ItemsSource="{Binding Modules}" Margin="0">
<DataGrid.Columns>
<DataGridTextColumn Header="Module Name" Binding="{Binding Name}" Width="190"/>
<DataGridTextColumn Header="Base Address" Binding="{Binding BaseAddress}" Width="150"/>
<DataGridTextColumn Header="Path" Binding="{Binding FilePath}" Width="*"/>
<DataGridTextColumn Header="Version" Binding="{Binding Version}" Width="130"/>
<DataGridTextColumn Header="Size" Binding="{Binding SizeDisplay}" Width="90"/>
</DataGrid.Columns>
</DataGrid>
</TabItem>
<!-- Handles -->
<TabItem Header="Handles" Style="{StaticResource LowerTabItemStyle}">
<Grid Background="#1C1C1C">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Background="#202020" Padding="8,4" BorderBrush="#2A2A2A" BorderThickness="0,0,0,1">
<StackPanel Orientation="Horizontal">
<Button Content="Close Handle" Click="OnCloseHandle_Click" Style="{StaticResource HeaderActionButton}" Foreground="#FF6B6B" Margin="0,0,10,0"/>
<TextBlock Text="Caution: Closing system handles can cause process instability" Foreground="#707070" FontSize="11"/>
</StackPanel>
</Border>
<DataGrid Grid.Row="1" x:Name="HandlesGrid" ItemsSource="{Binding Handles}">
<DataGrid.Columns>
<DataGridTextColumn Header="Handle" Binding="{Binding HandleValue}" Width="90"/>
<DataGridTextColumn Header="Type" Binding="{Binding Type}" Width="130"/>
<DataGridTextColumn Header="Object Name" Binding="{Binding Name}" Width="*"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</TabItem>
<!-- Threads -->
<TabItem Header="Threads" Style="{StaticResource LowerTabItemStyle}">
<DataGrid ItemsSource="{Binding Threads}">
<DataGrid.Columns>
<DataGridTextColumn Header="Thread ID" Binding="{Binding ThreadId}" Width="100"/>
<DataGridTextColumn Header="State" Binding="{Binding State}" Width="120"/>
<DataGridTextColumn Header="Priority" Binding="{Binding Priority}" Width="90"/>
<DataGridTextColumn Header="Start Time" Binding="{Binding StartTime}" Width="150"/>
<DataGridTextColumn Header="CPU Time" Binding="{Binding CpuTime}" Width="120"/>
</DataGrid.Columns>
</DataGrid>
</TabItem>
<!-- Properties -->
<TabItem Header="Properties" Style="{StaticResource LowerTabItemStyle}">
<ScrollViewer Background="#1C1C1C" Padding="16">
<StackPanel DataContext="{Binding SelectedProcess}" MaxWidth="900" HorizontalAlignment="Left">
<TextBlock Text="Process Information" FontSize="14" FontWeight="SemiBold" Foreground="#FFFFFF" Margin="0,0,0,12"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="26"/>
<RowDefinition Height="26"/>
<RowDefinition Height="26"/>
<RowDefinition Height="26"/>
<RowDefinition Height="26"/>
<RowDefinition Height="26"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="Executable Path:" Foreground="#888888" FontSize="11.5"/>
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ExecutablePath, Mode=OneWay}" IsReadOnly="True" Background="Transparent" Foreground="#E0E0E0" BorderThickness="0" FontSize="11.5"/>
<TextBlock Grid.Row="1" Grid.Column="0" Text="Command Line:" Foreground="#888888" FontSize="11.5"/>
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding CommandLine, Mode=OneWay}" IsReadOnly="True" Background="Transparent" Foreground="#E0E0E0" BorderThickness="0" FontSize="11.5"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="Company:" Foreground="#888888" FontSize="11.5"/>
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding CompanyName}" Foreground="#E0E0E0" FontSize="11.5"/>
<TextBlock Grid.Row="3" Grid.Column="0" Text="Architecture:" Foreground="#888888" FontSize="11.5"/>
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding Architecture}" Foreground="#E0E0E0" FontSize="11.5"/>
<TextBlock Grid.Row="4" Grid.Column="0" Text="Start Time:" Foreground="#888888" FontSize="11.5"/>
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding StartTime}" Foreground="#E0E0E0" FontSize="11.5"/>
<TextBlock Grid.Row="5" Grid.Column="0" Text="Base Priority:" Foreground="#888888" FontSize="11.5"/>
<TextBlock Grid.Row="5" Grid.Column="1" Text="{Binding Priority}" Foreground="#E0E0E0" FontSize="11.5"/>
</Grid>
</StackPanel>
</ScrollViewer>
</TabItem>
</TabControl>
<!-- 6. Bottom Status Bar (matching dark theme) -->
<Border Grid.Row="5" Background="#161616" BorderBrush="#242424" BorderThickness="0,1,0,0" Padding="12,5">
<DockPanel LastChildFill="True">
<TextBlock DockPanel.Dock="Left" Text="{Binding StatusText}" Foreground="#757575" FontSize="11"/>
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock Text="CPU: " Foreground="#757575" FontSize="11"/>
<TextBlock Text="{Binding TotalCpuUsage, StringFormat={}{0:F1}%}" Foreground="#4DD0E1" FontWeight="SemiBold" FontSize="11" Margin="0,0,14,0"/>
<TextBlock Text="Processes: " Foreground="#757575" FontSize="11"/>
<TextBlock Text="{Binding TotalProcesses}" Foreground="#E0E0E0" FontWeight="SemiBold" FontSize="11" Margin="0,0,14,0"/>
<TextBlock Text="Threads: " Foreground="#757575" FontSize="11"/>
<TextBlock Text="{Binding TotalThreads}" Foreground="#E0E0E0" FontWeight="SemiBold" FontSize="11" Margin="0,0,14,0"/>
<TextBlock Text="Handles: " Foreground="#757575" FontSize="11"/>
<TextBlock Text="{Binding TotalHandles}" Foreground="#E0E0E0" FontWeight="SemiBold" FontSize="11"/>
</StackPanel>
</DockPanel>
</Border>
</Grid>
</Window>