Ejemplo n.º 1
0
 public void Go(VLCPage desiredPage)
 {
     if (!isFlyout(desiredPage) && desiredPage == CurrentPage) return;
     switch (desiredPage)
     {
         case VLCPage.MainPageHome:
             App.ApplicationFrame.Navigate(typeof(MainPageHome));
             Locator.MainVM.CurrentPanel = Locator.MainVM.Panels[0];
             break;
         case VLCPage.MainPageVideo:
             App.ApplicationFrame.Navigate(typeof(MainPageVideos));
             Locator.MainVM.CurrentPanel = Locator.MainVM.Panels[1];
             break;
         case VLCPage.MainPageMusic:
             App.ApplicationFrame.Navigate(typeof(MainPageMusic));
             Locator.MainVM.CurrentPanel = Locator.MainVM.Panels[2];
             break;
         case VLCPage.MainPageFileExplorer:
             App.ApplicationFrame.Navigate(typeof(MainPageFileExplorer));
             Locator.MainVM.CurrentPanel = Locator.MainVM.Panels[3];
             break;
         case VLCPage.AlbumPage:
             App.SplitShell.RightFlyoutContent = new AlbumPageBase();
             break;
         case VLCPage.ArtistPage:
             App.SplitShell.RightFlyoutContent = new ArtistPageBase();
             break;
         case VLCPage.PlaylistPage:
             App.SplitShell.RightFlyoutContent = new PlaylistPage();
             break;
         case VLCPage.CurrentPlaylistPage:
             App.SplitShell.RightFlyoutContent = new MusicPlaylistPage();
             break;
         case VLCPage.VideoPlayerPage:
             App.ApplicationFrame.Navigate(typeof(VideoPlayerPage));
             break;
         case VLCPage.MusicPlayerPage:
             App.ApplicationFrame.Navigate(typeof(MusicPlayerPage));
             break;
         case VLCPage.SpecialThanksPage:
             App.SplitShell.RightFlyoutContent = new SpecialThanks();
             break;
         case VLCPage.ArtistShowsPage:
             App.SplitShell.RightFlyoutContent = new ArtistShowsPage();
             break;
         case VLCPage.AddAlbumToPlaylistDialog:
             var addToPlaylist = new AddAlbumToPlaylistBase();
             App.SplitShell.RightFlyoutContent = addToPlaylist;
             break;
         case VLCPage.CreateNewPlaylistDialog:
             var createPlaylist = new CreateNewPlaylist();
             App.SplitShell.RightFlyoutContent = createPlaylist;
             break;
         case VLCPage.LicensePage:
             App.SplitShell.RightFlyoutContent = new LicensePage();
             break;
         case VLCPage.SearchPage:
             App.SplitShell.RightFlyoutContent = new SearchPage();
             break;
         case VLCPage.MiniPlayerView:
             Locator.Slideshow.IsPaused = true;
             AppViewHelper.ResizeWindow(false, 400, 80 + AppViewHelper.TitleBarHeight);
             AppViewHelper.SetAppView(Colors.WhiteSmoke);
             App.SplitShell.TopBarVisibility = Visibility.Collapsed;
             App.SplitShell.FooterVisibility = Visibility.Collapsed;
             App.ApplicationFrame.Navigate(typeof(MiniPlayerWindow));
             break;
         // Settings pages
         case VLCPage.SettingsPage:
             App.SplitShell.RightFlyoutContent = new SettingsPage();
             break;
         case VLCPage.SettingsPageUI:
             App.SplitShell.RightFlyoutContent = new SettingsPageUI();
             break;
         case VLCPage.SettingsPageMusic:
             App.SplitShell.RightFlyoutContent = new SettingsPageMusic();
             break;
         case VLCPage.SettingsPageVideo:
             App.SplitShell.RightFlyoutContent = new SettingsPageVideo();
             break;
         default:
             break;
     }
     if (isFlyout(desiredPage))
         CurrentPage = desiredPage;
     ViewNavigated(null, CurrentPage);
 }
Ejemplo n.º 2
0
 public void Go(VLCPage desiredPage)
 {
     if (!isFlyout(desiredPage) && desiredPage == CurrentPage) return;
     switch (desiredPage)
     {
         case VLCPage.MainPageHome:
             App.ApplicationFrame.Navigate(typeof(MainPageHome));
             break;
         case VLCPage.MainPageVideo:
             App.ApplicationFrame.Navigate(typeof(MainPageVideos));
             break;
         case VLCPage.MainPageMusic:
             App.ApplicationFrame.Navigate(typeof(MainPageMusic));
             break;
         case VLCPage.MainPageFileExplorer:
             App.ApplicationFrame.Navigate(typeof(MainPageFileExplorer));
             break;
         case VLCPage.AlbumPage:
             App.SplitShell.RightFlyoutContent = new AlbumPageBase();
             break;
         case VLCPage.ArtistPage:
             App.SplitShell.RightFlyoutContent = new ArtistPageBase();
             break;
         case VLCPage.PlaylistPage:
             App.SplitShell.RightFlyoutContent = new PlaylistPage();
             break;
         case VLCPage.CurrentPlaylistPage:
             App.SplitShell.RightFlyoutContent = new MusicPlaylistPage();
             break;
         case VLCPage.VideoPlayerPage:
             App.ApplicationFrame.Navigate(typeof(VideoPlayerPage));
             break;
         case VLCPage.MusicPlayerPage:
             App.ApplicationFrame.Navigate(typeof(MusicPlayerPage));
             break;
         case VLCPage.SettingsPage:
             App.SplitShell.RightFlyoutContent = new SettingsPage();
             break;
         case VLCPage.SpecialThanksPage:
             App.SplitShell.RightFlyoutContent = new SpecialThanks();
             break;
         case VLCPage.ArtistShowsPage:
             App.SplitShell.RightFlyoutContent = new ArtistShowsPage();
             break;
         case VLCPage.AddAlbumToPlaylistDialog:
             var addToPlaylist = new AddAlbumToPlaylistBase();
             App.SplitShell.RightFlyoutContent = addToPlaylist;
             break;
         case VLCPage.CreateNewPlaylistDialog:
             var createPlaylist = new CreateNewPlaylist();
             App.SplitShell.RightFlyoutContent = createPlaylist;
             break;
         case VLCPage.LicensePage:
             App.SplitShell.RightFlyoutContent = new LicensePage();
             break;
         default:
             break;
     }
     if (isFlyout(desiredPage))
         CurrentPage = desiredPage;
     ViewNavigated(null, CurrentPage);
 }