- .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
255 lines
16 KiB
XML
255 lines
16 KiB
XML
<Window x:Class="SpdUp.MainWindow"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:views="clr-namespace:SpdUp.Views"
|
||
xmlns:vm="clr-namespace:SpdUp.ViewModels"
|
||
xmlns:conv="clr-namespace:SpdUp.Converters"
|
||
Title="SpdUp – Gaming Booster"
|
||
Height="750" Width="1200" MinHeight="600" MinWidth="900"
|
||
WindowStartupLocation="CenterScreen"
|
||
WindowStyle="None" AllowsTransparency="False"
|
||
ResizeMode="CanResizeWithGrip"
|
||
Background="{StaticResource BgDarkBrush}"
|
||
Closing="Window_Closing">
|
||
|
||
<Window.Resources>
|
||
<conv:BoolToVisibilityConverter x:Key="BoolVis" />
|
||
<conv:BoostButtonTextConverter x:Key="BoostText" />
|
||
<conv:BoostButtonColorConverter x:Key="BoostColor" />
|
||
|
||
<!-- Page → View mapping -->
|
||
<DataTemplate DataType="{x:Type vm:DashboardViewModel}">
|
||
<views:DashboardView />
|
||
</DataTemplate>
|
||
<DataTemplate DataType="{x:Type vm:BoostViewModel}">
|
||
<views:BoostView />
|
||
</DataTemplate>
|
||
<DataTemplate DataType="{x:Type vm:MonitorViewModel}">
|
||
<views:MonitorView />
|
||
</DataTemplate>
|
||
<DataTemplate DataType="{x:Type vm:GameLibraryViewModel}">
|
||
<views:GameLibraryView />
|
||
</DataTemplate>
|
||
<DataTemplate DataType="{x:Type vm:ProcessManagerViewModel}">
|
||
<views:ProcessManagerView />
|
||
</DataTemplate>
|
||
<DataTemplate DataType="{x:Type vm:ServiceManagerViewModel}">
|
||
<views:ServiceManagerView />
|
||
</DataTemplate>
|
||
<DataTemplate DataType="{x:Type vm:SettingsViewModel}">
|
||
<views:SettingsView />
|
||
</DataTemplate>
|
||
<DataTemplate DataType="{x:Type vm:DebugLogViewModel}">
|
||
<views:DebugLogView />
|
||
</DataTemplate>
|
||
|
||
<!-- Window chrome button style -->
|
||
<Style x:Key="ChromeButton" TargetType="Button">
|
||
<Setter Property="Width" Value="46" />
|
||
<Setter Property="Height" Value="32" />
|
||
<Setter Property="Background" Value="Transparent" />
|
||
<Setter Property="Foreground" Value="{StaticResource TextSecondaryBrush}" />
|
||
<Setter Property="BorderThickness" Value="0" />
|
||
<Setter Property="FontSize" Value="13" />
|
||
<Setter Property="Cursor" Value="Hand" />
|
||
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="Button">
|
||
<Border x:Name="bd" Background="{TemplateBinding Background}">
|
||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||
</Border>
|
||
<ControlTemplate.Triggers>
|
||
<Trigger Property="IsMouseOver" Value="True">
|
||
<Setter TargetName="bd" Property="Background" Value="#33FFFFFF" />
|
||
</Trigger>
|
||
<Trigger Property="IsPressed" Value="True">
|
||
<Setter TargetName="bd" Property="Background" Value="#55FFFFFF" />
|
||
</Trigger>
|
||
</ControlTemplate.Triggers>
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
</Style>
|
||
<Style x:Key="ChromeCloseButton" TargetType="Button" BasedOn="{StaticResource ChromeButton}">
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="Button">
|
||
<Border x:Name="bd" Background="{TemplateBinding Background}">
|
||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||
</Border>
|
||
<ControlTemplate.Triggers>
|
||
<Trigger Property="IsMouseOver" Value="True">
|
||
<Setter TargetName="bd" Property="Background" Value="#E81123" />
|
||
<Setter Property="Foreground" Value="White" />
|
||
</Trigger>
|
||
<Trigger Property="IsPressed" Value="True">
|
||
<Setter TargetName="bd" Property="Background" Value="#C50F1F" />
|
||
</Trigger>
|
||
</ControlTemplate.Triggers>
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
</Style>
|
||
</Window.Resources>
|
||
|
||
<!-- Custom chrome so we keep snap/resize but remove default frame -->
|
||
<WindowChrome.WindowChrome>
|
||
<WindowChrome CaptionHeight="36" ResizeBorderThickness="6"
|
||
GlassFrameThickness="0" CornerRadius="0" />
|
||
</WindowChrome.WindowChrome>
|
||
|
||
<Border BorderBrush="{StaticResource BorderDimBrush}" BorderThickness="1">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="36" /> <!-- Custom Title Bar -->
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<!-- ═══ CUSTOM TITLE BAR ═══════════════════════════════════ -->
|
||
<Border Grid.Row="0" Background="{StaticResource BgPanelBrush}"
|
||
BorderBrush="{StaticResource BorderDimBrush}" BorderThickness="0,0,0,1">
|
||
<DockPanel>
|
||
<!-- Left: app icon + title (draggable area) -->
|
||
<TextBlock DockPanel.Dock="Left" VerticalAlignment="Center" Margin="12,0,0,0"
|
||
FontSize="12" Foreground="{StaticResource TextSecondaryBrush}">
|
||
<Run Text="⚡" Foreground="{StaticResource AccentGreenBrush}" />
|
||
<Run Text=" SpdUp" FontWeight="SemiBold" Foreground="{StaticResource TextPrimaryBrush}" />
|
||
<Run Text=" – Gaming Booster" />
|
||
</TextBlock>
|
||
|
||
<!-- Right: window buttons -->
|
||
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right">
|
||
<Button Content="—" Style="{StaticResource ChromeButton}"
|
||
Click="Minimize_Click" />
|
||
<Button x:Name="MaxRestoreBtn" Content="☐" Style="{StaticResource ChromeButton}"
|
||
Click="MaximizeRestore_Click" />
|
||
<Button Content="✕" Style="{StaticResource ChromeCloseButton}"
|
||
Click="Close_Click" />
|
||
</StackPanel>
|
||
</DockPanel>
|
||
</Border>
|
||
|
||
<!-- ═══ MAIN LAYOUT ════════════════════════════════════════ -->
|
||
<Grid Grid.Row="1">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="220" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<!-- ═══ LEFT SIDEBAR ═══════════════════════════════════ -->
|
||
<Border Grid.Column="0" Background="{StaticResource BgPanelBrush}"
|
||
BorderBrush="{StaticResource BorderDimBrush}" BorderThickness="0,0,1,0">
|
||
<DockPanel>
|
||
<!-- App Title -->
|
||
<StackPanel DockPanel.Dock="Top" Margin="16,16,16,8">
|
||
<TextBlock Text="⚡ SpdUp" FontSize="24" FontWeight="Bold"
|
||
Foreground="{StaticResource AccentGreenBrush}" />
|
||
<TextBlock Text="Gaming Booster" FontSize="11"
|
||
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,2,0,0" />
|
||
</StackPanel>
|
||
|
||
<!-- Boost Status Indicator -->
|
||
<Border DockPanel.Dock="Top" Margin="12,8,12,12" Padding="12,8" CornerRadius="8"
|
||
Background="{Binding IsBoosted, Converter={StaticResource BoostColor}}"
|
||
Visibility="{Binding IsBoosted, Converter={StaticResource BoolVis}}">
|
||
<TextBlock Text="🚀 BOOST ACTIVE" FontWeight="Bold" FontSize="12"
|
||
Foreground="#000000" HorizontalAlignment="Center" />
|
||
</Border>
|
||
|
||
<!-- Trans Flag + Made with Love -->
|
||
<StackPanel DockPanel.Dock="Bottom" Margin="12,8,12,16">
|
||
<Grid Height="20" Margin="0,0,0,6">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="*"/>
|
||
<RowDefinition Height="*"/>
|
||
<RowDefinition Height="*"/>
|
||
<RowDefinition Height="*"/>
|
||
<RowDefinition Height="*"/>
|
||
</Grid.RowDefinitions>
|
||
<Rectangle Grid.Row="0" Fill="{StaticResource TransBlueBrush}" RadiusX="3" RadiusY="3"/>
|
||
<Rectangle Grid.Row="1" Fill="{StaticResource TransPinkBrush}"/>
|
||
<Rectangle Grid.Row="2" Fill="{StaticResource TransWhiteBrush}"/>
|
||
<Rectangle Grid.Row="3" Fill="{StaticResource TransPinkBrush}"/>
|
||
<Rectangle Grid.Row="4" Fill="{StaticResource TransBlueBrush}" RadiusX="3" RadiusY="3"/>
|
||
</Grid>
|
||
<TextBlock Text="Made with ❤️ by Mandy" FontSize="10"
|
||
Foreground="{StaticResource TextSecondaryBrush}"
|
||
HorizontalAlignment="Center" />
|
||
</StackPanel>
|
||
|
||
<!-- Navigation -->
|
||
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="0,8,0,0">
|
||
<StackPanel>
|
||
<TextBlock Text="MAIN" FontSize="10" FontWeight="Bold" Margin="20,12,0,6"
|
||
Foreground="{StaticResource TextSecondaryBrush}" />
|
||
<Button Content="📊 Dashboard" Style="{StaticResource NavButton}"
|
||
Command="{Binding NavigateCommand}" CommandParameter="Dashboard" />
|
||
<Button Content="🚀 Game Boost" Style="{StaticResource NavButton}"
|
||
Command="{Binding NavigateCommand}" CommandParameter="Boost" />
|
||
<Button Content="📈 System Monitor" Style="{StaticResource NavButton}"
|
||
Command="{Binding NavigateCommand}" CommandParameter="Monitor" />
|
||
|
||
<TextBlock Text="MANAGE" FontSize="10" FontWeight="Bold" Margin="20,16,0,6"
|
||
Foreground="{StaticResource TextSecondaryBrush}" />
|
||
<Button Content="🎮 Game Library" Style="{StaticResource NavButton}"
|
||
Command="{Binding NavigateCommand}" CommandParameter="Games" />
|
||
<Button Content="📋 Processes" Style="{StaticResource NavButton}"
|
||
Command="{Binding NavigateCommand}" CommandParameter="Processes" />
|
||
<Button Content="⚙ Services" Style="{StaticResource NavButton}"
|
||
Command="{Binding NavigateCommand}" CommandParameter="Services" />
|
||
|
||
<TextBlock Text="OTHER" FontSize="10" FontWeight="Bold" Margin="20,16,0,6"
|
||
Foreground="{StaticResource TextSecondaryBrush}" />
|
||
<Button Content="🖥 Widget" Style="{StaticResource NavButton}"
|
||
Command="{Binding ToggleWidgetCommand}" />
|
||
<Button Content="🐛 Debug Log" Style="{StaticResource NavButton}"
|
||
Command="{Binding NavigateCommand}" CommandParameter="Debug" />
|
||
<Button Content="⚙ Settings" Style="{StaticResource NavButton}"
|
||
Command="{Binding NavigateCommand}" CommandParameter="Settings" />
|
||
</StackPanel>
|
||
</ScrollViewer>
|
||
</DockPanel>
|
||
</Border>
|
||
|
||
<!-- ═══ MAIN CONTENT ═══════════════════════════════════ -->
|
||
<DockPanel Grid.Column="1">
|
||
<!-- Top Bar -->
|
||
<Border DockPanel.Dock="Top" Padding="24,12" Background="{StaticResource BgDarkBrush}"
|
||
BorderBrush="{StaticResource BorderDimBrush}" BorderThickness="0,0,0,1">
|
||
<DockPanel>
|
||
<TextBlock Text="{Binding CurrentPageTitle}" FontSize="20" FontWeight="Bold"
|
||
Foreground="{StaticResource TextPrimaryBrush}" VerticalAlignment="Center" />
|
||
|
||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||
<TextBlock Text="{Binding StatusText}" FontSize="11" VerticalAlignment="Center"
|
||
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,0,16,0" />
|
||
<TextBlock VerticalAlignment="Center" Foreground="{StaticResource TextSecondaryBrush}"
|
||
FontSize="11">
|
||
<Run Text="CPU " /><Run Text="{Binding CpuUsage, StringFormat={}{0:F0}%}" Foreground="{StaticResource AccentCyanBrush}" />
|
||
<Run Text=" RAM " /><Run Text="{Binding RamUsagePercent, StringFormat={}{0:F0}%}" Foreground="{StaticResource AccentGreenBrush}" />
|
||
<Run Text=" GPU " /><Run Text="{Binding GpuUsage, StringFormat={}{0:F0}%}" Foreground="{StaticResource AccentPurpleBrush}" />
|
||
<Run Text=" Ping " /><Run Text="{Binding PingMs, StringFormat={}{0:F0}ms}" Foreground="{StaticResource AccentOrangeBrush}" />
|
||
</TextBlock>
|
||
</StackPanel>
|
||
</DockPanel>
|
||
</Border>
|
||
|
||
<!-- Status Bar -->
|
||
<Border DockPanel.Dock="Bottom" Padding="16,6" Background="{StaticResource BgPanelBrush}"
|
||
BorderBrush="{StaticResource BorderDimBrush}" BorderThickness="0,1,0,0">
|
||
<TextBlock Text="{Binding StatusText}" FontSize="11"
|
||
Foreground="{StaticResource TextSecondaryBrush}" />
|
||
</Border>
|
||
|
||
<!-- Page Host -->
|
||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
|
||
Padding="24,20">
|
||
<ContentControl Content="{Binding CurrentPage}" />
|
||
</ScrollViewer>
|
||
</DockPanel>
|
||
</Grid>
|
||
</Grid>
|
||
</Border>
|
||
</Window>
|