Esempio 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);
            }
        }
Esempio n. 2
0
 protected virtual void OnDownloadClicked(object sender, GalleryItemSelectedEventArgs e)
 {
     if (DownloadClicked != null)
     {
         DownloadClicked(sender, e);
     }
 }
Esempio 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);
     }
 }
Esempio 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);
 }
Esempio n. 5
0
 private void relatedVideoGalleryWidget_ItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     LoadVideo(e.Data as Movie);
 }
Esempio 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);
 }
Esempio n. 7
0
 private void verticalSingleColumnGalleryWidget1_ItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     LoadVideo(e.Data as MovieLink);
 }
 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);
 }
 protected virtual void OnDownloadClicked(object sender, GalleryItemSelectedEventArgs e)
 {
     if (DownloadClicked != null)
         DownloadClicked(sender, e);
 }
Esempio 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);
            }
        }
Esempio n. 11
0
 private void verticalSingleColumnGalleryWidget1_ItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     LoadVideo(e.Data as MovieLink);
 }
Esempio n. 12
0
 private void relatedVideoGalleryWidget_ItemSelected(object sender, GalleryItemSelectedEventArgs e)
 {
     LoadVideo(e.Data as Movie);
 }