Files
ThreadPilot/Views/PowerPlanView.xaml
T
PrimeBuild-pc 010dee679f Add docs, themes, services and UI updates
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.
2026-04-10 03:58:51 +02:00

111 lines
4.7 KiB
XML

<UserControl x:Class="ThreadPilot.Views.PowerPlanView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ThreadPilot.Views"
xmlns:helpers="clr-namespace:ThreadPilot.Helpers"
mc:Ignorable="d"
d:DesignHeight="650" d:DesignWidth="1200">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- System Power Plans -->
<GroupBox Grid.Row="0" Grid.RowSpan="2" Grid.Column="0"
Header="⚡ Available Power Plans"
Margin="0,0,5,0">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button Grid.Row="0"
Command="{Binding LoadPowerPlansCommand}"
Content="🔄 Refresh Plans"
HorizontalAlignment="Right"
Padding="10,5"
Margin="0,0,0,10"
ToolTip="Refresh the list of available power plans"/>
<ListView Grid.Row="1"
ItemsSource="{Binding PowerPlans}"
SelectedItem="{Binding SelectedPowerPlan}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Margin="5">
<TextBlock Text="{Binding Name}"
FontWeight="{Binding IsActive, Converter={StaticResource BoolToFontWeightConverter}}"/>
<TextBlock Text="{Binding Guid}"
Foreground="{DynamicResource TextSecondaryBrush}"
FontSize="11"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</GroupBox>
<!-- Custom Power Plans -->
<GroupBox Grid.Row="0" Grid.RowSpan="2" Grid.Column="1"
Header="Custom Power Plans"
Margin="5,0,0,0">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0"
Text="Available custom power plans:"
Margin="0,0,0,10"/>
<ListView Grid.Row="1"
ItemsSource="{Binding CustomPowerPlans}"
SelectedItem="{Binding SelectedCustomPlan}">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Margin="5">
<TextBlock Text="{Binding Name}"/>
<TextBlock Text="{Binding FilePath}"
Foreground="{DynamicResource TextSecondaryBrush}"
FontSize="11"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</GroupBox>
<!-- Action Buttons -->
<StackPanel Grid.Row="2" Grid.Column="0"
Orientation="Horizontal"
Margin="0,10,5,0">
<Button Command="{Binding SetActivePlanCommand}"
Content="Set Active"
Padding="20,5"
Margin="0,0,10,0"
ToolTip="Activate the selected power plan"/>
</StackPanel>
<StackPanel Grid.Row="2" Grid.Column="1"
Orientation="Horizontal"
Margin="5,10,0,0">
<Button Command="{Binding ImportCustomPlanCommand}"
Content="Import Custom Plan"
Padding="20,5"
ToolTip="Import a custom power plan from file"/>
</StackPanel>
</Grid>
</UserControl>