Exemplo n.º 1
0
        private void OnDownloadToggled(object o, ToggledArgs args)
        {
            try
            {
                CellRendererToggle renderer = (CellRendererToggle)o;

                if (!renderer.Sensitive)
                {
                    return;
                }

                TreeIter iter;

                if (!sort.GetIter(out iter, new TreePath(args.Path)))
                {
                    return;
                }

                PodcastInfo pi = sort.GetValue(iter, 0) as PodcastInfo;

                if (!pi.IsQueued)
                {
                    PodcastCore.QueuePodcastDownload(pi);
                }
                else
                {
                    PodcastCore.CancelPodcastDownload(pi);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
Exemplo n.º 2
0
        private void OnCancelPodcastsActivated(object sender, EventArgs args)
        {
            PodcastInfo[] podcasts = GetSelectedPodcasts();

            if (podcasts != null)
            {
                if (podcasts.Length == 1)
                {
                    PodcastCore.CancelPodcastDownload(podcasts[0]);
                }
                else if (podcasts.Length > 1)
                {
                    PodcastCore.CancelPodcastDownload(podcasts);
                }
            }
        }
Exemplo n.º 3
0
 private void OnUpdateAllActivated(object sender, EventArgs args)
 {
     PodcastCore.UpdateAllFeeds();
 }
Exemplo n.º 4
0
 private void OnFeedMenuNewActivated(object sender, EventArgs args)
 {
     ThreadAssist.ProxyToMain(delegate {
         PodcastCore.RunSubscribeDialog();
     });
 }
Exemplo n.º 5
0
 private void OnVistPodcastAlleyActivated(object sender, EventArgs args)
 {
     PodcastCore.VisitPodcastAlley();
 }