public static IReadOnlyList <AudioDescription> GetExtraAudioLevels() { if (!_audioDescriptionsSet) { _audioDescriptionsSet = true; if (IsActive()) { _audioDescriptions.ReplaceEverythingBy_Direct(GetManifest()?["AUDIO_LEVELS"].Select(p => { if (p.Key.EndsWith("_")) { return(null); } var value = p.Value.WrapQuoted(out var unwrap) .Split(',').Select(x => x.Trim()).Where(x => x.Length > 0).ToList(); if (value.Count != 2) { return(null); } return(new AudioDescription { Id = p.Key, DefaultLevel = unwrap(value[1]).As(0.8), DisplayName = unwrap(value[0]) }); }).NonNull() ?? new AudioDescription[0]); } else { _audioDescriptions.Clear(); } } return(_audioDescriptions); }
private void RecreateEmojis() { if (_emojiLoader != null && _informationProvider != null) { Emojis.ReplaceEverythingBy_Direct(_emojiLoader?.GetList() .Select(x => new Emoji(x, _emojiLoader, _informationProvider)) .Where(x => x.Information != null) .OrderBy(x => x.Information.Index)); } else { Emojis.Clear(); } }
public void ClearErrors() { if (_errors.Count == 0) { return; } _errors.Clear(); if (Errors.Count == 0) { OnPropertyChanged(nameof(HasErrors)); CommandManager.InvalidateRequerySuggested(); } }
public UploadLogger([NotNull] BetterObservableCollection <string> destination) { _destination = destination; _destination.Clear(); }