private void SetupSaveWithPropertyChanged() { NGSettings.PropertyChangedAsObservable() .Throttle(TimeSpan.FromSeconds(1)) .Subscribe(e => _ = RankingSettings.Save()); RankingSettings.PropertyChangedAsObservable() .Throttle(TimeSpan.FromSeconds(1)) .Subscribe(e => _ = RankingSettings.Save()); CacheSettings.PropertyChangedAsObservable() .Throttle(TimeSpan.FromSeconds(1)) .Subscribe(e => _ = CacheSettings.Save()); AppearanceSettings.PropertyChangedAsObservable() .Throttle(TimeSpan.FromSeconds(1)) .Subscribe(e => _ = AppearanceSettings.Save()); ActivityFeedSettings.PropertyChangedAsObservable() .Throttle(TimeSpan.FromSeconds(1)) .Subscribe(e => _ = ActivityFeedSettings.Save()); PlayerSettings.PropertyChangedAsObservable() .Throttle(TimeSpan.FromSeconds(1)) .Subscribe(e => _ = PlayerSettings.Save()); new[] { PinSettings.PropertyChangedAsObservable().ToUnit(), PinSettings.Pins.CollectionChangedAsObservable().ToUnit(), PinSettings.Pins.ObserveElementPropertyChanged().ToUnit() } .Merge() .Throttle(TimeSpan.FromSeconds(1)) .Subscribe(pair => _ = PinSettings.Save()); }
public PageManager(HohoemaApp hohoemaApp, INavigationService ns, AppearanceSettings appearanceSettings, HohoemaPlaylist playlist) { HohoemaApp = hohoemaApp; NavigationService = ns; AppearanceSettings = appearanceSettings; HohoemaPlaylist = playlist; CurrentPageType = HohoemaPageType.RankingCategoryList; }
public PageManager(HohoemaApp hohoemaApp, INavigationService ns, AppearanceSettings appearanceSettings, HohoemaPlaylist playlist, HohoemaViewManager viewMan, HohoemaDialogService dialogService) { HohoemaApp = hohoemaApp; NavigationService = ns; AppearanceSettings = appearanceSettings; HohoemaPlaylist = playlist; HohoemaViewManager = viewMan; _HohoemaDialogService = dialogService; CurrentPageType = HohoemaPageType.RankingCategoryList; }
public async Task Save() { await RankingSettings.Save(); await PlayerSettings.Save(); await NGSettings.Save(); await CacheSettings.Save(); await PlaylistSettings.Save(); await AppearanceSettings.Save(); }