private void MultiSelectListView_SelectionModeChanged(object sender, RoutedEventArgs e) { var bar = Bar as CommandBar; if (SongList.SelectionMode == ListViewSelectionMode.Multiple) { HardwareButtons.BackPressed += HardwareButtonsOnBackPressed; UiBlockerUtility.BlockNavigation(false); SongList.SelectedIndex = -1; bar.Visibility = Visibility.Visible; SongList.IsItemClickEnabled = false; AppBarHelper.SaveState(bar); AppBarHelper.SwitchState(bar, _selectionModeCommands, _selectionSecondaryModeCommands); } else if (!SongList.IsItemClickEnabled) { HardwareButtons.BackPressed -= HardwareButtonsOnBackPressed; UiBlockerUtility.Unblock(); SongList.IsItemClickEnabled = true; (Bar as CommandBar).Visibility = CollectionPivot.SelectedIndex == 3 ? Visibility.Visible : Visibility.Collapsed; AppBarHelper.RestorePreviousState(bar); } }
public override void NavigatedTo(NavigationMode mode, object e) { base.NavigatedTo(mode, e); UiBlockerUtility.BlockNavigation(); ScreenTimeoutHelper.PreventTimeout(); App.Locator.PBar.IsFirstRun = true; isDone = false; GetMetadata(); }
public static void OpenAddToPlaylistPage() { if (_AddToPlaylistPage != null) { return; } _AddToPlaylistPage = new AddToPlaylistPage(); ModalSheetUtility.Show(_AddToPlaylistPage); UiBlockerUtility.BlockNavigation(); }
public static async Task <T> ShowAsync <T>(IModalSheetPageAsync <T> sheet) { UiBlockerUtility.BlockNavigation(); // UiBlockerUtility.Block(""); Show(sheet); var results = await sheet.GetResultsAsync(); Hide(sheet); UiBlockerUtility.Unblock(); return(results); }
public static void OpenVideoPage(object Object) { if (_VideoPage != null) { return; } _VideoPage = new VideoPage(); ModalSheetUtility.PassingObject = Object; UiBlockerUtility.BlockNavigation(); ModalSheetUtility.Show(_VideoPage); }
public static void OpenNowPlaying() { if (_currentSheet != null) { return; } _currentSheet = new NowPlayingSheet(); UiBlockerUtility.BlockNavigation(); ModalSheetUtility.Show(_currentSheet); App.SupressBackEvent += HardwareButtonsOnBackPressed; }
public static void OpenSearchCollectionPage() { if (_SearchCollectionPage != null) { return; } _SearchCollectionPage = new SearchCollectionPage(); UiBlockerUtility.BlockNavigation(); ModalSheetUtility.Show(_SearchCollectionPage); App.SupressBackEvent += HardwareButtonsOnBackPressedForSearchCollection; }
public static void OpenImportRefreshPage(int i) { if (_ImportRefreshPage != null) { return; } _ImportRefreshPage = new ImportRefreshPage(); _ImportRefreshPage.index = i; UiBlockerUtility.BlockNavigation(); ModalSheetUtility.Show(_ImportRefreshPage); }
public static void OpenColorViewPage() { if (_ColorView != null) { return; } _ColorView = new ColorView(); UiBlockerUtility.BlockNavigation(); ModalSheetUtility.Show(_ColorView); App.SupressBackEvent += HardwareButtonsOnBackPressedForColorViewPage; }
public static void OpenAddedFoldersPage() { if (_AddedFolders != null) { return; } _AddedFolders = new AddedFolders(); UiBlockerUtility.BlockNavigation(); ModalSheetUtility.Show(_AddedFolders); App.SupressBackEvent += HardwareButtonsOnBackPressedForAddedFoldersPage; }
public static void OpenAddAPlaylistPage() { if (_AddAPlaylist != null) { return; } _AddAPlaylist = new AddAPlaylist(); UiBlockerUtility.BlockNavigation(); ModalSheetUtility.Show(_AddAPlaylist); App.SupressBackEvent += HardwareButtonsOnBackPressedForAddAPlaylist; }
public static void OpenEditTrackMetadataPage(object Object) { if (_EditTrackMetadata != null) { return; } _EditTrackMetadata = new EditTrackMetadata(); ModalSheetUtility.PassingObject = Object; UiBlockerUtility.BlockNavigation(); ModalSheetUtility.Show(_EditTrackMetadata); }
private void ToMultiMode() { UiBlockerUtility.BlockNavigation(false); SongList.SelectedIndex = -1; var bar = Bar as CommandBar; SongList.IsItemClickEnabled = false; AppBarHelper.SaveState(bar); AppBarHelper.SwitchState(bar, _selectionModeCommands); }
public static void OpenManualMatchPage(Song song) { if (_ManualMatchPage != null) { return; } _ManualMatchPage = new ManualMatchPage(); UiBlockerUtility.BlockNavigation(); ModalSheetUtility.PassingObject = song; //App.Locator.Manual.ReceiveSong(song); ModalSheetUtility.Show(_ManualMatchPage); App.SupressBackEvent += HardwareButtonsOnBackPressedForManualMatchPage; }
private void OnSelectionChanged(object sender, SelectionChangedEventArgs e) { //var bar = Bar as CommandBar; if (SongList.SelectionMode == ListViewSelectionMode.Multiple) { App.SupressBackEvent += HardwareButtonsOnBackPressed; UiBlockerUtility.BlockNavigation(false); SongList.IsItemClickEnabled = false; //OptionButton.Visibility = Visibility.Visible; SongList.SelectionMode = ListViewSelectionMode.Multiple; } else if (!SongList.IsItemClickEnabled) { App.SupressBackEvent -= HardwareButtonsOnBackPressed; UiBlockerUtility.Unblock(); SongList.IsItemClickEnabled = true; //OptionButton.Visibility = Visibility.Collapsed; SongList.SelectionMode = ListViewSelectionMode.None; } }
private void OnSelectionChanged(bool isMulti = false) { if (isMulti) { App.SupressBackEvent += HardwareButtonsOnBackPressed; UiBlockerUtility.BlockNavigation(false); SongList.IsItemClickEnabled = false; OptionButton.Visibility = Visibility.Visible; SongViewer._showFlyout = false; SelectCancelTextBlock.Text = "Cancel"; //SongList.SelectionMode = ListViewSelectionMode.Multiple; } else { App.SupressBackEvent -= HardwareButtonsOnBackPressed; UiBlockerUtility.Unblock(); SongList.IsItemClickEnabled = true; OptionButton.Visibility = Visibility.Collapsed; SongViewer._showFlyout = true; SelectCancelTextBlock.Text = "Select"; //SongList.SelectionMode = ListViewSelectionMode.None; } }