private void OnUserPrefsDatabaseChangedEvent(PreferenceChanged preferenceChanged) { switch (preferenceChanged) { case PreferenceChanged.ShowReading: OnShowReadingToggle(); break; case PreferenceChanged.ShowPronunication: OnShowPronunciationToggle(); break; case PreferenceChanged.ReadMode: ChangeReadMode(); break; default: break; } }
protected virtual void OnPreferenceChanged(string key) => PreferenceChanged?.Invoke(this, new PreferenceChangedEventArgs(key));
protected virtual void OnPreferenceChanged(Preference preference) { PreferenceChanged?.Invoke(this, new PreferenceChangedEventArgs(preference)); }
private static void OnPreferenceChanged(object value, [CallerMemberName] string preferenceName = null) => PreferenceChanged?.Invoke(new PreferenceChangedEventArgs(preferenceName, value));