Пример #1
0
        public static async Task <T> ShowAsync <T>(IModalSheetPageAsync <T> sheet)
        {
            UiBlockerUtility.BlockNavigation();
            Show(sheet);
            Insights.Track("Opened " + sheet.GetType().Name);
            var results = await sheet.GetResultsAsync();

            Hide(sheet);
            Insights.Track("Closed " + typeof(T).Name);
            UiBlockerUtility.Unblock();
            return(results);
        }
        public static void OpenNowPlaying()
        {
            UiBlockerUtility.BlockNavigation();

            ModalSheetUtility.Show(CurrentSheet);

            App.SupressBackEvent += HardwareButtonsOnBackPressed;

            ScreenTimeoutHelper.OnNowPlayingOpened();
            Insights.Track("Opened Now Playing");
            IsActive = true;
        }
Пример #3
0
        private void AddToMenuFlyoutItem_OnClick(object sender, RoutedEventArgs e)
        {
            UiBlockerUtility.BlockNavigation();
            var picker = new PlaylistPicker(_song)
            {
                Action = async playlist =>
                {
                    App.SupressBackEvent -= AppOnSupressBackEvent;
                    UiBlockerUtility.Unblock();
                    ModalSheetUtility.Hide();
                    await App.Locator.CollectionService.AddToPlaylistAsync(playlist, _song).ConfigureAwait(false);
                }
            };

            App.SupressBackEvent += AppOnSupressBackEvent;
            ModalSheetUtility.Show(picker);
        }