/// <summary> /// Handles the ItemClick event of the btnGetImageFromUrl control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.XtraBars.ItemClickEventArgs"/> instance containing the event data.</param> private void BtnGetImageFromUrl_ItemClick(object sender, ItemClickEventArgs e) { var enterUrl = new FrmEnterAValue("Enter a URL"); enterUrl.ShowDialog(); if (!string.IsNullOrEmpty(enterUrl.Response)) { switch (this.galleryType) { case GalleryType.MovieFanart: MovieDBFactory.GetCurrentMovie().FanartPathOnDisk = string.Empty; MovieDBFactory.GetCurrentMovie().CurrentFanartImageUrl = enterUrl.Response; this.ProcessMovieFanartDownload(); break; case GalleryType.MoviePoster: MovieDBFactory.GetCurrentMovie().PosterPathOnDisk = string.Empty; MovieDBFactory.GetCurrentMovie().CurrentPosterImageUrl = enterUrl.Response; this.ProcessMoviePosterDownload(); break; case GalleryType.TvSeriesBanner: TvDBFactory.CurrentSeries.SeriesBannerUrl = enterUrl.Response; this.ProcessSeriesBannerDownload(); break; case GalleryType.TvSeriesPoster: TvDBFactory.CurrentSeries.PosterUrl = string.Empty; this.ProcessSeriesPosterDownload(); break; case GalleryType.TvSeriesFanart: TvDBFactory.CurrentSeries.FanartUrl = string.Empty; this.ProcessSeriesFanartDownload(); break; case GalleryType.TvSeasonBanner: TvDBFactory.CurrentSeason.BannerUrl = string.Empty; this.ProcessSeasonBannerDownload(); break; case GalleryType.TvSeasonFanart: TvDBFactory.CurrentSeason.FanartUrl = string.Empty; this.ProcessSeasonFanartDownload(); break; case GalleryType.TvSeasonPoster: TvDBFactory.CurrentSeason.PosterUrl = string.Empty; this.ProcessSeasonPosterDownload(); break; case GalleryType.TvEpisodeScreenshot: TvDBFactory.CurrentEpisode.EpisodeScreenshotUrl = string.Empty; this.ProcessEpisodeScreenshotDownload(); break; } } }
/// <summary> /// Handles the Click event of the btnAdd control. /// </summary> /// <param name="sender"> /// The source of the event. /// </param> /// <param name="e"> /// The <see cref="System.EventArgs"/> instance containing the event data. /// </param> private void BtnAddClick(object sender, EventArgs e) { var enterAValue = new FrmEnterAValue("Enter a scraper name"); enterAValue.ShowDialog(); if (!enterAValue.Cancelled) { var scraperGroup = new MovieScraperGroupModel { ScraperName = enterAValue.Response }; MovieScraperGroupFactory.SerializeToXml(scraperGroup); MovieScraperGroupFactory.GetScraperGroupsOnDisk(this.cmbScraperGroupList); this.currentScraperGroup = scraperGroup; this.currentScraperGroup = new MovieScraperGroupModel(); this.RefreshDatabindings(); this.cmbScraperGroupList.Text = enterAValue.Response; } }
/// <summary> /// Handles the Click event of the BtnAddNewSet control. /// </summary> /// <param name="sender"> /// The source of the event. /// </param> /// <param name="e"> /// The <see cref="System.EventArgs"/> instance containing the event data. /// </param> private void btnAddNewSet_Click(object sender, EventArgs e) { var enterAValue = new FrmEnterAValue("Enter a new set name"); enterAValue.ShowDialog(); if (!string.IsNullOrEmpty(enterAValue.Response)) { if (!MovieSetManager.HasSetWithName(enterAValue.Response)) { MovieSetManager.AddNewSet(enterAValue.Response); } else { var notificationPanel = new FrmShowNotification("There is already a set with this name"); notificationPanel.ShowDialog(); } } }
/// <summary> /// Handles the Click event of the BtnAddNewSet control. /// </summary> /// <param name="sender"> /// The source of the event. /// </param> /// <param name="e"> /// The <see cref="System.EventArgs"/> instance containing the event data. /// </param> private void btnAddNewSet_Click(object sender, EventArgs e) { var enterAValue = new FrmEnterAValue("Enter a new set name"); enterAValue.ShowDialog(); if (!string.IsNullOrEmpty(enterAValue.Response)) { MovieSetManager.AddNewSet(enterAValue.Response); } }