예제 #1
0
        private async void ScrollerBarValueChangedAction(RangeBaseValueChangedEventArgs args)
        {
            if (ContentRoot.ItemsSource != null)
            {
                //Todo : send message to change the content overlay of navigationView

                double result = args.NewValue - ScrollerView.ScrollableHeight;
                if (result >= -200.0)
                {
                    if (_showedCollectionIndex < (_splitedCollectionLength - 1))
                    {
                        ++_showedCollectionIndex;
                        await Task.Run(() =>
                        {
                            DispatcherHelper.CheckBeginInvokeOnUI(() =>
                            {
                                var datas  = SplitedCollection.ElementAt(_showedCollectionIndex);
                                int length = datas.Count;

                                for (int i = 0; i < length; i++)
                                {
                                    ShowedCollection.Add(datas.ElementAt(i));
                                }
                            });
                        });
                    }
                }
            }
        }
예제 #2
0
        private async void ViewBuiltNotificationAction(NotificationMessage args)
        {
            if (args.Notification == Message.NOTIFICATION_VIEW_HAS_BEEN_BUILT)
            {
                //Todo: Check if the current Cast is love it
                await Task.Run(() =>
                {
                    DispatcherHelper.CheckBeginInvokeOnUI(async() =>
                    {
                        ShowedCollection.Clear();
                        await Task.Delay(150);
                        _showedCollectionIndex = 0;
                        var datas  = SplitedCollection.ElementAt(0);
                        int length = datas.Count;

                        for (int i = 0; i < length; i++)
                        {
                            ShowedCollection.Add(datas.ElementAt(i));
                        }
                    });
                });

                _messenger.Send(new NotificationMessageWithCallback(Message.IS_MEDIAPLAYER_PLAYBACK_STATE_PLAYING, _notificationMessageCallback), Message.IS_MEDIAPLAYER_PLAYBACK_STATE_PLAYING);
            }
        }
예제 #3
0
        private void MessengerAction(NotificationMessage args)
        {
            if (args.Notification == Message.NOTIFICATION_PODCAST_HAS_BEEN_SET)
            {
                PodcastCollection = AppConstants.PodcastCollection;

                SplitedCollection        = Core.Helpers.Collection.Spliter(ref _podcastCollection, 20);
                _splitedCollectionLength = SplitedCollection.Count();

                for (int i = 0; i < _splitedCollectionLength; i++)
                {
                    IEnumerable <Cast> _collection = SplitedCollection.ElementAt(i);
                    Core.Helpers.Storage.FetchThumbnailAsync(ref _collection);
                }
            }
        }