Files
ThreadPilot/Views/ProcessView.xaml.cs
T
PrimeBuild-pc acd5ecee5a 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.
2026-10-14 17:33:02 +02:00

38 lines
1.3 KiB
C#

namespace ThreadPilot.Views
{
using System.Windows.Controls;
using System.Windows.Input;
using ThreadPilot.Helpers;
using ThreadPilot.ViewModels;
public partial class ProcessView : System.Windows.Controls.UserControl
{
public ProcessView()
{
this.InitializeComponent();
this.DataContext = ServiceProviderExtensions.GetService<ProcessViewModel>();
}
private void ProcessWorkspace_SizeChanged(object sender, System.Windows.SizeChangedEventArgs e)
{
var wide = e.NewSize.Width >= 960;
this.DetailColumn.Width = new System.Windows.GridLength(wide ? 400 : 0);
Grid.SetRow(this.ProcessDetails, wide ? 1 : 2);
Grid.SetColumn(this.ProcessDetails, wide ? 1 : 0);
this.ProcessDetails.MaxHeight = wide ? double.PositiveInfinity : Math.Max(160, e.NewSize.Height * 0.48);
this.ProcessDetails.Padding = wide ? new System.Windows.Thickness(12, 0, 12, 0) : new System.Windows.Thickness(0, 12, 12, 0);
}
private void ProcessRow_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
if (sender is not DataGridRow row)
{
return;
}
row.IsSelected = true;
row.Focus();
}
}
}