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

37 lines
1.2 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 >= 1100;
this.DetailColumn.Width = new System.Windows.GridLength(wide ? 380 : 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);
}
private void ProcessRow_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
if (sender is not DataGridRow row)
{
return;
}
row.IsSelected = true;
row.Focus();
}
}
}