예제 #1
0
        private async void OnLoaded(object sender, RoutedEventArgs e)
        {
            if (await _vm.LrcAutoSearch())
            {
                await Task.Delay(200);

                LrcPresenter.ForceRefresh();
            }
        }
예제 #2
0
 private void OnLyricsRightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     if (LrcPresenter.AllowScroll &&
         e.PointerDeviceType == Windows.Devices.Input.PointerDeviceType.Mouse)
     {
         LrcPresenter.AllowScroll = false;
         LrcPresenter.ForceRefresh();
     }
 }
예제 #3
0
        private async void OnLeavingBackground(object sender, Windows.ApplicationModel.LeavingBackgroundEventArgs e)
        {
            _vm.RegisterEvents();
            if (await _vm.LrcAutoSearch())
            {
                await Task.Delay(200);

                LrcPresenter.ForceRefresh();
            }
        }
        // page loaded
        private async void OnShowNowPlayingStoryboardCompleted(object sender, object e)
        {
            EnableManipulation();
            var sb = sender as Storyboard;

            sb.Completed -= OnShowNowPlayingStoryboardCompleted;
            RelativePanel.SetAlignTopWithPanel(BottomArea, true);
            BottomArea.Height     = double.NaN;
            _isInNowPlaying       = true;
            EventPanel.Visibility = Visibility.Collapsed;

            if (await LrcAutoSearch())
            {
                await Task.Delay(200);

                LrcPresenter.ForceRefresh();
            }
        }
        private async void OnNowPlayingLeavingBackground(object sender, Windows.ApplicationModel.LeavingBackgroundEventArgs e)
        {
            PlaybackControl.Instance.Player.CurrentStateChanged += NowPlayingOnPlaybackStateChanged;
            PlaylistManager.Instance.FavoriteChanged            += NowPlayingOnFavoriteChanged;
            PlaybackControl.Instance.NowPlayingChanged          += NowPlayingOnNowPlayingItemChanged;
            _nowPlayingTimer = new DispatcherTimer {
                Interval = TimeSpan.FromSeconds(0.5)
            };
            _nowPlayingTimer.Tick += NowPlayingTimerOnTick;
            UpdateNowPlayingStatus();
            if (StateGroup.CurrentState == LyricsState)
            {
                _displayRequest.RequestActive();
            }
            if (await LrcAutoSearch())
            {
                await Task.Delay(200);

                LrcPresenter.ForceRefresh();
            }
        }
예제 #6
0
 private void OnOffsetDownClick(object sender, RoutedEventArgs e)
 {
     LrcPresenter.UpdateOffset(TimeSpan.FromSeconds(1));
 }