mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
using Microsoft.Win32;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
|
|
namespace VideoLinkDownloader
|
|
{
|
|
public partial class App : Application
|
|
{
|
|
protected override void OnStartup(StartupEventArgs e)
|
|
{
|
|
base.OnStartup(e);
|
|
var registry = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize");
|
|
// if (registry is null || (int) registry.GetValue("AppsUseLightTheme", 0) == 1)
|
|
if (true)
|
|
{
|
|
Resources.MergedDictionaries.Remove(new ResourceDictionary
|
|
{
|
|
Source = new Uri("Theme.Dark.xaml", UriKind.Relative),
|
|
});
|
|
Resources.MergedDictionaries.Add(new ResourceDictionary
|
|
{
|
|
Source = new Uri("Theme.Light.xaml", UriKind.Relative),
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|