010dee679f
Large changeset adding documentation, themes, converters and wiring between UI and services. Key changes: - Rewrote .gitignore to standardize build, IDE, OS and project-specific ignores. - Added comprehensive documentation: ADVANCED_CPU_FEATURES.md, API_REFERENCE.md, ARCHITECTURE_GUIDE.md, DEVELOPER_GUIDE.md, GAME_BOOST_VALIDATION.md, CLAUDE.md, PROJECT_STRUCTURE.md, UI_STYLE_GUIDE.md, TRADEMARK.md. - Added theme resources (Themes/FluentLight.xaml, Themes/FluentDark.xaml) and merged FluentLight into App.xaml resource dictionary. - Added NullToBoolConverter and registered it in App.xaml. - Enabled a DEBUG-only console test mode in App.xaml.cs (--test flag) and guarded AllocConsole with #if DEBUG. - Added new service/support files (AtomicFileWriter, StoragePaths, ThemeService) and numerous updates across Services (CpuTopologyService, CoreMaskService, PowerPlanService, ProcessMonitorManagerService, ProcessService, NotificationService, SystemTrayService, SystemTweaksService, EnhancedLoggingService, etc.). - Updated many ViewModels and Views to support new functionality (CPU topology, power plan and game-boost features) and tests (Tests/TestRunner.cs). - Added build-release.ps1 and various project metadata updates. Overall this commit introduces documentation, theming, new converters and test/debug support, plus extensive service and UI wiring for CPU topology, process monitoring, power plans and game boost features.
197 lines
9.4 KiB
XML
197 lines
9.4 KiB
XML
<Window x:Class="ThreadPilot.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:ThreadPilot"
|
|
xmlns:views="clr-namespace:ThreadPilot.Views"
|
|
xmlns:viewModels="clr-namespace:ThreadPilot.ViewModels"
|
|
mc:Ignorable="d"
|
|
Title="ThreadPilot - Process & Power Plan Manager"
|
|
Height="720"
|
|
Width="1280"
|
|
WindowStartupLocation="CenterScreen">
|
|
|
|
<Window.Resources>
|
|
<Style TargetType="GroupBox">
|
|
<Setter Property="Background" Value="{DynamicResource SurfaceBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
</Style>
|
|
|
|
<Style TargetType="TabControl">
|
|
<Setter Property="Background" Value="{DynamicResource AppBackgroundBrush}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
|
</Style>
|
|
|
|
<Style TargetType="StatusBar">
|
|
<Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
</Style>
|
|
|
|
<!-- Loading Spinner Animation -->
|
|
<Storyboard x:Key="SpinnerAnimation" RepeatBehavior="Forever">
|
|
<DoubleAnimation Storyboard.TargetName="SpinnerRotation"
|
|
Storyboard.TargetProperty="Angle"
|
|
From="0" To="360" Duration="0:0:1"/>
|
|
</Storyboard>
|
|
|
|
<!-- Fade In Animation -->
|
|
<Storyboard x:Key="FadeInAnimation">
|
|
<DoubleAnimation Storyboard.TargetName="LoadingOverlay"
|
|
Storyboard.TargetProperty="Opacity"
|
|
From="0" To="1" Duration="0:0:0.2"/>
|
|
</Storyboard>
|
|
|
|
<!-- Fade Out Animation -->
|
|
<Storyboard x:Key="FadeOutAnimation">
|
|
<DoubleAnimation Storyboard.TargetName="LoadingOverlay"
|
|
Storyboard.TargetProperty="Opacity"
|
|
From="1" To="0" Duration="0:0:0.3"/>
|
|
</Storyboard>
|
|
</Window.Resources>
|
|
|
|
<Grid Background="{DynamicResource AppBackgroundBrush}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Elevation Status Bar -->
|
|
<Border Grid.Row="0" Background="{DynamicResource WarningBackgroundBrush}" BorderBrush="{DynamicResource WarningBorderBrush}" BorderThickness="1"
|
|
Visibility="{Binding ShowElevationPrompt, Converter={StaticResource BoolToVisibilityConverter}}"
|
|
Margin="5,5,5,0">
|
|
<Grid Margin="10,5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Grid.Column="0" Text="⚠️" FontSize="16" VerticalAlignment="Center" Margin="0,0,10,0"/>
|
|
<TextBlock Grid.Column="1"
|
|
Text="ThreadPilot is running with limited privileges. Some features may not be available. Administrator privileges are required for full functionality."
|
|
TextWrapping="Wrap" VerticalAlignment="Center"/>
|
|
<Button Grid.Column="2" Content="Request Elevation"
|
|
Command="{Binding RequestElevationCommand}"
|
|
Margin="10,0,0,0" Padding="10,5"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Main Application Content -->
|
|
<Grid x:Name="MainContent" Grid.Row="2">
|
|
<TabControl x:Name="MainTabControl" Margin="10" SelectionChanged="OnMainTabSelectionChanged">
|
|
<TabItem x:Name="ProcessManagementTab" Header="🔧 Process Management">
|
|
<views:ProcessView/>
|
|
</TabItem>
|
|
<TabItem x:Name="CoreMasksTab" Header="🎯 Core Masks">
|
|
<views:MasksView/>
|
|
</TabItem>
|
|
<TabItem x:Name="PowerPlansTab" Header="⚡ Power Plans">
|
|
<views:PowerPlanView x:Name="PowerPlanViewControl"/>
|
|
</TabItem>
|
|
<TabItem x:Name="ProcessAssociationsTab" Header="📐 Rules">
|
|
<views:ProcessPowerPlanAssociationView x:Name="AssociationView"/>
|
|
</TabItem>
|
|
<TabItem x:Name="PerformanceTab" Header="📊 Performance">
|
|
<views:PerformanceView x:Name="PerformanceViewControl"/>
|
|
</TabItem>
|
|
<TabItem x:Name="SystemTweaksTab" Header="🔧 Tweaks">
|
|
<views:SystemTweaksView x:Name="SystemTweaksView"/>
|
|
</TabItem>
|
|
<TabItem x:Name="SettingsTab">
|
|
<TabItem.Header>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="" FontFamily="Segoe Fluent Icons, Segoe MDL2 Assets, Segoe UI Symbol, Segoe UI" Margin="0,0,6,0"/>
|
|
<TextBlock Text="Settings"/>
|
|
</StackPanel>
|
|
</TabItem.Header>
|
|
<views:SettingsView x:Name="SettingsView"/>
|
|
</TabItem>
|
|
</TabControl>
|
|
</Grid>
|
|
|
|
<!-- Status Bar -->
|
|
<StatusBar Grid.Row="3" Height="25">
|
|
<StatusBarItem>
|
|
<TextBlock Text="{Binding StatusMessage}"/>
|
|
</StatusBarItem>
|
|
<Separator/>
|
|
<StatusBarItem>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding ElevationStatusText}"
|
|
FontWeight="{Binding IsRunningAsAdministrator, Converter={StaticResource BoolToFontWeightConverter}}"
|
|
Foreground="{Binding IsRunningAsAdministrator, Converter={StaticResource BoolToColorConverter}}"/>
|
|
<TextBlock Text="🔒"
|
|
Margin="5,0,0,0"
|
|
Visibility="{Binding IsRunningAsAdministrator, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
|
</StackPanel>
|
|
</StatusBarItem>
|
|
</StatusBar>
|
|
|
|
<!-- Startup Loading Overlay -->
|
|
<Grid x:Name="LoadingOverlay"
|
|
Grid.RowSpan="4"
|
|
Background="{DynamicResource OverlayBrush}"
|
|
Visibility="Visible"
|
|
Panel.ZIndex="1000">
|
|
<Border Background="{DynamicResource SurfaceBrush}"
|
|
BorderBrush="{DynamicResource BorderBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="8"
|
|
Padding="30"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
MinWidth="300"
|
|
MaxWidth="400">
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<!-- Application Icon -->
|
|
<Image x:Name="LoadingIcon"
|
|
Source="pack://application:,,,/ico.ico"
|
|
Width="64"
|
|
Height="64"
|
|
Margin="0,0,0,20"
|
|
HorizontalAlignment="Center"/>
|
|
|
|
<!-- Loading Spinner -->
|
|
<Grid Width="32" Height="32" Margin="0,0,0,20" HorizontalAlignment="Center">
|
|
<Ellipse Width="32" Height="32"
|
|
Stroke="{DynamicResource SpinnerTrackBrush}"
|
|
StrokeThickness="3"
|
|
Opacity="0.3"/>
|
|
<Ellipse x:Name="SpinnerEllipse"
|
|
Width="32"
|
|
Height="32"
|
|
Stroke="{DynamicResource AccentBrush}"
|
|
StrokeThickness="3"
|
|
StrokeDashArray="20,10"
|
|
RenderTransformOrigin="0.5,0.5">
|
|
<Ellipse.RenderTransform>
|
|
<RotateTransform x:Name="SpinnerRotation"/>
|
|
</Ellipse.RenderTransform>
|
|
</Ellipse>
|
|
</Grid>
|
|
|
|
<!-- Loading Text -->
|
|
<TextBlock x:Name="LoadingText"
|
|
Text="Loading ThreadPilot..."
|
|
FontSize="16"
|
|
FontWeight="SemiBold"
|
|
HorizontalAlignment="Center"
|
|
Margin="0,0,0,10"/>
|
|
|
|
<!-- Status Text -->
|
|
<TextBlock x:Name="LoadingStatus"
|
|
Text="Initializing services..."
|
|
FontSize="12"
|
|
Foreground="{DynamicResource TextSecondaryBrush}"
|
|
HorizontalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|