Exemple #1
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 #2
0
        public HohoemaPlaylist(HohoemaApp hohoemaApp, PlaylistSettings playlistSettings, StorageFolder playlistSaveFolder, HohoemaViewManager viewMan)
        {
            HohoemaApp          = hohoemaApp;
            PlaylistSettings    = playlistSettings;
            PlaylistsSaveFolder = playlistSaveFolder;
            Player         = new PlaylistPlayer(this, playlistSettings);
            _SecondaryView = viewMan;

            Playlists = new ReadOnlyObservableCollection <LocalMylist>(_Playlists);

            MakeDefaultPlaylist();
            CurrentPlaylist = DefaultPlaylist;

            if (ApplicationData.Current.LocalSettings.Values.TryGetValue(nameof(PlayerDisplayType), out var showInMainView))
            {
                try
                {
                    _PlayerDisplayType = (bool)showInMainView ? PlayerDisplayType.PrimaryView : PlayerDisplayType.SecondaryView;
                }
                catch { }
            }

            Player.PlayRequested += Player_PlayRequested;
        }