- .NET 8 WPF app with full MVVM architecture - One-click boost: CPU, RAM, GPU, network, services, timer resolution - Real-time system monitor (LibreHardwareMonitor) - Auto game detection (30+ games) - RAM optimizer with kernel-level cleanup - Network optimizer (TCP registry tweaks) - Service manager, process manager, shader cache cleaner - Desktop widget overlay - Debug log viewer - Custom dark gaming theme with trans pride colors - 84 unit tests (xUnit) - Inno Setup installer script - Landing page website
47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
using System.Windows.Input;
|
||
using SpdUp.Core;
|
||
using SpdUp.Services;
|
||
|
||
namespace SpdUp.ViewModels;
|
||
|
||
/// <summary>
|
||
/// Boost page ViewModel.
|
||
/// </summary>
|
||
public sealed class BoostViewModel : ObservableObject
|
||
{
|
||
private readonly MainViewModel _main;
|
||
private readonly OptimizationService _optimizationService;
|
||
|
||
private string _boostLog = string.Empty;
|
||
public string BoostLog
|
||
{
|
||
get => _boostLog;
|
||
set => SetProperty(ref _boostLog, value);
|
||
}
|
||
|
||
public MainViewModel Main => _main;
|
||
|
||
public ICommand BoostCommand { get; }
|
||
public ICommand CleanRamCommand { get; }
|
||
public ICommand CleanShadersCommand { get; }
|
||
|
||
public BoostViewModel(MainViewModel main, OptimizationService optimizationService)
|
||
{
|
||
_main = main;
|
||
_optimizationService = optimizationService;
|
||
|
||
BoostCommand = _main.BoostCommand;
|
||
CleanRamCommand = _main.CleanRamCommand;
|
||
CleanShadersCommand = _main.CleanShaderCacheCommand;
|
||
|
||
_optimizationService.BoostActivated += msg =>
|
||
{
|
||
BoostLog = $"[{DateTime.Now:HH:mm:ss}] BOOST ON\n{msg}\n\n{BoostLog}";
|
||
};
|
||
_optimizationService.BoostDeactivated += () =>
|
||
{
|
||
BoostLog = $"[{DateTime.Now:HH:mm:ss}] BOOST OFF – Restored.\n\n{BoostLog}";
|
||
};
|
||
}
|
||
}
|