Exemple #1
0
        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());
        }
Exemple #2
0
        public PageManager(HohoemaApp hohoemaApp, INavigationService ns, AppearanceSettings appearanceSettings, HohoemaPlaylist playlist)
        {
            HohoemaApp         = hohoemaApp;
            NavigationService  = ns;
            AppearanceSettings = appearanceSettings;
            HohoemaPlaylist    = playlist;

            CurrentPageType = HohoemaPageType.RankingCategoryList;
        }
Exemple #3
0
        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;
        }
Exemple #4
0
        public async Task Save()
        {
            await RankingSettings.Save();

            await PlayerSettings.Save();

            await NGSettings.Save();

            await CacheSettings.Save();

            await PlaylistSettings.Save();

            await AppearanceSettings.Save();
        }