public Panel(string t, VLCPage tgt, string defaultIcon, string filledIcon) { Title = t; Target = tgt; DefaultIcon = defaultIcon; FilledIcon = filledIcon; }
public void GoBack_HideFlyout() { App.SplitShell.HideFlyout(); // Restoring the currentPage CurrentPage = PageTypeToVLCPage(App.ApplicationFrame.CurrentSourcePageType); ViewNavigated(null, CurrentPage); }
public bool IsPageAMainPage(VLCPage p) { return(p == VLCPage.MainPageVideo || p == VLCPage.MainPageMusic || p == VLCPage.MainPageFileExplorer || p == VLCPage.MainPageNetwork); }
private void setFlyoutContent(VLCPage desiredPage, Type t, object param) { // Do not switch the current flyout if it is modal. if (App.SplitShell.IsCurrentFlyoutModal()) { return; } currentFlyout = desiredPage; App.SplitShell.SetFlyoutContentPresenter(t, param); }
bool isFlyout(VLCPage page) { return(page == VLCPage.AlbumPage || page == VLCPage.ArtistPage || page == VLCPage.AddAlbumToPlaylistDialog || page == VLCPage.CreateNewPlaylistDialog || page == VLCPage.ArtistShowsPage || page == VLCPage.PlaylistPage || page == VLCPage.SettingsPage || page == VLCPage.LicensePage || page == VLCPage.SpecialThanksPage || page == VLCPage.CurrentPlaylistPage); }
void VLCPageNavigated(VLCPage page) { if (CurrentPage == page) { return; } CurrentPage = page; Debug.WriteLine(CurrentPage); ViewNavigated.Invoke(null, CurrentPage); if (!App.SplitShell.IsTopBarOpen) { App.SplitShell.ShowTopBar(); } ShowBackButtonIfCanGoBack(); }
public int VLCHomePageToPanelIndex(VLCPage p) { switch (p) { case VLCPage.MainPageVideo: return(1); case VLCPage.MainPageMusic: return(2); case VLCPage.MainPageFileExplorer: return(3); case VLCPage.MainPageNetwork: return(4); default: return(0); } }
public bool IsFlyout(VLCPage page) { return(page == VLCPage.AlbumPage || page == VLCPage.AddAlbumToPlaylistDialog || page == VLCPage.CreateNewPlaylistDialog || page == VLCPage.ArtistShowsPage || page == VLCPage.PlaylistPage || page == VLCPage.LicensePage || page == VLCPage.SpecialThanksPage || page == VLCPage.CurrentPlaylistPage || page == VLCPage.SettingsPageUI || page == VLCPage.SettingsPageMusic || page == VLCPage.SettingsPageVideo || page == VLCPage.SettingsPage || page == VLCPage.VideoPlayerOptionsPanel || page == VLCPage.FeedbackPage || page == VLCPage.TvShowView || page == VLCPage.TrackEditorPage || page == VLCPage.AboutAppView || page == VLCPage.SearchPage || page == VLCPage.MainPageXBOX); }
public bool IsFlyout(VLCPage page) { return(page == VLCPage.AlbumPage || page == VLCPage.AddAlbumToPlaylistDialog || page == VLCPage.CreateNewPlaylistDialog || page == VLCPage.ArtistShowsPage || page == VLCPage.PlaylistPage || page == VLCPage.CurrentPlaylistPage || page == VLCPage.SettingsPageUI || page == VLCPage.SettingsPageMusic || page == VLCPage.SettingsPageVideo || page == VLCPage.SettingsPage || page == VLCPage.VideoPlayerOptionsPanel || page == VLCPage.SubtitlesSettings || page == VLCPage.AudioTracksSettings || page == VLCPage.ChaptersSettings || page == VLCPage.TvShowView || page == VLCPage.TrackEditorPage || page == VLCPage.AboutAppView || page == VLCPage.SearchPage || page == VLCPage.MainPageXBOX || page == VLCPage.ExternalStorageInclude); }
/// <summary> /// This callback is fired for Pages only, not flyouts /// </summary> public void PageNavigatedCallback(Type page) { CurrentPage = PageTypeToVLCPage(page); }
public void GoOnPlaybackStarted(VLCPage desiredPage, object param = null) { _playbackStartedTarget = desiredPage; _playbackStartedParam = param; Locator.PlaybackService.Playback_Opening += onPlaybackStarted; }
public void Go(VLCPage desiredPage, object param = null) { if (!IsFlyout(desiredPage) && desiredPage == CurrentPage) { return; } switch (desiredPage) { case VLCPage.MainPageXBOX: setFlyoutContent(desiredPage, typeof(MainPageXBOX), param); break; case VLCPage.MainPageVideo: case VLCPage.MainPageMusic: case VLCPage.MainPageFileExplorer: case VLCPage.MainPageNetwork: if (App.ApplicationFrame.CurrentSourcePageType != typeof(HomePage)) { App.ApplicationFrame.Navigate(typeof(HomePage)); } HomePageNavigated?.Invoke(null, desiredPage); break; case VLCPage.AlbumPage: setFlyoutContent(desiredPage, typeof(AlbumPageBase), param); break; case VLCPage.SearchPage: setFlyoutContent(desiredPage, typeof(SearchPage), param); break; case VLCPage.SettingsPage: case VLCPage.SettingsPageUI: case VLCPage.SettingsPageMusic: case VLCPage.SettingsPageVideo: setFlyoutContent(desiredPage, typeof(SettingsPage), param); break; case VLCPage.PlaylistPage: setFlyoutContent(desiredPage, typeof(PlaylistPage), param); break; case VLCPage.CurrentPlaylistPage: setFlyoutContent(desiredPage, typeof(MusicPlaylistPage), param); break; case VLCPage.VideoPlayerPage: App.ApplicationFrame.Navigate(typeof(VideoPlayerPage)); break; case VLCPage.MusicPlayerPage: App.ApplicationFrame.Navigate(typeof(MusicPlayerPage)); break; case VLCPage.AddAlbumToPlaylistDialog: setFlyoutContent(desiredPage, typeof(AddAlbumToPlaylistBase), param); break; case VLCPage.CreateNewPlaylistDialog: setFlyoutContent(desiredPage, typeof(CreateNewPlaylist), param); break; case VLCPage.MiniPlayerView: App.ApplicationFrame.Navigate(typeof(MiniPlayerWindow)); break; case VLCPage.VideoPlayerOptionsPanel: setFlyoutContent(desiredPage, typeof(VideoPlayerOptionsPanel), param); break; case VLCPage.SubtitlesSettings: setFlyoutContent(desiredPage, typeof(SubtitlesSettings), param); break; case VLCPage.AudioTracksSettings: setFlyoutContent(desiredPage, typeof(AudioTracksSettings), param); break; case VLCPage.ChaptersSettings: setFlyoutContent(desiredPage, typeof(ChaptersSettings), param); break; case VLCPage.TrackEditorPage: setFlyoutContent(desiredPage, typeof(TrackEditorPage), param); break; case VLCPage.TvShowView: setFlyoutContent(desiredPage, typeof(ShowEpisodesView), param); break; case VLCPage.AboutAppView: setFlyoutContent(desiredPage, typeof(AboutPage), param); break; case VLCPage.ExternalStorageInclude: setFlyoutContent(desiredPage, typeof(ExternalStorageIncludePage), param); break; default: break; } if (App.SplitShell.IsFlyoutOpen && !IsFlyout(desiredPage)) { GoBack_HideFlyout(); } }
Type VLCPageToPageType(VLCPage p) { switch (p) { case VLCPage.None: break; case VLCPage.MainPageVideo: return(typeof(MainPageVideos)); case VLCPage.MainPageMusic: return(typeof(MainPageMusic)); case VLCPage.MainPageFileExplorer: return(typeof(MainPageFileExplorer)); case VLCPage.MainPageNetwork: return(typeof(MainPageNetwork)); case VLCPage.AlbumPage: break; case VLCPage.ArtistPage: break; case VLCPage.ArtistInfoView: break; case VLCPage.PlaylistPage: break; case VLCPage.CurrentPlaylistPage: break; case VLCPage.VideoPlayerPage: break; case VLCPage.MusicPlayerPage: break; case VLCPage.SettingsPage: break; case VLCPage.SpecialThanksPage: break; case VLCPage.ArtistShowsPage: break; case VLCPage.AddAlbumToPlaylistDialog: break; case VLCPage.CreateNewPlaylistDialog: break; case VLCPage.LicensePage: break; case VLCPage.SearchPage: break; case VLCPage.MiniPlayerView: break; case VLCPage.SettingsPageUI: break; case VLCPage.SettingsPageMusic: break; case VLCPage.SettingsPageVideo: break; case VLCPage.VideoPlayerOptionsPanel: break; case VLCPage.TrackEditorPage: break; case VLCPage.FeedbackPage: break; case VLCPage.TvShowView: break; case VLCPage.AboutAppView: break; case VLCPage.MainPageXBOX: break; default: break; } return(null); }
private void ViewNavigated(object o, VLCPage p) { Navigate(p); }
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); }
private void NavigationService_HomePageNavigated(object sender, VLCPage homepage) { VLCPageNavigated(homepage); }
bool isFlyout(VLCPage page) { return page == VLCPage.AlbumPage || page == VLCPage.ArtistPage || page == VLCPage.AddAlbumToPlaylistDialog || page == VLCPage.CreateNewPlaylistDialog || page == VLCPage.ArtistShowsPage || page == VLCPage.PlaylistPage || page == VLCPage.LicensePage || page == VLCPage.SpecialThanksPage || page == VLCPage.CurrentPlaylistPage || page == VLCPage.SearchPage || page == VLCPage.SettingsPageUI || page == VLCPage.SettingsPageMusic || page == VLCPage.SettingsPageVideo || page == VLCPage.SettingsPage; }
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); }
private void ViewNavigated(object sender, VLCPage p) { OnPropertyChanged(nameof(IsMiniPlayerVisible)); }
public void Go(VLCPage desiredPage) { if (!IsFlyout(desiredPage) && desiredPage == CurrentPage) { return; } if (IsFlyout(desiredPage)) { currentFlyout = desiredPage; } switch (desiredPage) { case VLCPage.MainPageXBOX: App.SplitShell.FlyoutContent = typeof(MainPageXBOX); break; case VLCPage.MainPageVideo: case VLCPage.MainPageMusic: case VLCPage.MainPageFileExplorer: case VLCPage.MainPageNetwork: Locator.MainVM.CurrentPanel = Locator.MainVM.Panels.FirstOrDefault(x => x.Target == desiredPage); if (Locator.SettingsVM.MediaCenterMode) { if (App.ApplicationFrame.CurrentSourcePageType != VLCPageToPageType(desiredPage)) { App.ApplicationFrame.Navigate(VLCPageToPageType(desiredPage)); } } else { if (App.ApplicationFrame.CurrentSourcePageType != typeof(HomePage)) { App.ApplicationFrame.Navigate(typeof(HomePage)); } } HomePageNavigated?.Invoke(null, desiredPage); currentHomePage = desiredPage; break; case VLCPage.AlbumPage: App.SplitShell.FlyoutContent = typeof(AlbumPageBase); break; case VLCPage.ArtistPage: if (CurrentPage != VLCPage.MainPageMusic || Locator.MusicLibraryVM.MusicView != Model.Music.MusicView.Artists || (CurrentPage == VLCPage.MainPageMusic && Locator.MusicLibraryVM.MusicView == Model.Music.MusicView.Artists && Window.Current.Bounds.Width < 750)) { App.ApplicationFrame.Navigate(typeof(ArtistPageBase), desiredPage); } break; case VLCPage.SearchPage: App.SplitShell.FlyoutContent = typeof(SearchPage); break; case VLCPage.ArtistInfoView: App.ApplicationFrame.Navigate(typeof(ArtistPageBase), desiredPage); break; case VLCPage.SettingsPage: case VLCPage.SettingsPageUI: case VLCPage.SettingsPageMusic: case VLCPage.SettingsPageVideo: App.SplitShell.FlyoutContent = typeof(SettingsPage); break; case VLCPage.PlaylistPage: App.SplitShell.FlyoutContent = typeof(PlaylistPage); break; case VLCPage.CurrentPlaylistPage: App.SplitShell.FlyoutContent = typeof(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.FlyoutContent = typeof(SpecialThanks); break; case VLCPage.ArtistShowsPage: App.SplitShell.FlyoutContent = typeof(ArtistShowsPage); break; case VLCPage.AddAlbumToPlaylistDialog: App.SplitShell.FlyoutContent = typeof(AddAlbumToPlaylistBase); break; case VLCPage.CreateNewPlaylistDialog: App.SplitShell.FlyoutContent = typeof(CreateNewPlaylist); break; case VLCPage.LicensePage: App.SplitShell.FlyoutContent = typeof(LicensePage); break; case VLCPage.MiniPlayerView: App.ApplicationFrame.Navigate(typeof(MiniPlayerWindow)); break; case VLCPage.VideoPlayerOptionsPanel: App.SplitShell.FlyoutContent = typeof(VideoPlayerOptionsPanel); break; case VLCPage.TrackEditorPage: App.SplitShell.FlyoutContent = typeof(TrackEditorPage); break; case VLCPage.FeedbackPage: App.SplitShell.FlyoutContent = typeof(FeedbackPage); break; case VLCPage.TvShowView: App.SplitShell.FlyoutContent = typeof(ShowEpisodesView); break; case VLCPage.AboutAppView: App.SplitShell.FlyoutContent = typeof(AboutPage); break; default: break; } if (App.SplitShell.IsFlyoutOpen && !IsFlyout(desiredPage)) { App.SplitShell.HideFlyout(); } }
public Task Navigate(VLCPage page) { if (!Locator.NavigationService.IsPageAMainPage(page)) { return(Task.FromResult(true)); } return(DispatchHelper.InvokeAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { if (IsPivotItem) { var panel = (Model.Panel) this.DataContext; if (panel.Target != page) { HomePageContentPresenter.Navigate(typeof(BlankPage)); return; } } CurrentHomePage = page; switch (page) { case VLCPage.MainPageVideo: if (HomePageContentPresenter.Content is MainPageVideos) { return; } HomePageContentPresenter.Navigate(typeof(MainPageVideos)); break; case VLCPage.MainPageMusic: if (HomePageContentPresenter.Content is MainPageMusic) { return; } HomePageContentPresenter.Navigate(typeof(MainPageMusic)); break; case VLCPage.MainPageFileExplorer: if (HomePageContentPresenter.Content is MainPageFileExplorer) { return; } HomePageContentPresenter.Navigate(typeof(MainPageFileExplorer)); break; case VLCPage.MainPageNetwork: if (HomePageContentPresenter.Content is MainPageNetwork) { return; } HomePageContentPresenter.Navigate(typeof(MainPageNetwork)); break; case VLCPage.SearchPage: if (HomePageContentPresenter.Content is SearchPage) { return; } HomePageContentPresenter.Navigate(typeof(SearchPage)); break; } })); }
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); }