Initial commit: SpdUp Windows Gaming Booster v1.0.0
- .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
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace SpdUp.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Persisted application settings.
|
||||
/// </summary>
|
||||
public sealed class AppSettings
|
||||
{
|
||||
private static readonly string _filePath = Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "SpdUp", "settings.json");
|
||||
|
||||
// ── General ────────────────────────────────────────────────────────
|
||||
public bool MinimizeToTray { get; set; } = true;
|
||||
public bool StartWithWindows { get; set; } = false;
|
||||
public bool AutoDetectGames { get; set; } = true;
|
||||
public bool AutoBoostOnGameLaunch { get; set; } = true;
|
||||
|
||||
// ── Widget ─────────────────────────────────────────────────────────
|
||||
public bool ShowWidget { get; set; } = false;
|
||||
public bool WidgetCompactMode { get; set; } = true;
|
||||
public double WidgetLeft { get; set; } = 100;
|
||||
public double WidgetTop { get; set; } = 100;
|
||||
public double WidgetOpacity { get; set; } = 0.85;
|
||||
public int WidgetUpdateIntervalMs { get; set; } = 1000;
|
||||
public bool WidgetClickThrough { get; set; } = false;
|
||||
|
||||
// ── Monitoring ─────────────────────────────────────────────────────
|
||||
public int MonitoringIntervalMs { get; set; } = 1000;
|
||||
|
||||
// ── Network ────────────────────────────────────────────────────────
|
||||
public string PingTarget { get; set; } = "8.8.8.8";
|
||||
public string PreferredDns { get; set; } = "1.1.1.1";
|
||||
|
||||
// ── Game Library ───────────────────────────────────────────────────
|
||||
public List<GameEntry> Games { get; set; } = new();
|
||||
|
||||
// ── Boost services to stop ─────────────────────────────────────────
|
||||
public List<string> ServicesToStop { get; set; } = new()
|
||||
{
|
||||
"SysMain", "WSearch", "DiagTrack", "TabletInputService", "MapsBroker",
|
||||
"PcaSvc", "wisvc"
|
||||
};
|
||||
|
||||
// ── Persistence ────────────────────────────────────────────────────
|
||||
private static readonly JsonSerializerOptions _jsonOpts = new()
|
||||
{
|
||||
WriteIndented = true,
|
||||
PropertyNameCaseInsensitive = true
|
||||
};
|
||||
|
||||
public static AppSettings Load()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(_filePath))
|
||||
{
|
||||
var json = File.ReadAllText(_filePath);
|
||||
return JsonSerializer.Deserialize<AppSettings>(json, _jsonOpts) ?? new AppSettings();
|
||||
}
|
||||
}
|
||||
catch { /* return default */ }
|
||||
return new AppSettings();
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
try
|
||||
{
|
||||
var dir = Path.GetDirectoryName(_filePath)!;
|
||||
Directory.CreateDirectory(dir);
|
||||
File.WriteAllText(_filePath, JsonSerializer.Serialize(this, _jsonOpts));
|
||||
}
|
||||
catch { /* best-effort */ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System.IO;
|
||||
|
||||
namespace SpdUp.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a detected or manually-added game.
|
||||
/// </summary>
|
||||
public sealed class GameEntry
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string ExecutablePath { get; set; } = string.Empty;
|
||||
public string ProcessName { get; set; } = string.Empty;
|
||||
public string LauncherSource { get; set; } = "Manual";
|
||||
public string? IconPath { get; set; }
|
||||
public bool AutoBoost { get; set; } = true;
|
||||
public BoostProfile Profile { get; set; } = new();
|
||||
|
||||
/// <summary>Derive the process name from the executable path.</summary>
|
||||
public static string ProcessNameFromPath(string exePath)
|
||||
=> Path.GetFileNameWithoutExtension(exePath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Per-game boost profile overrides.
|
||||
/// </summary>
|
||||
public sealed class BoostProfile
|
||||
{
|
||||
public bool CleanRam { get; set; } = true;
|
||||
public bool SetHighPriority { get; set; } = true;
|
||||
public bool ReduceTimerResolution { get; set; } = true;
|
||||
public bool StopServices { get; set; } = true;
|
||||
public bool OptimizeNetwork { get; set; } = false;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace SpdUp.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a lightweight process view for the Process Manager.
|
||||
/// </summary>
|
||||
public sealed class ProcessEntry
|
||||
{
|
||||
public int Pid { get; init; }
|
||||
public string Name { get; init; } = string.Empty;
|
||||
public string? WindowTitle { get; init; }
|
||||
public float CpuPercent { get; set; }
|
||||
public float MemoryMB { get; set; }
|
||||
public string PriorityClass { get; set; } = "Normal";
|
||||
public bool IsSystem { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace SpdUp.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a Windows service relevant to the boost process.
|
||||
/// </summary>
|
||||
public sealed class ServiceEntry
|
||||
{
|
||||
public string ServiceName { get; init; } = string.Empty;
|
||||
public string DisplayName { get; init; } = string.Empty;
|
||||
public string Status { get; set; } = "Unknown";
|
||||
public bool WasRunningBeforeBoost { get; set; }
|
||||
public string Description { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace SpdUp.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Snapshot of current system performance metrics.
|
||||
/// </summary>
|
||||
public sealed class SystemMetrics
|
||||
{
|
||||
public float CpuUsage { get; init; }
|
||||
public float RamUsageMB { get; init; }
|
||||
public float RamTotalMB { get; init; }
|
||||
public float RamUsagePercent => RamTotalMB > 0 ? (RamUsageMB / RamTotalMB) * 100f : 0f;
|
||||
public float GpuUsage { get; init; }
|
||||
public float CpuTemperature { get; init; }
|
||||
public float GpuTemperature { get; init; }
|
||||
public float NetworkPingMs { get; init; }
|
||||
public float Fps { get; init; }
|
||||
public DateTime Timestamp { get; init; } = DateTime.Now;
|
||||
}
|
||||
Reference in New Issue
Block a user