Ejemplo n.º 1
0
        private void videoLinksGalleryWidget_DownloadClicked(object sender, GalleryItemSelectedEventArgs e)
        {
            if (!Directory.Exists(AppSettings.MovieDownloadFolder))
            {
                using (var di = new FolderBrowserDialog()
                {
                    Description = "Select download folder"
                })
                {
                    if (di.ShowDialog() == DialogResult.OK)
                    {
                        AppSettings.MovieDownloadFolder = di.SelectedPath;
                    }
                    else
                    {
                        return;
                    }
                }
            }
            {
                var link = (MovieLink)e.Data;
                var ds   = new DownloaderService();
                var di   = new DownloadInfo
                {
                    Link    = link,
                    Service = ds
                };

                ds.Download(di, this);
                DownloadForm.ShowMe();
                DownloadForm.Add(di, 0);
            }
        }
Ejemplo n.º 2
0
 protected virtual void OnDownloadClicked(object sender, GalleryItemSelectedEventArgs e)
 {
     if (DownloadClicked != null)
     {
         DownloadClicked(sender, e);
     }
 }
Ejemplo n.º 3
0
 protected virtual void OnItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     foreach (Control c in WidgetContainer.Controls)
     {
         var v = c as IWidget;
         if (v != null)
         {
             if (v == sender)
             {
                 v.SelectView();
             }
             else
             {
                 v.DeselectView();
             }
         }
     }
     if (ItemSelected != null)
     {
         ItemSelected(sender, e);
     }
 }
Ejemplo n.º 4
0
 private void browseGalleryWidget_ItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     //ugly.. should have a IViewContainer to route
     (this.FindForm() as IViewContainer).PlayVideo(e.Data as Movie);
 }
Ejemplo n.º 5
0
 private void relatedVideoGalleryWidget_ItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     LoadVideo(e.Data as Movie);
 }
Ejemplo n.º 6
0
 private void browseGalleryWidget_ItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     //ugly.. should have a IViewContainer to route
     (this.FindForm() as IViewContainer).PlayVideo(e.Data as Movie);
 }
Ejemplo n.º 7
0
 private void verticalSingleColumnGalleryWidget1_ItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     LoadVideo(e.Data as MovieLink);
 }
Ejemplo n.º 8
0
 protected virtual void OnItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     foreach (Control c in WidgetContainer.Controls)
     {
         var v = c as IWidget;
         if (v != null)
         {
             if (v == sender)
                 v.SelectView();
             else
                 v.DeselectView();
         }
     }
     if (ItemSelected != null)
         ItemSelected(sender, e);
 }
Ejemplo n.º 9
0
 protected virtual void OnDownloadClicked(object sender, GalleryItemSelectedEventArgs e)
 {
     if (DownloadClicked != null)
         DownloadClicked(sender, e);
 }
Ejemplo n.º 10
0
        private void videoLinksGalleryWidget_DownloadClicked(object sender, GalleryItemSelectedEventArgs e)
        {
            if (!Directory.Exists(AppSettings.MovieDownloadFolder))
            {
                using (var di = new FolderBrowserDialog() { Description = "Select download folder" })
                {
                    if (di.ShowDialog() == DialogResult.OK)
                        AppSettings.MovieDownloadFolder = di.SelectedPath;
                    else
                        return;
                }
            }
            {
                var link = (MovieLink)e.Data;
                var ds = new DownloaderService();
                var di = new DownloadInfo
                {
                    Link = link,
                    Service = ds
                };

                ds.Download(di, this);
                DownloadForm.ShowMe();
                DownloadForm.Add(di, 0);
            }
        }
Ejemplo n.º 11
0
 private void verticalSingleColumnGalleryWidget1_ItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     LoadVideo(e.Data as MovieLink);
 }
Ejemplo n.º 12
0
 private void relatedVideoGalleryWidget_ItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     LoadVideo(e.Data as Movie);
 }