Ejemplo n.º 1
0
        private void ShowOverlay()
        {
            App.Telemetry.TrackEvent("Show Now Playing Overlay");

            IsEnhanced = true;

            App.OverrideBackEvent = true;
            SystemNavigationManager.GetForCurrentView().BackRequested += Track_BackRequested;

            var buttonHolderShowAnimation = ButtonHolder.Offset(0, 120, 450).Fade(0, 250);

            buttonHolderShowAnimation.Completed += (o, args) => { ButtonHolder.Visibility = Visibility.Collapsed; };
            buttonHolderShowAnimation.Start();

            EnhanceButton
            .Rotate(180, (float)EnhanceButton.ActualWidth / 2, (float)EnhanceButton.ActualHeight / 2, 450)
            .Offset(0, -1.0f * ((float)RootGrid.ActualHeight - (float)EnhanceButton.ActualHeight - 160), 450)
            .Start();

            MoreInfoScreen.Visibility   = Visibility.Visible;
            MoreInfoPivot.SelectedIndex = 0;
            MoreInfoScreen.Fade(1, 450, 150).Offset(0, 0, 450, 150).Start();

            TrackInfoHolder
            .Offset(0, -1.0f * ((float)RootGrid.ActualHeight - (float)TrackInfoHolder.ActualHeight - 40), 450)
            .Scale(0.8f, 0.8f, 0, 0, 450).Start();

            BlurOverlay.Fade(1, 450).Start();
        }
Ejemplo n.º 2
0
        private void HideOverlay()
        {
            IsEnhanced = false;

            App.OverrideBackEvent = false;
            SystemNavigationManager.GetForCurrentView().BackRequested -= Track_BackRequested;

            ButtonHolder.Visibility = Visibility.Visible;
            ButtonHolder.Offset(0, 0, 450).Fade(1, 250).Start();

            EnhanceButton.Rotate(0, (float)EnhanceButton.ActualWidth / 2, (float)EnhanceButton.ActualHeight / 2, 450).Offset(0, 0, 450).Start();

            var moreInfoAnimation = MoreInfoScreen.Fade(0, 450).Offset(0, (float)RootGrid.ActualHeight, 450);

            moreInfoAnimation.Completed += (o, args) =>
            {
                MoreInfoScreen.Visibility   = Visibility.Collapsed;
                MoreInfoPivot.SelectedIndex = 0;
            };
            moreInfoAnimation.Start();

            TrackInfoHolder.Offset(0, 0, 450).Scale(1, 1, 0, 0, 450).Start();

            BlurOverlay.Fade(0, 450).Start();
        }
Ejemplo n.º 3
0
        void ReleaseDesignerOutlets()
        {
            if (AlbumArtView != null)
            {
                AlbumArtView.Dispose();
                AlbumArtView = null;
            }

            if (BlurOverlay != null)
            {
                BlurOverlay.Dispose();
                BlurOverlay = null;
            }

            if (TrackName != null)
            {
                TrackName.Dispose();
                TrackName = null;
            }

            if (ArtistName != null)
            {
                ArtistName.Dispose();
                ArtistName = null;
            }

            if (InstrumentalTag != null)
            {
                InstrumentalTag.Dispose();
                InstrumentalTag = null;
            }

            if (PlayerIcon != null)
            {
                PlayerIcon.Dispose();
                PlayerIcon = null;
            }

            if (ThumbnailView != null)
            {
                ThumbnailView.Dispose();
                ThumbnailView = null;
            }

            if (SettingsButton != null)
            {
                SettingsButton.Dispose();
                SettingsButton = null;
            }
        }
        private void BlurNewMethod(object obj)
        {
            BlurOverlay.Show();

            Device.BeginInvokeOnMainThread(() =>
            {
                DialogPrompt.ShowMessage(new Prompt()
                {
                    Title    = "Blurred Background",
                    Message  = "Click okay to close",
                    Callback = (result) =>
                    {
                        BlurOverlay.Hide();
                    }
                });
            });
        }
Ejemplo n.º 5
0
        void ReleaseDesignerOutlets()
        {
            if (ProgressBar != null)
            {
                ProgressBar.Dispose();
                ProgressBar = null;
            }

            if (ProgressBackground != null)
            {
                ProgressBackground.Dispose();
                ProgressBackground = null;
            }

            if (MainScroll != null)
            {
                MainScroll.Dispose();
                MainScroll = null;
            }

            if (LyricsTextView != null)
            {
                LyricsTextView.Dispose();
                LyricsTextView = null;
            }

            if (AlbumArtView != null)
            {
                AlbumArtView.Dispose();
                AlbumArtView = null;
            }

            if (BlurOverlay != null)
            {
                BlurOverlay.Dispose();
                BlurOverlay = null;
            }

            if (TrackName != null)
            {
                TrackName.Dispose();
                TrackName = null;
            }

            if (ArtistName != null)
            {
                ArtistName.Dispose();
                ArtistName = null;
            }

            if (ThumbnailView != null)
            {
                ThumbnailView.Dispose();
                ThumbnailView = null;
            }

            if (PlayerIcon != null)
            {
                PlayerIcon.Dispose();
                PlayerIcon = null;
            }

            if (ExplicitTag != null)
            {
                ExplicitTag.Dispose();
                ExplicitTag = null;
            }

            if (OpenInBrowserButton != null)
            {
                OpenInBrowserButton.Dispose();
                OpenInBrowserButton = null;
            }

            if (ChangeTextSizeButton != null)
            {
                ChangeTextSizeButton.Dispose();
                ChangeTextSizeButton = null;
            }

            if (SettingsButton != null)
            {
                SettingsButton.Dispose();
                SettingsButton = null;
            }
        }