9a4baba19a
* feat: back up persistent rules and resolve rule precedence deterministically
- Configuration export now includes persistent process rules (schema 3.0),
stays compatible with 2.0 bundles, validates before writing, previews
what an import replaces and rolls back on failure.
- Matching rules apply broad-to-specific (name, wildcard path, exact path,
then most recently edited), shared by the engine and the process summary,
which now lists the apply order and flags conflicting values.
- Localized the new strings in all seven languages.
* feat: clearer process and rule editors
- Process details: CPU, memory and I/O priority pickers with an explicit
Apply, undo of the last manual priority change (guarded against reused
PIDs), adaptive side/bottom details panel.
- Manual process control stays available while automation is paused, with
a persistent notice instead of an overlay.
- Saved-rule editor stages all edits (including the core mask) and saves
them together, showing pending changes.
- Localized the new strings in all seven languages.
* fix: one save path for a saved rule's cores
The rules editor's core mask went through a new update path that reported
success without saving when no affinity payload was built, and kept a
legacy mask next to a CPU selection. Merge it with the old single-purpose
method (now unused), keep its checks, and localize the undo message.
* feat: per-process efficiency mode (EcoQoS) for live processes and rules
Closes #66.
- Native: SetProcessInformation/GetProcessInformation with
ProcessPowerThrottling (EXECUTION_SPEED), three states: Windows decides,
On (EcoQoS), Off (never throttle / HighQoS).
- Process tab: context menu entries, a picker with Apply in the details
panel, current state in the summary, undo of the last change, included
when saving current settings as a rule (only if explicitly set).
- Rules: EfficiencyMode + ApplyEfficiencyModeOnStart, applied by the rules
engine, editable in the saved-rule editor, validated on import and part
of conflict detection.
- The summary flags when the global Power Throttling tweak voids it. CPU
priority is left alone, unlike Task Manager's efficiency mode.
- Localized in all seven languages.
* chore: keep CRLF line endings in SelectedProcessSummaryViewModel
* feat: clearer navigation, process page and rules editor
- Navigation pane open with short labels instead of seven bare icons.
- Processes: one toolbar row (search with placeholder, Filters and
Columns menus, sort, refresh); details split into Process, Priority,
CPU cores and Rule cards; pickers start from the process's current
values and stay empty when a value cannot be read; help paragraphs
moved into tooltips; core picker always visible.
- Rules: process rules first, clearer tab names, localized choices in the
saved-rule editor instead of internal enum names.
- Shorter page titles and subtitles in all seven languages; removed the
strings this made unused.
No data format changes.
* feat: settings and tweaks as Windows 11 rows, localized rule list
- Settings: one column of rows (what it is on the left, its switch on the
right), most used sections first, Save as the primary action.
- Tweaks: one tweak per row with its status dot and switch.
- Rule list: 'Applies' and 'Mode' columns use the same localized labels as
the editor and refresh on language change.
- Removed 76 strings no code referenced, from all seven languages.
* fix: issues found testing the beta in a clean Windows 11 VM
- Process counter could show more visible processes than the total
('157 / 151'): the batch total was a snapshot from the first load.
- Narrow windows (or 150% scaling): toolbar buttons move under the search
box instead of squeezing it to a few letters.
- Rules list keeps the 'Applies' column readable when narrow.
- Settings status message gets its own line instead of being cut.
Tested in a Hyper-V Windows 11 VM: clean install, upgrade, uninstall,
light and dark theme, 100% and 150% scaling.
* feat: remember layout choices; Windows 11 toggles in Tweaks
- The navigation pane, window size/position/maximized state, and the
process list filters, sort and columns now survive a restart. They live
in ui-state.json, apart from settings.json, so they never mark the
Settings page as unsaved or travel in exported configurations. A corrupt
file falls back to defaults; tests write to a temp file.
- Fixes the pane re-opening on every start (it was hard-coded open).
- Tweaks use a native-looking Windows 11 switch (40x20 track, sliding
thumb) with On/Off written beside it.
- New test: every on/off setting survives save and reload.
* docs: handoff for the 1.7.7 PR stack and beta test
* fix: P/E cores from the highest EfficiencyClass, AMD CCDs from real L3 groups
The legacy topology treated the lowest EfficiencyClass as the performance
core, swapping P- and E-cores on hybrid Intel CPUs. AMD CCDs were guessed
as 8 cores each, which split 6+6 parts (7900X3D, 9900X3D) into 8+4; they now
come from the L3 groups Windows reports, with the guess kept only as a
fallback. The topology snapshot also keeps each L3 group's size.
* feat: Game Boost, CPU Sets for the game and selected background apps
While a detected game runs, Game Boost sets process default CPU Sets from
the CPU topology: on AMD X3D with one larger L3 the game goes to the V-Cache
CCD, on Intel hybrid CPUs to the P-cores, and selected background apps
(browsers, sync clients, updaters, launchers) to the other cores. On dual-CCD
parts with equal L3 only the background moves, unless Isolation mode also
keeps the game on CCD0. Single-L3 and unreadable topologies are left to
Windows. Above Normal priority for the game is optional; never High.
Each change is written to a journal before it is made and undone when the
game exits, Game Boost is turned off or ThreadPilot closes, and on the next
start after a crash. Only values still exactly as Game Boost set them are
restored, never one a user rule or a manual change has taken over since.
Persistent rules and Game Boost share one apply gate, and a rule always
wins over Game Boost for the setting it covers.
The switch, mode and lists are on the Tweaks page, off by default, and take
effect without a restart.
* fix: Game Boost background entries with a full path never matched
The background list compared full-path entries against an empty path, so
only bare process names worked. Found by a new integration test that runs
the real services on two copies of PING.EXE: CPU Sets and priority are set
and read back through Windows, removed when Game Boost is turned off, and
undone from the journal after a simulated crash. The topology is simulated
from this machine's CPU Set IDs, so the test also runs on CPUs where Game
Boost would not act; it skips itself below 8 cores.
* feat: report Game Boost sessions and restore results in Activity
* test: diagnose EcoQoS read failures on Windows Server
* chore: prepare 1.7.7-beta.2 and keep prereleases out of stable channels
* test: use native full-query access mask in EcoQoS diagnostic
* docs: update beta handoff and prerelease publication policy
* ci: run native EcoQoS tests on a Windows 11-era kernel
Windows Server 2022 build 20348 rejects GetProcessInformation(ProcessPowerThrottling) with ERROR_INVALID_PARAMETER (87), with both limited and full query handles. Windows 11 local tests pass. Use Server 2025 for CI/release tests and smoke testing; keep the real round-trip assertions, remove temporary probes.
* test: lock beta publication and native runner contracts
* chore: separate stable 1.7.7 from experimental Game Boost
Stable retains the validated EcoQoS/rules/UI stack. Preserve the complete local Game Boost implementation at ef2ec24 for the separate 1.7.8-beta.1 prerelease; no experimental Game Boost/topology changes ship in stable. Keep channel-aware publication and Windows 11-era native CI tests.
725 lines
60 KiB
XML
725 lines
60 KiB
XML
<UserControl x:Class="ThreadPilot.Views.ProcessView"
|
|
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:converters="clr-namespace:ThreadPilot.Converters"
|
|
xmlns:sysdiag="clr-namespace:System.Diagnostics;assembly=System.Diagnostics.Process"
|
|
xmlns:models="clr-namespace:ThreadPilot.Models"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
|
mc:Ignorable="d"
|
|
KeyboardNavigation.TabNavigation="Cycle"
|
|
KeyboardNavigation.ControlTabNavigation="Cycle"
|
|
d:DesignHeight="650" d:DesignWidth="1200">
|
|
|
|
<UserControl.Resources>
|
|
<converters:CoreTypeToColorConverter x:Key="CoreTypeToColorConverter"/>
|
|
<converters:BoolToColorConverter x:Key="BoolToColorConverter"/>
|
|
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
|
|
<converters:InverseBoolToVisibilityConverter x:Key="InverseBoolToVisibilityConverter"/>
|
|
<converters:NullToBoolConverter x:Key="NullToBoolConverter"/>
|
|
<converters:AffinityMaskConverter x:Key="AffinityMaskConverter"/>
|
|
<converters:BytesToMbConverter x:Key="BytesToMbConverter"/>
|
|
<sys:Double x:Key="ProcessFontLarge">24</sys:Double>
|
|
<sys:Double x:Key="ProcessFontMedium">14</sys:Double>
|
|
<sys:Double x:Key="ProcessFontMediumSmall">14</sys:Double>
|
|
<sys:Double x:Key="ProcessFontSmall">13</sys:Double>
|
|
<Style x:Key="ProcessContextMenuItemStyle" TargetType="{x:Type MenuItem}" BasedOn="{x:Null}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
<Setter Property="FontWeight" Value="Normal"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource BodyFontSize}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<Setter Property="Padding" Value="12,7"/>
|
|
<Setter Property="MinWidth" Value="220"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type MenuItem}">
|
|
<Border x:Name="MenuItemRoot"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="0"
|
|
SnapsToDevicePixels="True">
|
|
<Grid MinWidth="{TemplateBinding MinWidth}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ContentPresenter Grid.Column="0"
|
|
Margin="{TemplateBinding Padding}"
|
|
ContentSource="Header"
|
|
RecognizesAccessKey="True"
|
|
VerticalAlignment="Center"
|
|
TextElement.Foreground="{TemplateBinding Foreground}"
|
|
TextElement.FontSize="{TemplateBinding FontSize}"
|
|
TextElement.FontWeight="{TemplateBinding FontWeight}"/>
|
|
|
|
<Path x:Name="SubmenuArrow"
|
|
Grid.Column="1"
|
|
Width="6"
|
|
Height="10"
|
|
Margin="8,0,12,0"
|
|
Data="M 0 0 L 6 5 L 0 10 Z"
|
|
Fill="{DynamicResource TextSecondaryBrush}"
|
|
Stretch="Fill"
|
|
VerticalAlignment="Center"
|
|
Visibility="Collapsed"/>
|
|
|
|
<Popup x:Name="PART_Popup"
|
|
AllowsTransparency="True"
|
|
Focusable="False"
|
|
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Placement="Right"
|
|
PopupAnimation="Fade">
|
|
<Border Background="{DynamicResource CardSurfaceBrush}"
|
|
BorderBrush="{DynamicResource BorderSubtleBrush}"
|
|
BorderThickness="1"
|
|
Padding="4"
|
|
SnapsToDevicePixels="True">
|
|
<ScrollViewer CanContentScroll="True"
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
VerticalScrollBarVisibility="Auto">
|
|
<ItemsPresenter KeyboardNavigation.DirectionalNavigation="Cycle"
|
|
KeyboardNavigation.TabNavigation="Cycle"/>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Popup>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="HasItems" Value="True">
|
|
<Setter TargetName="SubmenuArrow" Property="Visibility" Value="Visible"/>
|
|
</Trigger>
|
|
<Trigger Property="IsHighlighted" Value="True">
|
|
<Setter TargetName="MenuItemRoot" Property="Background" Value="{DynamicResource QuietRowHoverBackgroundBrush}"/>
|
|
<Setter TargetName="SubmenuArrow" Property="Fill" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsSubmenuOpen" Value="True">
|
|
<Setter TargetName="MenuItemRoot" Property="Background" Value="{DynamicResource QuietRowHoverBackgroundBrush}"/>
|
|
<Setter TargetName="SubmenuArrow" Property="Fill" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Foreground" Value="{DynamicResource TextDisabledBrush}"/>
|
|
<Setter TargetName="SubmenuArrow" Property="Fill" Value="{DynamicResource TextDisabledBrush}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ProcessContextMenuSeparatorStyle" TargetType="{x:Type Separator}" BasedOn="{x:Null}">
|
|
<Setter Property="Background" Value="{DynamicResource BorderSubtleBrush}"/>
|
|
<Setter Property="Margin" Value="8,4"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Separator}">
|
|
<Border Height="1"
|
|
Background="{TemplateBinding Background}"
|
|
SnapsToDevicePixels="True"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ProcessContextMenuStyle" TargetType="{x:Type ContextMenu}" BasedOn="{x:Null}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
<Setter Property="FontWeight" Value="Normal"/>
|
|
<Setter Property="FontSize" Value="{DynamicResource BodyFontSize}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
|
|
<Setter Property="Background" Value="{DynamicResource CardSurfaceBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderSubtleBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="4"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ContextMenu}">
|
|
<Border Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
SnapsToDevicePixels="True">
|
|
<ItemsPresenter KeyboardNavigation.DirectionalNavigation="Cycle"
|
|
KeyboardNavigation.TabNavigation="Cycle"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ProcessDetailCardStyle" TargetType="Border">
|
|
<Setter Property="Background" Value="{DynamicResource CardSurfaceBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderSubtleBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="CornerRadius" Value="8"/>
|
|
<Setter Property="Padding" Value="12"/>
|
|
<Setter Property="Margin" Value="0,0,0,10"/>
|
|
</Style>
|
|
<Style x:Key="ProcessDetailHeaderStyle" TargetType="TextBlock">
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Margin" Value="0,0,0,8"/>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
|
|
<Grid Margin="10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Row="0" Margin="0,0,0,12">
|
|
<TextBlock Text="{DynamicResource ProcessView_Title}" Style="{StaticResource PageTitleTextStyle}"/>
|
|
<TextBlock Text="{DynamicResource ProcessView_AutomationPaused}" TextWrapping="Wrap" Margin="0,6,0,0"
|
|
Foreground="{DynamicResource WarningTextBrush}"
|
|
Visibility="{Binding IsAutomationMonitoringEnabled, Converter={StaticResource InverseBoolToVisibilityConverter}}"/>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="1">
|
|
|
|
<Grid x:Name="ProcessWorkspace" SizeChanged="ProcessWorkspace_SizeChanged">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition x:Name="DetailColumn" Width="0"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- One toolbar row: search, then filters and columns tucked into menus. -->
|
|
<Grid Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,0,12">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<ui:TextBox Grid.Column="0"
|
|
Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}"
|
|
PlaceholderText="{DynamicResource ProcessView_SearchPlaceholder}"
|
|
Icon="{ui:SymbolIcon Search24}"
|
|
AutomationProperties.Name="{DynamicResource ProcessView_SearchAutomationName}"/>
|
|
<StackPanel x:Name="ToolbarActions" Grid.Column="1" Orientation="Horizontal">
|
|
<ui:DropDownButton Margin="8,0,0,0"
|
|
Icon="{ui:SymbolIcon Filter24}"
|
|
Content="{DynamicResource ProcessView_Filters}">
|
|
<ui:DropDownButton.Flyout>
|
|
<ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
|
|
<MenuItem Header="{DynamicResource ProcessView_ActiveAppsOnly}" IsCheckable="True" StaysOpenOnClick="True"
|
|
IsChecked="{Binding ShowActiveApplicationsOnly}" ToolTip="{DynamicResource ProcessView_VisibleWindowsOnly}"/>
|
|
<MenuItem Header="{DynamicResource ProcessView_HideSystemShort}" IsCheckable="True" StaysOpenOnClick="True"
|
|
IsChecked="{Binding HideSystemProcesses}" ToolTip="{DynamicResource ProcessView_HideSystem}"/>
|
|
<MenuItem Header="{DynamicResource ProcessView_HideIdle}" IsCheckable="True" StaysOpenOnClick="True"
|
|
IsChecked="{Binding HideIdleProcesses}" ToolTip="{DynamicResource ProcessView_HideLowCpu}"/>
|
|
<Separator/>
|
|
<MenuItem Header="{DynamicResource ProcessView_LockList}" IsCheckable="True" StaysOpenOnClick="True"
|
|
IsChecked="{Binding IsProcessListLocked}" ToolTip="{DynamicResource ProcessView_LockListTooltip}"/>
|
|
</ContextMenu>
|
|
</ui:DropDownButton.Flyout>
|
|
</ui:DropDownButton>
|
|
<ui:DropDownButton Margin="8,0,0,0"
|
|
Icon="{ui:SymbolIcon TableSettings24}"
|
|
Content="{DynamicResource ProcessView_Columns}">
|
|
<ui:DropDownButton.Flyout>
|
|
<ContextMenu>
|
|
<MenuItem x:Name="ShowPidColumn" Header="{DynamicResource ProcessView_ID}" IsCheckable="True" StaysOpenOnClick="True" IsChecked="True"/>
|
|
<MenuItem x:Name="ShowWindowColumn" Header="{DynamicResource ProcessView_ColWindowTitle}" IsCheckable="True" StaysOpenOnClick="True"/>
|
|
<MenuItem x:Name="ShowHasWindowColumn" Header="{DynamicResource ProcessView_HasWindow}" IsCheckable="True" StaysOpenOnClick="True"/>
|
|
</ContextMenu>
|
|
</ui:DropDownButton.Flyout>
|
|
</ui:DropDownButton>
|
|
<ComboBox Margin="8,0,0,0" MinWidth="140"
|
|
SelectedValue="{Binding SortMode}"
|
|
SelectedValuePath="Tag"
|
|
ToolTip="{DynamicResource ProcessView_SortByTooltip}"
|
|
AutomationProperties.Name="{DynamicResource ProcessView_SortBy}">
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_ColCpuUsage}" Tag="CpuUsage"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_ColMemory}" Tag="MemoryUsage"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_ColProcessName}" Tag="Name"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_ID}" Tag="ProcessId"/>
|
|
</ComboBox>
|
|
<ui:Button Margin="8,0,0,0"
|
|
Command="{Binding LoadProcessesCommand}"
|
|
Icon="{ui:SymbolIcon ArrowClockwise24}"
|
|
ToolTip="{DynamicResource ProcessView_RefreshTooltip}"
|
|
AutomationProperties.Name="{DynamicResource ProcessView_RefreshAutomationName}"/>
|
|
<Button Margin="8,0,0,0"
|
|
Command="{Binding LoadMoreProcessesCommand}"
|
|
Content="{DynamicResource ProcessView_LoadMore}"
|
|
Visibility="{Binding HasMoreBatches, Converter={StaticResource BoolToVisibilityConverter}}"
|
|
ToolTip="{DynamicResource ProcessView_LoadMoreTooltip}"
|
|
AutomationProperties.Name="{DynamicResource ProcessView_LoadMoreAutomationName}"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
|
|
<Grid Grid.Row="1">
|
|
<DataGrid x:Name="ProcessList" ItemsSource="{Binding FilteredProcesses}"
|
|
SelectedItem="{Binding SelectedProcess}"
|
|
AutoGenerateColumns="False"
|
|
IsReadOnly="True"
|
|
SelectionMode="Single"
|
|
GridLinesVisibility="Horizontal"
|
|
HeadersVisibility="Column"
|
|
CanUserResizeColumns="True"
|
|
CanUserSortColumns="True"
|
|
VirtualizingPanel.IsVirtualizing="True"
|
|
VirtualizingPanel.VirtualizationMode="Recycling"
|
|
VirtualizingPanel.ScrollUnit="Item"
|
|
EnableRowVirtualization="True"
|
|
EnableColumnVirtualization="True"
|
|
ScrollViewer.CanContentScroll="True"
|
|
AutomationProperties.Name="{DynamicResource ProcessView_RunningListAutomationName}"
|
|
AutomationProperties.HelpText="{DynamicResource ProcessView_RunningListAutomationHelp}">
|
|
<DataGrid.RowStyle>
|
|
<Style TargetType="DataGridRow">
|
|
<Setter Property="Tag" Value="{Binding DataContext, RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<Setter Property="BorderThickness" Value="3,0,0,0"/>
|
|
<EventSetter Event="PreviewMouseRightButtonDown" Handler="ProcessRow_PreviewMouseRightButtonDown"/>
|
|
<Setter Property="ContextMenu">
|
|
<Setter.Value>
|
|
<ContextMenu Style="{StaticResource ProcessContextMenuStyle}"
|
|
DataContext="{Binding PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_ApplyAffinity}"
|
|
Command="{Binding ApplyContextAffinityCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_ClearCpuSets}"
|
|
Command="{Binding ClearContextCpuSetsCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<Separator Style="{StaticResource ProcessContextMenuSeparatorStyle}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_Rules}">
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_SaveCurrentRule}"
|
|
ToolTip="{DynamicResource ProcessView_SaveRuleTooltip}"
|
|
Command="{Binding SaveCurrentSettingsAsRuleCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_ApplyAffinitySaveRule}"
|
|
ToolTip="{DynamicResource ProcessView_SaveRuleTooltip}"
|
|
Command="{Binding ApplyAffinityAndSaveAsRuleCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<Separator Style="{StaticResource ProcessContextMenuSeparatorStyle}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_DeleteSavedRule}"
|
|
ToolTip="{DynamicResource ProcessView_DeleteSavedRuleTooltip}"
|
|
Command="{Binding DeleteSavedRuleCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
</MenuItem>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_SetIoPriority}">
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityVeryLow}"
|
|
Command="{Binding SetContextIoPriorityVeryLowCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityLow}"
|
|
Command="{Binding SetContextIoPriorityLowCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityNormal}"
|
|
Command="{Binding SetContextIoPriorityNormalCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityHigh}"
|
|
Command="{Binding SetContextIoPriorityHighCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
</MenuItem>
|
|
<Separator Style="{StaticResource ProcessContextMenuSeparatorStyle}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_SetCpuPriority}">
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityBelowNormal}"
|
|
Command="{Binding SetContextBelowNormalPriorityCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityNormal}"
|
|
Command="{Binding SetContextNormalPriorityCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityAboveNormal}"
|
|
Command="{Binding SetContextAboveNormalPriorityCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityHigh}"
|
|
Command="{Binding SetContextHighPriorityCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_RealtimeBlocked}"
|
|
IsEnabled="False"
|
|
ToolTipService.ShowOnDisabled="True"
|
|
ToolTip="{DynamicResource ProcessView_RealtimeBlockedHelp}"/>
|
|
</MenuItem>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_SetMemoryPriority}">
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityVeryLow}"
|
|
Command="{Binding SetContextMemoryPriorityVeryLowCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityLow}"
|
|
Command="{Binding SetContextMemoryPriorityLowCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityMedium}"
|
|
Command="{Binding SetContextMemoryPriorityMediumCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityBelowNormal}"
|
|
Command="{Binding SetContextMemoryPriorityBelowNormalCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_PriorityNormal}"
|
|
Command="{Binding SetContextMemoryPriorityNormalCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
</MenuItem>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_SetEfficiencyMode}"
|
|
ToolTip="{DynamicResource ProcessView_EfficiencyModeTooltip}">
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource EfficiencyMode_On}"
|
|
Command="{Binding SetContextEfficiencyOnCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource EfficiencyMode_Off}"
|
|
Command="{Binding SetContextEfficiencyOffCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource EfficiencyMode_SystemManaged}"
|
|
Command="{Binding SetContextEfficiencySystemManagedCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
</MenuItem>
|
|
<Separator Style="{StaticResource ProcessContextMenuSeparatorStyle}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_OpenLocation}"
|
|
Command="{Binding OpenContextExecutableLocationCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_CopyProcessInfo}"
|
|
Command="{Binding CopyContextProcessInfoCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
<MenuItem Style="{StaticResource ProcessContextMenuItemStyle}"
|
|
Header="{DynamicResource ProcessView_RefreshInfo}"
|
|
Command="{Binding RefreshContextProcessInfoCommand}"
|
|
CommandParameter="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource AncestorType=ContextMenu}}"/>
|
|
</ContextMenu>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource QuietRowHoverBackgroundBrush}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource SoftSelectionBackgroundBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SoftSelectionBorderBrush}"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="True"/>
|
|
<Condition Property="IsKeyboardFocusWithin" Value="True"/>
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource SoftSelectionBorderBrush}"/>
|
|
</MultiTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.RowStyle>
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="{DynamicResource ProcessView_Name}" Binding="{Binding Name}" Width="160"/>
|
|
<DataGridTextColumn Header="{DynamicResource ProcessView_ID}" Binding="{Binding ProcessId}" Width="70" Visibility="{Binding IsChecked, Source={x:Reference ShowPidColumn}, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
|
<DataGridTextColumn Header="{DynamicResource ProcessView_ColWindowTitle}" Binding="{Binding MainWindowTitle}" Width="220" Visibility="{Binding IsChecked, Source={x:Reference ShowWindowColumn}, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
|
<DataGridCheckBoxColumn Header="{DynamicResource ProcessView_HasWindow}" Binding="{Binding HasVisibleWindow}" Width="90" Visibility="{Binding IsChecked, Source={x:Reference ShowHasWindowColumn}, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
|
<DataGridTextColumn Header="{DynamicResource ProcessView_ColCpuUsage}" Binding="{Binding CpuUsage, StringFormat={}{0:N1}%}" Width="90"/>
|
|
<DataGridTextColumn Header="{DynamicResource ProcessView_MemoryMb}" Width="110"
|
|
Binding="{Binding MemoryUsage, Converter={StaticResource BytesToMbConverter}}"/>
|
|
<DataGridTextColumn Header="{DynamicResource ProcessView_Priority}" Binding="{Binding Priority}" Width="*"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
|
|
<Border Background="{DynamicResource OverlayBrush}" Visibility="{Binding IsBusy, Converter={StaticResource BoolToVisibilityConverter}}">
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
<ProgressBar Value="{Binding LoadingProgress}" Maximum="100" Width="200" Height="20" Margin="0,0,0,10"/>
|
|
<TextBlock Text="{Binding LoadingStatusText}" HorizontalAlignment="Center" FontWeight="SemiBold"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border Background="{DynamicResource StatusPillBackgroundBrush}"
|
|
BorderBrush="{DynamicResource StatusPillBorderBrush}"
|
|
BorderThickness="1"
|
|
Visibility="{Binding IsVirtualizationEnabled, Converter={StaticResource BoolToVisibilityConverter}}"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Margin="10"
|
|
Padding="8,5"
|
|
CornerRadius="{DynamicResource StandardCardCornerRadius}">
|
|
<TextBlock FontSize="{StaticResource ProcessFontSmall}" Foreground="{DynamicResource TextSecondaryBrush}">
|
|
<Run Text="{Binding FilteredProcesses.Count, Mode=OneWay}"/>
|
|
<Run Text=" / "/>
|
|
<Run Text="{Binding TotalProcessCount}"/>
|
|
<Run Text="{DynamicResource ProcessView_VisibleCountSuffix}"/>
|
|
</TextBlock>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<ScrollViewer x:Name="ProcessDetails" Grid.Row="2" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" MaxHeight="380">
|
|
<StackPanel>
|
|
<Border Style="{StaticResource ProcessDetailCardStyle}"
|
|
Visibility="{Binding SelectedProcessSummary.HasSelection, Converter={StaticResource InverseBoolToVisibilityConverter}}">
|
|
<TextBlock Text="{DynamicResource ProcessView_SelectProcessHint}" TextWrapping="Wrap" Foreground="{DynamicResource TextSecondaryBrush}"/>
|
|
</Border>
|
|
|
|
<StackPanel Visibility="{Binding SelectedProcessSummary.HasSelection, Converter={StaticResource BoolToVisibilityConverter}}">
|
|
<!-- Process -->
|
|
<Border Style="{StaticResource ProcessDetailCardStyle}">
|
|
<StackPanel>
|
|
<TextBlock Text="{Binding SelectedProcessSummary.ProcessTitle}" FontSize="16" FontWeight="SemiBold" TextTrimming="CharacterEllipsis"/>
|
|
<TextBlock Text="{Binding SelectedProcessSummary.ExecutablePath}"
|
|
ToolTip="{Binding SelectedProcessSummary.ExecutablePath}"
|
|
FontSize="{StaticResource ProcessFontSmall}"
|
|
Foreground="{DynamicResource TextSecondaryBrush}"
|
|
TextTrimming="CharacterEllipsis"
|
|
Margin="0,2,0,6"/>
|
|
<WrapPanel>
|
|
<TextBlock Text="{Binding SelectedProcessSummary.CpuUsageText}" FontSize="{StaticResource ProcessFontSmall}" Margin="0,0,16,2"/>
|
|
<TextBlock Text="{Binding SelectedProcessSummary.MemoryUsageText}" FontSize="{StaticResource ProcessFontSmall}" Margin="0,0,16,2"/>
|
|
<TextBlock Text="{Binding SelectedProcessSummary.CurrentProcessStatusText}" FontSize="{StaticResource ProcessFontSmall}"
|
|
Foreground="{DynamicResource WarningTextBrush}" Margin="0,0,16,2"
|
|
Visibility="{Binding SelectedProcessSummary.IsProtectedOrAccessDenied, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
|
</WrapPanel>
|
|
<TextBlock FontSize="{StaticResource ProcessFontSmall}"
|
|
Foreground="{DynamicResource TextSecondaryBrush}"
|
|
TextWrapping="Wrap"
|
|
Margin="0,4,0,0">
|
|
<Run Text="{DynamicResource ProcessView_LastAction}"/>
|
|
<Run Text="{Binding SelectedProcessSummary.LastOperationMessage, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Priority: each picker starts at the process's current value. -->
|
|
<Border Style="{StaticResource ProcessDetailCardStyle}">
|
|
<StackPanel>
|
|
<TextBlock Text="{DynamicResource ProcessView_PrioritySection}" Style="{StaticResource ProcessDetailHeaderStyle}"/>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" MinWidth="96"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock Grid.Row="0" Text="{DynamicResource ProcessView_RowCpu}" VerticalAlignment="Center" Margin="0,0,12,6"/>
|
|
<ComboBox Grid.Row="0" Grid.Column="1" Margin="0,0,0,6" SelectedValue="{Binding PendingCpuPriority}" SelectedValuePath="Tag"
|
|
AutomationProperties.Name="{DynamicResource ProcessView_SetPriority}">
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityLow}" Tag="{x:Static sysdiag:ProcessPriorityClass.Idle}"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityBelowNormal}" Tag="{x:Static sysdiag:ProcessPriorityClass.BelowNormal}"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityNormal}" Tag="{x:Static sysdiag:ProcessPriorityClass.Normal}"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityAboveNormal}" Tag="{x:Static sysdiag:ProcessPriorityClass.AboveNormal}"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityHigh}" Tag="{x:Static sysdiag:ProcessPriorityClass.High}"/>
|
|
</ComboBox>
|
|
<Button Grid.Row="0" Grid.Column="2" Margin="8,0,0,6" Content="{DynamicResource ProcessView_ApplyNow}" Command="{Binding ApplySelectedCpuPriorityCommand}"/>
|
|
|
|
<TextBlock Grid.Row="1" Text="{DynamicResource ProcessView_RowMemory}" VerticalAlignment="Center" Margin="0,0,12,6"/>
|
|
<ComboBox Grid.Row="1" Grid.Column="1" Margin="0,0,0,6" SelectedValue="{Binding PendingMemoryPriority}" SelectedValuePath="Tag"
|
|
AutomationProperties.Name="{DynamicResource ProcessView_SetMemoryPriority}">
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityVeryLow}" Tag="{x:Static models:ProcessMemoryPriority.VeryLow}"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityLow}" Tag="{x:Static models:ProcessMemoryPriority.Low}"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityMedium}" Tag="{x:Static models:ProcessMemoryPriority.Medium}"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityBelowNormal}" Tag="{x:Static models:ProcessMemoryPriority.BelowNormal}"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityNormal}" Tag="{x:Static models:ProcessMemoryPriority.Normal}"/>
|
|
</ComboBox>
|
|
<Button Grid.Row="1" Grid.Column="2" Margin="8,0,0,6" Content="{DynamicResource ProcessView_ApplyNow}" Command="{Binding ApplySelectedMemoryPriorityCommand}"/>
|
|
|
|
<TextBlock Grid.Row="2" Text="{DynamicResource ProcessView_RowIo}" VerticalAlignment="Center" Margin="0,0,12,6"/>
|
|
<ComboBox Grid.Row="2" Grid.Column="1" Margin="0,0,0,6" SelectedValue="{Binding PendingIoPriority}" SelectedValuePath="Tag"
|
|
AutomationProperties.Name="{DynamicResource ProcessView_SetIoPriority}">
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityVeryLow}" Tag="{x:Static models:ProcessIoPriority.VeryLow}"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityLow}" Tag="{x:Static models:ProcessIoPriority.Low}"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityNormal}" Tag="{x:Static models:ProcessIoPriority.Normal}"/>
|
|
<ComboBoxItem Content="{DynamicResource ProcessView_PriorityHigh}" Tag="{x:Static models:ProcessIoPriority.High}"/>
|
|
</ComboBox>
|
|
<Button Grid.Row="2" Grid.Column="2" Margin="8,0,0,6" Content="{DynamicResource ProcessView_ApplyNow}" Command="{Binding ApplySelectedIoPriorityCommand}"/>
|
|
|
|
<TextBlock Grid.Row="3" Text="{DynamicResource ProcessView_RowEfficiency}" VerticalAlignment="Center" Margin="0,0,12,0"
|
|
ToolTip="{DynamicResource ProcessView_EfficiencyModeTooltip}"/>
|
|
<ComboBox Grid.Row="3" Grid.Column="1" SelectedValue="{Binding PendingEfficiencyMode}" SelectedValuePath="Tag"
|
|
ToolTip="{DynamicResource ProcessView_EfficiencyModeTooltip}"
|
|
AutomationProperties.Name="{DynamicResource ProcessView_SetEfficiencyMode}">
|
|
<ComboBoxItem Content="{DynamicResource EfficiencyMode_SystemManaged}" Tag="{x:Static models:ProcessEfficiencyMode.SystemManaged}"/>
|
|
<ComboBoxItem Content="{DynamicResource EfficiencyMode_On}" Tag="{x:Static models:ProcessEfficiencyMode.On}"/>
|
|
<ComboBoxItem Content="{DynamicResource EfficiencyMode_Off}" Tag="{x:Static models:ProcessEfficiencyMode.Off}"/>
|
|
</ComboBox>
|
|
<Button Grid.Row="3" Grid.Column="2" Margin="8,0,0,0" Content="{DynamicResource ProcessView_ApplyNow}" Command="{Binding ApplySelectedEfficiencyModeCommand}"/>
|
|
</Grid>
|
|
<TextBlock Text="{Binding SelectedProcessSummary.EfficiencyModeText}"
|
|
Foreground="{DynamicResource WarningTextBrush}"
|
|
FontSize="{StaticResource ProcessFontSmall}"
|
|
TextWrapping="Wrap"
|
|
Margin="0,6,0,0"
|
|
Visibility="{Binding SelectedProcessSummary.IsEfficiencyModeVoided, Converter={StaticResource BoolToVisibilityConverter}}"/>
|
|
<ui:Button Appearance="Transparent" Margin="-8,6,0,0" Padding="8,4"
|
|
Icon="{ui:SymbolIcon ArrowUndo24}"
|
|
Content="{DynamicResource ProcessView_UndoPriority}"
|
|
Command="{Binding UndoPriorityCommand}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- CPU cores: the main ThreadPilot action, always visible. -->
|
|
<Border x:Name="CpuCoresCard" Style="{StaticResource ProcessDetailCardStyle}">
|
|
<StackPanel>
|
|
<TextBlock Text="{DynamicResource ProcessView_CoresSection}" Style="{StaticResource ProcessDetailHeaderStyle}"/>
|
|
<Grid Margin="0,0,0,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<ComboBox Grid.Column="0"
|
|
ItemsSource="{Binding AvailableCoreMasks}"
|
|
SelectedItem="{Binding SelectedCoreMask, Mode=TwoWay}"
|
|
DisplayMemberPath="Name"
|
|
ToolTip="{DynamicResource ProcessView_RowMaskTooltip}"
|
|
AutomationProperties.Name="{DynamicResource ProcessView_PendingCoreMask}"/>
|
|
<Button Grid.Column="1"
|
|
Margin="8,0,0,0"
|
|
Command="{Binding CreateCustomMaskCommand}"
|
|
Padding="8,5"
|
|
ToolTip="{DynamicResource ProcessView_OpenMasksTabTooltip}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<ui:SymbolIcon Symbol="Add12" Margin="0,0,6,0" VerticalAlignment="Center"/>
|
|
<TextBlock Text="{DynamicResource ProcessView_PriorityCustom}" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<ScrollViewer MaxHeight="88"
|
|
VerticalScrollBarVisibility="Auto"
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
ToolTip="{DynamicResource ProcessView_CpuCoresReadOnlyHint}">
|
|
<ItemsControl ItemsSource="{Binding CpuCores}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapPanel Orientation="Horizontal"/>
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Margin="2"
|
|
Padding="7,3"
|
|
CornerRadius="4"
|
|
IsHitTestVisible="False"
|
|
IsEnabled="{Binding IsEnabled}"
|
|
AutomationProperties.Name="{Binding Label}"
|
|
AutomationProperties.HelpText="{DynamicResource ProcessView_CpuCoresReadOnlyHint}"
|
|
ToolTip="{DynamicResource ProcessView_CpuSelectionPreviewTooltip}">
|
|
<Border.Style>
|
|
<Style TargetType="Border">
|
|
<Setter Property="AutomationProperties.ItemStatus" Value="{DynamicResource ProcessView_CpuCoreNotSelected}"/>
|
|
<Setter Property="Background" Value="{DynamicResource QuietRowBackgroundBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderSubtleBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Opacity" Value="1"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsSelected}" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource MaskSelectedBackgroundBrush}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MaskSelectedBorderBrush}"/>
|
|
<Setter Property="AutomationProperties.ItemStatus" Value="{DynamicResource ProcessView_CpuCoreSelected}"/>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding IsEnabled}" Value="False">
|
|
<Setter Property="Opacity" Value="0.45"/>
|
|
<Setter Property="AutomationProperties.ItemStatus" Value="{DynamicResource ProcessView_CpuCoreUnavailable}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Border.Style>
|
|
<TextBlock Text="{Binding Label}"
|
|
FontSize="{StaticResource ProcessFontSmall}">
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsSelected}" Value="True">
|
|
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
|
|
<WrapPanel Margin="0,6,0,0">
|
|
<TextBlock Text="{Binding CurrentAffinityText}" FontSize="{StaticResource ProcessFontSmall}" Foreground="{DynamicResource TextSecondaryBrush}" Margin="0,0,16,2"/>
|
|
<TextBlock Text="{Binding PendingAffinityText}" FontSize="{StaticResource ProcessFontSmall}" Foreground="{DynamicResource TextSecondaryBrush}" Margin="0,0,16,2"/>
|
|
</WrapPanel>
|
|
<TextBlock Text="{Binding AffinityEditStateText}" FontSize="{StaticResource ProcessFontSmall}" Foreground="{DynamicResource WarningTextBrush}" TextWrapping="Wrap" Margin="0,0,0,2"/>
|
|
<TextBlock FontSize="{StaticResource ProcessFontSmall}" Foreground="{DynamicResource TextSecondaryBrush}" TextWrapping="Wrap" Margin="0,0,0,8">
|
|
<Run Text="{Binding TopologyStatus, Mode=OneWay}"/>
|
|
<Run Text="·"/>
|
|
<Run Text="{Binding HyperThreadingStatusText, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<ComboBox Grid.Column="0"
|
|
SelectedValue="{Binding SelectedCpuAssignmentMode, Mode=TwoWay}"
|
|
SelectedValuePath="Tag"
|
|
ToolTip="{DynamicResource ProcessView_CpuAssignmentModeTooltip}"
|
|
AutomationProperties.Name="{DynamicResource ProcessView_CpuAssignmentMode}"
|
|
AutomationProperties.HelpText="{DynamicResource ProcessView_CpuAssignmentModeTooltip}">
|
|
<ComboBoxItem Content="{DynamicResource CpuAssignmentMode_AffinityMask}" Tag="{x:Static models:CpuAssignmentMode.AffinityMask}" ToolTip="{DynamicResource CpuAssignmentMode_AffinityMaskTooltip}"/>
|
|
<ComboBoxItem Content="{DynamicResource CpuAssignmentMode_IdealProcessor}" Tag="{x:Static models:CpuAssignmentMode.IdealProcessor}" ToolTip="{DynamicResource CpuAssignmentMode_IdealProcessorTooltip}"/>
|
|
<ComboBoxItem Content="{DynamicResource CpuAssignmentMode_CpuSets}" Tag="{x:Static models:CpuAssignmentMode.CpuSets}" ToolTip="{DynamicResource CpuAssignmentMode_CpuSetsTooltip}"/>
|
|
<ComboBoxItem Content="{DynamicResource CpuAssignmentMode_Automatic}" Tag="{x:Static models:CpuAssignmentMode.Automatic}" ToolTip="{DynamicResource CpuAssignmentMode_AutomaticTooltip}"/>
|
|
</ComboBox>
|
|
<ui:Button Grid.Column="1"
|
|
Margin="8,0,0,0"
|
|
Appearance="Primary"
|
|
Command="{Binding SetAffinityCommand}"
|
|
Content="{DynamicResource ProcessView_ApplyAffinity}"
|
|
ToolTip="{DynamicResource ProcessView_ApplyAffinityTooltip}"/>
|
|
</Grid>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Rule -->
|
|
<Border Style="{StaticResource ProcessDetailCardStyle}">
|
|
<StackPanel>
|
|
<TextBlock Text="{DynamicResource ProcessView_RuleSection}" Style="{StaticResource ProcessDetailHeaderStyle}"/>
|
|
<TextBlock Text="{Binding SelectedProcessSummary.RuleStatusText}" TextWrapping="Wrap" FontSize="{StaticResource ProcessFontSmall}"
|
|
Foreground="{DynamicResource TextSecondaryBrush}" Margin="0,0,0,8"/>
|
|
<Button Content="{DynamicResource ProcessView_SaveCurrentRule}"
|
|
ToolTip="{DynamicResource ProcessView_SaveRuleTooltip}"
|
|
Command="{Binding SaveCurrentSettingsAsRuleCommand}"
|
|
CommandParameter="{Binding SelectedProcess}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl>
|