Files
SpdUp/Views/WidgetWindow.xaml
Phil-icyou 19ba425e79 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
2026-03-08 17:34:45 +01:00

123 lines
6.4 KiB
XML

<Window x:Class="SpdUp.Views.WidgetWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:SpdUp.Converters"
Title="SpdUp Widget"
Width="220" SizeToContent="Height"
WindowStyle="None" AllowsTransparency="True"
Background="Transparent" Topmost="True"
ShowInTaskbar="False" ResizeMode="NoResize"
MouseLeftButtonDown="Widget_MouseLeftButtonDown"
MouseRightButtonDown="Widget_MouseRightButtonDown">
<Window.Resources>
<conv:PercentToColorConverter x:Key="PctColor" />
<conv:BoolToVisibilityConverter x:Key="BoolVis" />
</Window.Resources>
<Border x:Name="RootBorder" CornerRadius="14" Padding="14"
BorderBrush="#33FFFFFF" BorderThickness="1">
<Border.Background>
<SolidColorBrush Color="#16161A" Opacity="0.92" />
</Border.Background>
<StackPanel>
<!-- Header -->
<DockPanel Margin="0,0,0,8">
<TextBlock Text="⚡ SpdUp" FontSize="12" FontWeight="Bold"
Foreground="#30D158" VerticalAlignment="Center" />
<Button DockPanel.Dock="Right" Content="✕" FontSize="10" Cursor="Hand"
Click="Close_Click" HorizontalAlignment="Right" Padding="4,2"
Background="Transparent" Foreground="#8B8B96" BorderThickness="0" />
<Button DockPanel.Dock="Right" Content="⊟" FontSize="10" Cursor="Hand"
Click="Toggle_Click" HorizontalAlignment="Right" Padding="4,2" Margin="0,0,4,0"
Background="Transparent" Foreground="#8B8B96" BorderThickness="0" />
</DockPanel>
<!-- Compact metrics -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<!-- CPU -->
<StackPanel Grid.Row="0" Grid.Column="0" Margin="0,2">
<TextBlock Text="CPU" FontSize="9" Foreground="#8B8B96" />
<TextBlock FontSize="16" FontWeight="Bold"
Foreground="{Binding CpuUsage, Converter={StaticResource PctColor}}"
Text="{Binding CpuUsage, StringFormat={}{0:F0}%}" />
</StackPanel>
<!-- RAM -->
<StackPanel Grid.Row="0" Grid.Column="1" Margin="0,2">
<TextBlock Text="RAM" FontSize="9" Foreground="#8B8B96" />
<TextBlock FontSize="16" FontWeight="Bold"
Foreground="{Binding RamUsagePercent, Converter={StaticResource PctColor}}"
Text="{Binding RamUsagePercent, StringFormat={}{0:F0}%}" />
</StackPanel>
<!-- GPU -->
<StackPanel Grid.Row="1" Grid.Column="0" Margin="0,2">
<TextBlock Text="GPU" FontSize="9" Foreground="#8B8B96" />
<TextBlock FontSize="16" FontWeight="Bold" Foreground="#BF5AF2"
Text="{Binding GpuUsage, StringFormat={}{0:F0}%}" />
</StackPanel>
<!-- Ping -->
<StackPanel Grid.Row="1" Grid.Column="1" Margin="0,2">
<TextBlock Text="PING" FontSize="9" Foreground="#8B8B96" />
<TextBlock FontSize="16" FontWeight="Bold" Foreground="#64D2FF"
Text="{Binding PingMs, StringFormat={}{0:F0}ms}" />
</StackPanel>
<!-- Expanded: Temperatures -->
<StackPanel x:Name="ExpandedPanel" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
Margin="0,6,0,0" Visibility="Collapsed">
<Separator Background="#2E2E38" Margin="0,0,0,6" />
<DockPanel>
<TextBlock Text="CPU Temp" FontSize="9" Foreground="#8B8B96" VerticalAlignment="Center" />
<TextBlock DockPanel.Dock="Right" FontSize="13" FontWeight="Bold"
Foreground="#FF9F0A" HorizontalAlignment="Right"
Text="{Binding CpuTemp, StringFormat={}{0:F0}°C}" />
</DockPanel>
<DockPanel Margin="0,3,0,0">
<TextBlock Text="GPU Temp" FontSize="9" Foreground="#8B8B96" VerticalAlignment="Center" />
<TextBlock DockPanel.Dock="Right" FontSize="13" FontWeight="Bold"
Foreground="#FF9F0A" HorizontalAlignment="Right"
Text="{Binding GpuTemp, StringFormat={}{0:F0}°C}" />
</DockPanel>
<DockPanel Margin="0,3,0,0">
<TextBlock Text="RAM" FontSize="9" Foreground="#8B8B96" VerticalAlignment="Center" />
<TextBlock DockPanel.Dock="Right" FontSize="11" Foreground="#8B8B96"
HorizontalAlignment="Right">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0:F0}/{1:F0} MB">
<Binding Path="RamUsedMB" />
<Binding Path="RamTotalMB" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</DockPanel>
</StackPanel>
</Grid>
<!-- Boost indicator -->
<Border Margin="0,6,0,0" Padding="4,2" CornerRadius="4"
Visibility="{Binding IsBoosted, Converter={StaticResource BoolVis},
FallbackValue=Collapsed}">
<Border.Background>
<SolidColorBrush Color="#30D158" Opacity="0.2" />
</Border.Background>
<TextBlock Text="🚀 BOOST ACTIVE" FontSize="9" FontWeight="Bold"
Foreground="#30D158" HorizontalAlignment="Center" />
</Border>
</StackPanel>
</Border>
</Window>