public MainWindow()
        {
            if (Settings.Default.DarkMode2 == DarkMode.Unset)
            {
                Settings.Default.DarkMode2 = (DarkMode)Convert.ToInt32(Settings.Default.DarkMode);
                Settings.Default.Save();
            }

            DarkModeHelper.Update();

            _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);
            }
            catch (InvalidOperationException e)
            {
                SentrySdk.AddBreadcrumb(e.Message, "bluetoothInRange", level: Sentry.Protocol.BreadcrumbLevel.Error);
                Console.WriteLine(@"CRITICAL: Unknown Win32 Bluetooth service error");
                Console.WriteLine(e);
                MessageBox.Show(e.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }