/// <summary> /// Perform a search the moment were initialized /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Browser_IsBrowserInitializedChanged(object sender, EventArgs e) { var args = e as FrameLoadEndEventArgs; ChromiumWebBrowser browser = sender as ChromiumWebBrowser; if (args != null && args.Frame.IsMain) { // https://github.com/cefsharp/CefSharp/issues/3021 if (browser?.CanExecuteJavascriptInMainFrame ?? true) { if (InvokeRequired) { Invoke((MethodInvoker) delegate { Browser_IsBrowserInitializedChanged(sender, e); }); } else { _searchWindow?.UpdateListViewDelayed(); var isGdParsed = _serviceProvider.Get <IDatabaseItemDao>().GetRowCount() > 0; var settingsService = _serviceProvider.Get <SettingsService>(); _cefBrowserHandler.SetDarkMode(settingsService.GetPersistent().DarkMode); _cefBrowserHandler.SetHideItemSkills(settingsService.GetPersistent().HideSkills); _cefBrowserHandler.SetIsGrimParsed(isGdParsed); _cefBrowserHandler.SetOnlineBackupsEnabled(!settingsService.GetLocal().OptOutOfBackups); } } } }
private void cbDarkMode_CheckedChanged(object sender, EventArgs e) { if (_settings.GetPersistent().DarkMode != (sender as FirefoxCheckBox).Checked) { _darkModeToggler.Activate(); _cefBrowserHandler.SetDarkMode((sender as FirefoxCheckBox).Checked); } _settings.GetPersistent().DarkMode = (sender as FirefoxCheckBox).Checked; }
private void cbDarkMode_CheckedChanged(object sender, EventArgs e) { if (_settings.GetPersistent().DarkMode != (sender as FirefoxCheckBox).Checked) { // TODO: No translations for this, will most likely remove the restart requirement _darkModeToggler.Activate(); _cefBrowserHandler.SetDarkMode((sender as FirefoxCheckBox).Checked); } _settings.GetPersistent().DarkMode = (sender as FirefoxCheckBox).Checked; }
/// <summary> /// Perform a search the moment were initialized /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Browser_IsBrowserInitializedChanged(object sender, EventArgs e) { var args = e as FrameLoadEndEventArgs; ChromiumWebBrowser browser = sender as ChromiumWebBrowser; if (args != null && args.Frame.IsMain) { // https://github.com/cefsharp/CefSharp/issues/3021 if (browser?.CanExecuteJavascriptInMainFrame ?? true) { if (InvokeRequired) { Invoke((MethodInvoker) delegate { Browser_IsBrowserInitializedChanged(sender, e); }); } else { _searchWindow?.UpdateListViewDelayed(); var settingsService = _serviceProvider.Get <SettingsService>(); _cefBrowserHandler.SetDarkMode(settingsService.GetPersistent().DarkMode); } } } }