App.xaml.cs 635 B

1234567891011121314151617181920
  1. using Microsoft.Win32;
  2. using System.Diagnostics;
  3. using System.Windows;
  4. namespace FastGithub.UI
  5. {
  6. /// <summary>
  7. /// App.xaml 的交互逻辑
  8. /// </summary>
  9. public partial class App : Application
  10. {
  11. protected override void OnStartup(StartupEventArgs e)
  12. {
  13. var emulation = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", true);
  14. var key = $"{Process.GetCurrentProcess().ProcessName}.exe";
  15. emulation.SetValue(key, 9000, RegistryValueKind.DWord);
  16. base.OnStartup(e);
  17. }
  18. }
  19. }