public MainForm() { try { InitializeComponent(); if (!Directory.Exists(Consts.APPDATA_LOCATION)) { Directory.CreateDirectory(Consts.APPDATA_LOCATION); } downloadLocation = Consts.DEFAULT_DOWNLOAD_LOCATION; if (File.Exists(Consts.DOWNLOAD_LOCATION_FILE)) { downloadLocation = File.ReadAllText(Consts.DOWNLOAD_LOCATION_FILE); } DownloadLocation_Label.Text = downloadLocation; VersionTitle_Label.Text = "v1.0.1"; FindSuitableDriver(); seriesDriver = CreateChromeDriver(); } catch (Exception ex) { MessageBox.Show(ex.Message); Close(); } }
public DownloadForm(SeriesWebDriver webDriver, int seasonIndex, int episodeIndex, int episodeAmount, string downloadLocation, string seasonName = "") { InitializeComponent(); if (seasonName != "") { Text += " (Season " + seasonName + ")"; } EpisodeLoad_ProgressBar.Maximum = Consts.PB_DURATION * Consts.PB_FPS; Overall_ProgressBar.Maximum = episodeAmount; OverallProgress_Label.Text = Utils.GetProgressString(0, episodeAmount); this.webDriver = webDriver; this.seasonIndex = seasonIndex; this.episodeIndex = episodeIndex; this.episodeAmount = episodeAmount; this.downloadLocation = downloadLocation; }