private void DarkMode_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     DarkModeToggle.Toggle();
     DarkModeHelper.SetState(DarkModeToggle.IsChecked);
     SaveChanges();
 }
 private void DarkMode_OnSwitchToggled(object sender, bool e)
 {
     DarkModeHelper.SetState(e);
     Properties.Settings.Default.DarkMode = e;
     Properties.Settings.Default.Save();
 }
示例#3
0
        public MainWindow()
        {
            if (Settings.Default.UpdateSettings)
            {
                Settings.Default.Upgrade();
                Settings.Default.UpdateSettings = false;
                Settings.Default.Save();
            }

            DarkModeHelper.SetState(Settings.Default.DarkMode);

            _mainPage               = new MainPage(this);
            _systemPage             = new SystemPage(this);
            _selfTestPage           = new SelfTestPage(this);
            _factoryResetPage       = new FactoryResetPage(this);
            _findMyGearPage         = new FindMyGearPage(this);
            _touchpadPage           = new TouchpadPage(this);
            _customActionPage       = new CustomActionPage(this);
            _ambientSoundPage       = new AmbientSoundPage(this);
            _equalizerPage          = new EqualizerPage(this);
            _connectionLostPage     = new ConnectionLostPage(this);
            _deviceSelectPage       = new DeviceSelectPage(this);
            _settingPage            = new SettingPage(this);
            _updatePage             = new UpdatePage(this);
            _advancedPage           = new AdvancedPage(this);
            _unsupportedFeaturePage = new UnsupportedFeaturePage(this);
            _popupSettingPage       = new PopupSettingPage(this);

            InitializeComponent();

            _tbi = new TaskbarIcon();
            Stream iconStream = Application.GetResourceStream(new Uri("pack://*****:*****@"CRITICAL: Unknown Win32 Bluetooth service error");
                Console.WriteLine(e);
            }
        }