Пример #1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            bool isActive = true;

            PodcastEpisodeModel.EpisodePlayStateEnum episodeState = (PodcastEpisodeModel.EpisodePlayStateEnum)value;
            switch (episodeState)
            {
            case PodcastEpisodeModel.EpisodePlayStateEnum.Playing:
            case PodcastEpisodeModel.EpisodePlayStateEnum.Streaming:
                isActive = false;
                break;
            }

            return(isActive);
        }
Пример #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string playImageSource = "/Images/" + App.CurrentTheme + "/play_episode.png";

            PodcastEpisodeModel.EpisodePlayStateEnum episodeState = (PodcastEpisodeModel.EpisodePlayStateEnum)value;
            switch (episodeState)
            {
            case PodcastEpisodeModel.EpisodePlayStateEnum.Playing:
            case PodcastEpisodeModel.EpisodePlayStateEnum.Streaming:
                playImageSource = "/Images/" + App.CurrentTheme + "/play_episode_disabled.png";
                break;
            }

            return(playImageSource);
        }
Пример #3
0
        internal void setPlaying()
        {
            if (m_screenUpdateTimer != null)
            {
                return;
            }

            m_screenUpdateTimer = new DispatcherTimer();
            PodcastEpisodeModel.EpisodePlayStateEnum playState = String.IsNullOrEmpty(EpisodeFile) ? PodcastEpisodeModel.EpisodePlayStateEnum.Streaming
                                                                                                   : PodcastEpisodeModel.EpisodePlayStateEnum.Playing;
            StoreProperty <PodcastEpisodeModel.EpisodePlayStateEnum>("EpisodePlayState", playState);

            m_screenUpdateTimer.Interval = new TimeSpan(0, 0, 0, 0, 1000); // Fire the timer every second. We update the play pos here as well.
            m_screenUpdateTimer.Tick    += new EventHandler(episodePlayback_Tick);
            m_screenUpdateTimer.Start();
        }