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,55 @@
|
||||
<UserControl x:Class="SpdUp.Views.BoostView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:conv="clr-namespace:SpdUp.Converters">
|
||||
|
||||
<UserControl.Resources>
|
||||
<conv:BoostButtonTextConverter x:Key="BoostText" />
|
||||
<conv:BoostButtonColorConverter x:Key="BoostColor" />
|
||||
<conv:BoolToVisibilityConverter x:Key="BoolVis" />
|
||||
</UserControl.Resources>
|
||||
|
||||
<StackPanel>
|
||||
<!-- BOOST Button Hero -->
|
||||
<Border Style="{StaticResource Card}" Padding="40" HorizontalAlignment="Stretch">
|
||||
<StackPanel HorizontalAlignment="Center">
|
||||
<TextBlock Text="One-Click Game Boost" FontSize="18" FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" HorizontalAlignment="Center"
|
||||
Margin="0,0,0,8" />
|
||||
<TextBlock Text="Frees RAM · Stops services · Sets priority · Reduces latency"
|
||||
FontSize="12" Foreground="{StaticResource TextSecondaryBrush}"
|
||||
HorizontalAlignment="Center" Margin="0,0,0,20" />
|
||||
|
||||
<Button MinWidth="260" MinHeight="56" FontSize="18"
|
||||
Style="{StaticResource PrimaryButton}"
|
||||
Content="{Binding Main.IsBoosted, Converter={StaticResource BoostText}}"
|
||||
Background="{Binding Main.IsBoosted, Converter={StaticResource BoostColor}}"
|
||||
Command="{Binding BoostCommand}" HorizontalAlignment="Center" />
|
||||
|
||||
<TextBlock Text="{Binding Main.StatusText}" FontSize="12" Margin="0,12,0,0"
|
||||
Foreground="{StaticResource TextSecondaryBrush}" HorizontalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Quick Tools -->
|
||||
<TextBlock Text="Quick Tools" FontSize="14" FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" Margin="0,8,0,12" />
|
||||
|
||||
<WrapPanel>
|
||||
<Button Style="{StaticResource SecondaryButton}" Content="🧹 Clean RAM"
|
||||
Command="{Binding CleanRamCommand}" Margin="0,0,8,8" MinWidth="140" />
|
||||
<Button Style="{StaticResource SecondaryButton}" Content="🗑 Clean Shader Cache"
|
||||
Command="{Binding CleanShadersCommand}" Margin="0,0,8,8" MinWidth="160" />
|
||||
</WrapPanel>
|
||||
|
||||
<!-- Boost Log -->
|
||||
<TextBlock Text="Boost Log" FontSize="14" FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" Margin="0,12,0,8" />
|
||||
<Border Style="{StaticResource Card}" MaxHeight="300">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<TextBlock Text="{Binding BoostLog}" FontSize="11" FontFamily="Consolas"
|
||||
Foreground="{StaticResource TextSecondaryBrush}" TextWrapping="Wrap" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SpdUp.Views;
|
||||
|
||||
public partial class BoostView : UserControl
|
||||
{
|
||||
public BoostView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
<UserControl x:Class="SpdUp.Views.DashboardView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:conv="clr-namespace:SpdUp.Converters">
|
||||
|
||||
<UserControl.Resources>
|
||||
<conv:PercentToColorConverter x:Key="PctColor" />
|
||||
<conv:FloatFormatConverter x:Key="FmtFloat" />
|
||||
<conv:BoostButtonTextConverter x:Key="BoostText" />
|
||||
<conv:BoostButtonColorConverter x:Key="BoostColor" />
|
||||
</UserControl.Resources>
|
||||
|
||||
<StackPanel>
|
||||
<!-- Quick Actions -->
|
||||
<Border Style="{StaticResource Card}">
|
||||
<DockPanel>
|
||||
<TextBlock DockPanel.Dock="Top" Text="Quick Actions" FontSize="14" FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" Margin="0,0,0,12" />
|
||||
<WrapPanel>
|
||||
<Button Style="{StaticResource PrimaryButton}" Margin="0,0,10,0"
|
||||
Content="{Binding Main.IsBoosted, Converter={StaticResource BoostText}}"
|
||||
Background="{Binding Main.IsBoosted, Converter={StaticResource BoostColor}}"
|
||||
Command="{Binding Main.BoostCommand}" MinWidth="180" />
|
||||
<Button Style="{StaticResource SecondaryButton}" Content="🧹 Clean RAM"
|
||||
Command="{Binding Main.CleanRamCommand}" Margin="0,0,10,0" />
|
||||
<Button Style="{StaticResource SecondaryButton}" Content="🗑 Clean Shader Cache"
|
||||
Command="{Binding Main.CleanShaderCacheCommand}" Margin="0,0,10,0" />
|
||||
<Button Style="{StaticResource SecondaryButton}" Content="🖥 Toggle Widget"
|
||||
Command="{Binding Main.ToggleWidgetCommand}" />
|
||||
</WrapPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<!-- System Metrics -->
|
||||
<TextBlock Text="System Overview" FontSize="14" FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" Margin="0,4,0,12" />
|
||||
|
||||
<UniformGrid Columns="3" Rows="2">
|
||||
<!-- CPU -->
|
||||
<Border Style="{StaticResource Card}" Margin="0,0,8,8">
|
||||
<StackPanel>
|
||||
<TextBlock Text="CPU Usage" Style="{StaticResource MetricLabel}" />
|
||||
<TextBlock Style="{StaticResource MetricValue}"
|
||||
Foreground="{Binding Main.CpuUsage, Converter={StaticResource PctColor}}">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0:F1}%">
|
||||
<Binding Path="Main.CpuUsage" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
<ProgressBar Height="6" Margin="0,8,0,0" Maximum="100"
|
||||
Value="{Binding Main.CpuUsage, Mode=OneWay}"
|
||||
Foreground="{Binding Main.CpuUsage, Converter={StaticResource PctColor}}"
|
||||
Background="{StaticResource BgPanelBrush}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- RAM -->
|
||||
<Border Style="{StaticResource Card}" Margin="4,0,4,8">
|
||||
<StackPanel>
|
||||
<TextBlock Text="RAM Usage" Style="{StaticResource MetricLabel}" />
|
||||
<TextBlock Style="{StaticResource MetricValue}"
|
||||
Foreground="{Binding Main.RamUsagePercent, Converter={StaticResource PctColor}}">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0:F1}%">
|
||||
<Binding Path="Main.RamUsagePercent" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
<TextBlock FontSize="11" Foreground="{StaticResource TextSecondaryBrush}" Margin="0,2,0,0">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0:F0} / {1:F0} MB">
|
||||
<Binding Path="Main.RamUsedMB" />
|
||||
<Binding Path="Main.RamTotalMB" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
<ProgressBar Height="6" Margin="0,6,0,0" Maximum="100"
|
||||
Value="{Binding Main.RamUsagePercent, Mode=OneWay}"
|
||||
Foreground="{Binding Main.RamUsagePercent, Converter={StaticResource PctColor}}"
|
||||
Background="{StaticResource BgPanelBrush}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- GPU -->
|
||||
<Border Style="{StaticResource Card}" Margin="8,0,0,8">
|
||||
<StackPanel>
|
||||
<TextBlock Text="GPU Usage" Style="{StaticResource MetricLabel}" />
|
||||
<TextBlock Style="{StaticResource MetricValue}"
|
||||
Foreground="{StaticResource AccentPurpleBrush}">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0:F1}%">
|
||||
<Binding Path="Main.GpuUsage" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
<ProgressBar Height="6" Margin="0,8,0,0" Maximum="100"
|
||||
Value="{Binding Main.GpuUsage, Mode=OneWay}"
|
||||
Foreground="{StaticResource AccentPurpleBrush}"
|
||||
Background="{StaticResource BgPanelBrush}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- CPU Temp -->
|
||||
<Border Style="{StaticResource Card}" Margin="0,0,8,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="CPU Temperature" Style="{StaticResource MetricLabel}" />
|
||||
<TextBlock Style="{StaticResource MetricValue}" Foreground="{StaticResource AccentOrangeBrush}">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0:F0}°C">
|
||||
<Binding Path="Main.CpuTemp" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- GPU Temp -->
|
||||
<Border Style="{StaticResource Card}" Margin="4,0,4,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="GPU Temperature" Style="{StaticResource MetricLabel}" />
|
||||
<TextBlock Style="{StaticResource MetricValue}" Foreground="{StaticResource AccentOrangeBrush}">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0:F0}°C">
|
||||
<Binding Path="Main.GpuTemp" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Ping -->
|
||||
<Border Style="{StaticResource Card}" Margin="8,0,0,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Network Ping" Style="{StaticResource MetricLabel}" />
|
||||
<TextBlock Style="{StaticResource MetricValue}" Foreground="{StaticResource AccentCyanBrush}">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0:F0} ms">
|
||||
<Binding Path="Main.PingMs" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SpdUp.Views;
|
||||
|
||||
public partial class DashboardView : UserControl
|
||||
{
|
||||
public DashboardView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<UserControl x:Class="SpdUp.Views.DebugLogView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<DockPanel>
|
||||
<!-- Toolbar -->
|
||||
<Border DockPanel.Dock="Top" Style="{StaticResource Card}" Padding="12" Margin="0,0,0,8">
|
||||
<DockPanel>
|
||||
<TextBlock Text="🔍" VerticalAlignment="Center" FontSize="14" Margin="0,0,8,0" />
|
||||
<TextBox Text="{Binding FilterText, UpdateSourceTrigger=PropertyChanged}"
|
||||
Width="250" VerticalAlignment="Center"
|
||||
Background="{StaticResource BgPanelBrush}"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"
|
||||
BorderBrush="{StaticResource BorderDimBrush}"
|
||||
CaretBrush="{StaticResource TextPrimaryBrush}"
|
||||
Padding="8,6" FontSize="12" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<CheckBox Content="Auto-Scroll" IsChecked="{Binding AutoScroll}"
|
||||
Foreground="{StaticResource TextPrimaryBrush}"
|
||||
VerticalAlignment="Center" Margin="0,0,12,0" />
|
||||
<Button Content="📋 Copy All" Style="{StaticResource SecondaryButton}"
|
||||
Command="{Binding CopyAllCommand}" Margin="0,0,8,0" />
|
||||
<Button Content="🗑 Clear" Style="{StaticResource DangerButton}"
|
||||
Command="{Binding ClearCommand}" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Log output -->
|
||||
<Border Style="{StaticResource Card}" Padding="2">
|
||||
<ListBox x:Name="LogList"
|
||||
ItemsSource="{Binding FilteredLogLines}"
|
||||
Background="#0A0A0C"
|
||||
BorderThickness="0"
|
||||
FontFamily="Cascadia Mono, Consolas, Courier New"
|
||||
FontSize="11.5"
|
||||
Foreground="{StaticResource TextSecondaryBrush}"
|
||||
VirtualizingPanel.IsVirtualizing="True"
|
||||
VirtualizingPanel.VirtualizationMode="Recycling"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Auto">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Padding" Value="10,3" />
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextSecondaryBrush}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<Border x:Name="Bd" Background="{TemplateBinding Background}"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="Bd" Property="Background" Value="#1AFFFFFF" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
</ListBox>
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,38 @@
|
||||
using System.Collections.Specialized;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SpdUp.Views;
|
||||
|
||||
public partial class DebugLogView : UserControl
|
||||
{
|
||||
public DebugLogView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Auto-scroll to bottom when new items are added
|
||||
if (LogList.ItemsSource is INotifyCollectionChanged ncc)
|
||||
{
|
||||
ncc.CollectionChanged += (_, _) =>
|
||||
{
|
||||
if (DataContext is ViewModels.DebugLogViewModel vm && vm.AutoScroll && LogList.Items.Count > 0)
|
||||
{
|
||||
LogList.ScrollIntoView(LogList.Items[^1]);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Loaded += (_, _) =>
|
||||
{
|
||||
if (LogList.ItemsSource is INotifyCollectionChanged ncc2)
|
||||
{
|
||||
ncc2.CollectionChanged += (_, _) =>
|
||||
{
|
||||
if (DataContext is ViewModels.DebugLogViewModel vm && vm.AutoScroll && LogList.Items.Count > 0)
|
||||
{
|
||||
LogList.ScrollIntoView(LogList.Items[^1]);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<UserControl x:Class="SpdUp.Views.GameLibraryView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,0,0,12">
|
||||
<Button Style="{StaticResource PrimaryButton}" Content="➕ Add Game"
|
||||
Command="{Binding AddGameCommand}" Margin="0,0,8,0" />
|
||||
<Button Style="{StaticResource DangerButton}" Content="🗑 Remove Selected"
|
||||
Command="{Binding RemoveGameCommand}" />
|
||||
</StackPanel>
|
||||
|
||||
<Border Style="{StaticResource Card}" Padding="0">
|
||||
<DataGrid ItemsSource="{Binding Games}" SelectedItem="{Binding SelectedGame}"
|
||||
AutoGenerateColumns="False" IsReadOnly="True" CanUserSortColumns="True"
|
||||
MinHeight="300">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="*" />
|
||||
<DataGridTextColumn Header="Process" Binding="{Binding ProcessName}" Width="140" />
|
||||
<DataGridTextColumn Header="Source" Binding="{Binding LauncherSource}" Width="100" />
|
||||
<DataGridTextColumn Header="Path" Binding="{Binding ExecutablePath}" Width="2*" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SpdUp.Views;
|
||||
|
||||
public partial class GameLibraryView : UserControl
|
||||
{
|
||||
public GameLibraryView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
<UserControl x:Class="SpdUp.Views.MonitorView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:conv="clr-namespace:SpdUp.Converters">
|
||||
|
||||
<UserControl.Resources>
|
||||
<conv:PercentToColorConverter x:Key="PctColor" />
|
||||
</UserControl.Resources>
|
||||
|
||||
<StackPanel>
|
||||
<TextBlock Text="Live System Monitoring" FontSize="14" FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" Margin="0,0,0,16" />
|
||||
|
||||
<!-- CPU -->
|
||||
<Border Style="{StaticResource Card}" Margin="0,0,0,8">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="140" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="80" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="CPU" FontSize="14" FontWeight="SemiBold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" VerticalAlignment="Center" />
|
||||
<ProgressBar Grid.Column="1" Height="16" Maximum="100"
|
||||
Value="{Binding Main.CpuUsage, Mode=OneWay}" Margin="12,0"
|
||||
Foreground="{Binding Main.CpuUsage, Converter={StaticResource PctColor}}"
|
||||
Background="{StaticResource BgPanelBrush}" />
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right"
|
||||
FontSize="16" FontWeight="Bold"
|
||||
Foreground="{Binding Main.CpuUsage, Converter={StaticResource PctColor}}"
|
||||
Text="{Binding Main.CpuUsage, StringFormat={}{0:F1}%}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- RAM -->
|
||||
<Border Style="{StaticResource Card}" Margin="0,0,0,8">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="140" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="80" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0">
|
||||
<TextBlock Text="RAM" FontSize="14" FontWeight="SemiBold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" />
|
||||
<TextBlock FontSize="10" Foreground="{StaticResource TextSecondaryBrush}">
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}{0:F0} / {1:F0} MB">
|
||||
<Binding Path="Main.RamUsedMB" />
|
||||
<Binding Path="Main.RamTotalMB" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<ProgressBar Grid.Column="1" Height="16" Maximum="100"
|
||||
Value="{Binding Main.RamUsagePercent, Mode=OneWay}" Margin="12,0"
|
||||
Foreground="{Binding Main.RamUsagePercent, Converter={StaticResource PctColor}}"
|
||||
Background="{StaticResource BgPanelBrush}" />
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right"
|
||||
FontSize="16" FontWeight="Bold"
|
||||
Foreground="{Binding Main.RamUsagePercent, Converter={StaticResource PctColor}}"
|
||||
Text="{Binding Main.RamUsagePercent, StringFormat={}{0:F1}%}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- GPU -->
|
||||
<Border Style="{StaticResource Card}" Margin="0,0,0,8">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="140" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="80" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="GPU" FontSize="14" FontWeight="SemiBold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" VerticalAlignment="Center" />
|
||||
<ProgressBar Grid.Column="1" Height="16" Maximum="100"
|
||||
Value="{Binding Main.GpuUsage, Mode=OneWay}" Margin="12,0"
|
||||
Foreground="{StaticResource AccentPurpleBrush}"
|
||||
Background="{StaticResource BgPanelBrush}" />
|
||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right"
|
||||
FontSize="16" FontWeight="Bold" Foreground="{StaticResource AccentPurpleBrush}"
|
||||
Text="{Binding Main.GpuUsage, StringFormat={}{0:F1}%}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Temperatures Row -->
|
||||
<UniformGrid Columns="3" Margin="0,4,0,0">
|
||||
<Border Style="{StaticResource Card}" Margin="0,0,8,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="CPU Temperature" Style="{StaticResource MetricLabel}" />
|
||||
<TextBlock Style="{StaticResource MetricValue}" FontSize="22"
|
||||
Foreground="{StaticResource AccentOrangeBrush}"
|
||||
Text="{Binding Main.CpuTemp, StringFormat={}{0:F0}°C}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{StaticResource Card}" Margin="4,0,4,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="GPU Temperature" Style="{StaticResource MetricLabel}" />
|
||||
<TextBlock Style="{StaticResource MetricValue}" FontSize="22"
|
||||
Foreground="{StaticResource AccentOrangeBrush}"
|
||||
Text="{Binding Main.GpuTemp, StringFormat={}{0:F0}°C}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Style="{StaticResource Card}" Margin="8,0,0,0">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Network Ping" Style="{StaticResource MetricLabel}" />
|
||||
<TextBlock Style="{StaticResource MetricValue}" FontSize="22"
|
||||
Foreground="{StaticResource AccentCyanBrush}"
|
||||
Text="{Binding Main.PingMs, StringFormat={}{0:F0} ms}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</UniformGrid>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SpdUp.Views;
|
||||
|
||||
public partial class MonitorView : UserControl
|
||||
{
|
||||
public MonitorView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<UserControl x:Class="SpdUp.Views.ProcessManagerView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,0,0,12">
|
||||
<Button Style="{StaticResource SecondaryButton}" Content="🔄 Refresh"
|
||||
Command="{Binding RefreshCommand}" Margin="0,0,8,0" />
|
||||
<Button Style="{StaticResource DangerButton}" Content="❌ Kill Process"
|
||||
Command="{Binding KillProcessCommand}" Margin="0,0,8,0" />
|
||||
<Button Style="{StaticResource SecondaryButton}" Content="⬆ Set High Priority"
|
||||
Command="{Binding SetHighPriorityCommand}" Margin="0,0,8,0" />
|
||||
<Button Style="{StaticResource SecondaryButton}" Content="↔ Set Normal Priority"
|
||||
Command="{Binding SetNormalPriorityCommand}" />
|
||||
</StackPanel>
|
||||
|
||||
<Border Style="{StaticResource Card}" Padding="0">
|
||||
<DataGrid ItemsSource="{Binding Processes}" SelectedItem="{Binding SelectedProcess}"
|
||||
AutoGenerateColumns="False" IsReadOnly="True" CanUserSortColumns="True"
|
||||
MinHeight="400">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="PID" Binding="{Binding Pid}" Width="70" />
|
||||
<DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="180" />
|
||||
<DataGridTextColumn Header="Window" Binding="{Binding WindowTitle}" Width="*" />
|
||||
<DataGridTextColumn Header="Memory (MB)" Binding="{Binding MemoryMB, StringFormat=F1}" Width="100" />
|
||||
<DataGridTextColumn Header="Priority" Binding="{Binding PriorityClass}" Width="100" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SpdUp.Views;
|
||||
|
||||
public partial class ProcessManagerView : UserControl
|
||||
{
|
||||
public ProcessManagerView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<UserControl x:Class="SpdUp.Views.ServiceManagerView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,0,0,12">
|
||||
<Button Style="{StaticResource SecondaryButton}" Content="🔄 Refresh"
|
||||
Command="{Binding RefreshCommand}" Margin="0,0,8,0" />
|
||||
<Button Style="{StaticResource DangerButton}" Content="⏹ Stop Service"
|
||||
Command="{Binding StopServiceCommand}" Margin="0,0,8,0" />
|
||||
<Button Style="{StaticResource PrimaryButton}" Content="▶ Start Service"
|
||||
Command="{Binding StartServiceCommand}" />
|
||||
</StackPanel>
|
||||
|
||||
<Border Style="{StaticResource Card}" Padding="0">
|
||||
<DataGrid ItemsSource="{Binding Services}" SelectedItem="{Binding SelectedService}"
|
||||
AutoGenerateColumns="False" IsReadOnly="True" CanUserSortColumns="True"
|
||||
MinHeight="400">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Service" Binding="{Binding ServiceName}" Width="140" />
|
||||
<DataGridTextColumn Header="Display Name" Binding="{Binding DisplayName}" Width="200" />
|
||||
<DataGridTextColumn Header="Status" Binding="{Binding Status}" Width="100" />
|
||||
<DataGridTextColumn Header="Description" Binding="{Binding Description}" Width="*" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SpdUp.Views;
|
||||
|
||||
public partial class ServiceManagerView : UserControl
|
||||
{
|
||||
public ServiceManagerView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
<UserControl x:Class="SpdUp.Views.SettingsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<StackPanel MaxWidth="600">
|
||||
<!-- General -->
|
||||
<TextBlock Text="General" FontSize="16" FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" Margin="0,0,0,12" />
|
||||
<Border Style="{StaticResource Card}">
|
||||
<StackPanel>
|
||||
<CheckBox Content="Auto-detect games" IsChecked="{Binding AutoDetectGames}" />
|
||||
<CheckBox Content="Auto-boost when game starts" IsChecked="{Binding AutoBoostOnGameLaunch}" />
|
||||
<CheckBox Content="Minimize to system tray" IsChecked="{Binding MinimizeToTray}" />
|
||||
<CheckBox Content="Start with Windows" IsChecked="{Binding StartWithWindows}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Monitoring -->
|
||||
<TextBlock Text="Monitoring" FontSize="16" FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" Margin="0,16,0,12" />
|
||||
<Border Style="{StaticResource Card}">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Monitoring interval (ms)" FontSize="12"
|
||||
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,0,0,4" />
|
||||
<TextBox Text="{Binding MonitoringInterval, UpdateSourceTrigger=PropertyChanged}" Width="120"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock Text="Ping target" FontSize="12"
|
||||
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,12,0,4" />
|
||||
<TextBox Text="{Binding PingTarget, UpdateSourceTrigger=PropertyChanged}" Width="200"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock Text="Preferred DNS" FontSize="12"
|
||||
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,12,0,4" />
|
||||
<TextBox Text="{Binding PreferredDns, UpdateSourceTrigger=PropertyChanged}" Width="200"
|
||||
HorizontalAlignment="Left" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Widget -->
|
||||
<TextBlock Text="Desktop Widget" FontSize="16" FontWeight="Bold"
|
||||
Foreground="{StaticResource TextPrimaryBrush}" Margin="0,16,0,12" />
|
||||
<Border Style="{StaticResource Card}">
|
||||
<StackPanel>
|
||||
<CheckBox Content="Compact mode" IsChecked="{Binding WidgetCompactMode}" />
|
||||
<CheckBox Content="Click-through mode" IsChecked="{Binding WidgetClickThrough}" />
|
||||
|
||||
<TextBlock Text="Widget opacity" FontSize="12"
|
||||
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,12,0,4" />
|
||||
<Slider Minimum="0.2" Maximum="1.0" Value="{Binding WidgetOpacity}"
|
||||
TickFrequency="0.05" IsSnapToTickEnabled="True" Width="200"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock Text="Widget update interval (ms)" FontSize="12"
|
||||
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,12,0,4" />
|
||||
<TextBox Text="{Binding WidgetUpdateInterval, UpdateSourceTrigger=PropertyChanged}" Width="120"
|
||||
HorizontalAlignment="Left" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Trans flag & attribution -->
|
||||
<StackPanel Margin="0,24,0,0" HorizontalAlignment="Center">
|
||||
<Grid Height="24" Width="200" Margin="0,0,0,8">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle Grid.Row="0" Fill="{StaticResource TransBlueBrush}" RadiusX="4" RadiusY="4"/>
|
||||
<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="4" RadiusY="4"/>
|
||||
</Grid>
|
||||
<TextBlock Text="Made with ❤️ by Mandy" FontSize="12" HorizontalAlignment="Center"
|
||||
Foreground="{StaticResource TextSecondaryBrush}" />
|
||||
<TextBlock Text="SpdUp v1.0 – Gaming Booster" FontSize="10" HorizontalAlignment="Center"
|
||||
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,4,0,0" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,8 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SpdUp.Views;
|
||||
|
||||
public partial class SettingsView : UserControl
|
||||
{
|
||||
public SettingsView() => InitializeComponent();
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
<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>
|
||||
@@ -0,0 +1,83 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using SpdUp.ViewModels;
|
||||
|
||||
namespace SpdUp.Views;
|
||||
|
||||
/// <summary>
|
||||
/// Floating desktop widget – borderless, transparent, always-on-top.
|
||||
/// </summary>
|
||||
public partial class WidgetWindow : Window
|
||||
{
|
||||
private bool _expanded;
|
||||
|
||||
// ── Win32 click-through support ───────────────────────────────────
|
||||
private const int GWL_EXSTYLE = -20;
|
||||
private const int WS_EX_TRANSPARENT = 0x00000020;
|
||||
private const int WS_EX_TOOLWINDOW = 0x00000080;
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern int GetWindowLong(IntPtr hwnd, int index);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern int SetWindowLong(IntPtr hwnd, int index, int newStyle);
|
||||
|
||||
public WidgetWindow(MainViewModel vm)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = vm;
|
||||
|
||||
// Restore position from settings
|
||||
Left = vm.Settings.WidgetOpacity > 0 ? 100 : 100; // default
|
||||
Top = 100;
|
||||
|
||||
Loaded += (_, _) =>
|
||||
{
|
||||
// Make it a tool window (no taskbar entry)
|
||||
var hwnd = new WindowInteropHelper(this).Handle;
|
||||
var exStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
|
||||
SetWindowLong(hwnd, GWL_EXSTYLE, exStyle | WS_EX_TOOLWINDOW);
|
||||
|
||||
Opacity = vm.Settings.WidgetOpacity;
|
||||
|
||||
if (!vm.Settings.WidgetCompactMode)
|
||||
ToggleExpand();
|
||||
};
|
||||
}
|
||||
|
||||
private void Widget_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (e.LeftButton == MouseButtonState.Pressed)
|
||||
DragMove();
|
||||
}
|
||||
|
||||
private void Widget_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
ToggleExpand();
|
||||
}
|
||||
|
||||
private void Toggle_Click(object sender, RoutedEventArgs e) => ToggleExpand();
|
||||
private void Close_Click(object sender, RoutedEventArgs e) => Close();
|
||||
|
||||
private void ToggleExpand()
|
||||
{
|
||||
_expanded = !_expanded;
|
||||
ExpandedPanel.Visibility = _expanded ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable click-through: all mouse events pass through to windows below.
|
||||
/// </summary>
|
||||
public void SetClickThrough(bool enable)
|
||||
{
|
||||
var hwnd = new WindowInteropHelper(this).Handle;
|
||||
var exStyle = GetWindowLong(hwnd, GWL_EXSTYLE);
|
||||
|
||||
if (enable)
|
||||
SetWindowLong(hwnd, GWL_EXSTYLE, exStyle | WS_EX_TRANSPARENT);
|
||||
else
|
||||
SetWindowLong(hwnd, GWL_EXSTYLE, exStyle & ~WS_EX_TRANSPARENT);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user