e3530e5342
Introduces new models, services, and view models for process monitoring, power plan association, application settings, and enhanced logging. Updates main application files and views to support new features. Adds developer and architecture documentation.
110 lines
4.6 KiB
XML
110 lines
4.6 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="Gray"
|
|
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="Gray"
|
|
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> |