// Apply settings public void UpdateSettingsChanged(bool refreshMenu = false) { QuickPrefix = Settings.Default.PrefixName; _prefer1000Px = Settings.Default.Prefer1000px; _preferWebP = Settings.Default.PreferWebP; _previewSteps = Settings.Default.PreviewSteps; _preloadRange = _previewSteps; _specialFolders.Clear(); ConvertDictionary d = new ConvertDictionary(); Dictionary <string, SolidColorBrush> newD = d.Read(Settings.Default.FolderColors); _specialFolders = newD; if (refreshMenu) { CreateSortMenu(); } OpenInWaifu.Visibility = Settings.Default.Experimental ? Visibility.Visible : Visibility.Collapsed; WebPConvertMenu.Visibility = Settings.Default.Experimental ? Visibility.Visible : Visibility.Collapsed; OpenInWaifu2.Visibility = Settings.Default.Experimental ? Visibility.Visible : Visibility.Collapsed; UpdateTitle(); UpdateInfobar(); }
public object ConvertBack(object value, Type targetType, object parameter, string language) { return(ConvertDictionary.FirstOrDefault(kv => kv.Value == value).Key); }