diff --git a/ScreenSaver/AerialEntities.cs b/ScreenSaver/AerialEntities.cs index ba97ea7..0434daf 100644 --- a/ScreenSaver/AerialEntities.cs +++ b/ScreenSaver/AerialEntities.cs @@ -22,11 +22,16 @@ public static List GetMovies() } public static List GetAllMovies() { + //if no Entries, just return an empty list + if (GetAllEntries() == null) { return new List(); } + return GetAllEntries().SelectMany(s => s.assets).ToList(); } private static List FilterEntries(IdAsset[] urls) { + if (urls == null) { return new List(); }; //if no URLS, return an empty list + var time = (DateTime.Now.Hour < 6 || DateTime.Now.Hour > 19) ? "night" : "day"; var ran = new Random(); var settings = new RegSettings(); @@ -71,7 +76,17 @@ public static IdAsset[] GetAllEntries() WebClient webClient = new WebClient(); entries = webClient.DownloadString(aerialUrl); } - cachedEntities = new JavaScriptSerializer().Deserialize(entries); + + try + { + cachedEntities = new JavaScriptSerializer().Deserialize(entries); + } + catch (ArgumentException e) + { + //the passed in entities document is invalid. + return null; + } + return cachedEntities; } diff --git a/ScreenSaver/AerialGlobalVars.cs b/ScreenSaver/AerialGlobalVars.cs index a0dad17..f905edc 100644 --- a/ScreenSaver/AerialGlobalVars.cs +++ b/ScreenSaver/AerialGlobalVars.cs @@ -19,5 +19,9 @@ static class AerialGlobalVars public static string githubAllReleases = "https://github.com/cDima/Aerial/releases"; //link to the apple videos public static string appleVideosURI = "http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/entries.json"; + //link to the 4k apple videos (hosted by Jonathon Powell) + public static string applefourKVideoURI = "https://t27q97zg19.execute-api.us-east-1.amazonaws.com/prod/aerialAltJSON/4kEntites.json"; + //original link to 4k apple videos, we can't parse this currently so I hosted a modified version + //public static string applefourKVideoURI = "https://sylvan.apple.com/Aerials/2x/entries.json"; } } diff --git a/ScreenSaver/ScreenSaverForm.cs b/ScreenSaver/ScreenSaverForm.cs index 68eef0a..a862738 100644 --- a/ScreenSaver/ScreenSaverForm.cs +++ b/ScreenSaver/ScreenSaverForm.cs @@ -314,6 +314,17 @@ private void SetNextVideo() var cacheEnabled = new RegSettings().CacheVideos; if (showVideo) { + //If movies is null, when we tried to parse the JSON doc with the movies it + //failed or it was empty. + if (Movies == null || Movies.Count == 0) + { + showVideo = false; + MessageBox.Show("Error finding the video locations. Please confirm that the video source " + + "is a valid JSON document and can be reached. Resart after fixing the video source"); + + return; + } + string url = Movies[currentVideoIndex].url; if (Caching.IsHit(url)) diff --git a/ScreenSaver/SettingsForm.Designer.cs b/ScreenSaver/SettingsForm.Designer.cs index 1f1c098..b7ad6dc 100644 --- a/ScreenSaver/SettingsForm.Designer.cs +++ b/ScreenSaver/SettingsForm.Designer.cs @@ -47,6 +47,8 @@ private void InitializeComponent() this.chkDifferentMonitorMovies = new System.Windows.Forms.CheckBox(); this.tabCache = new System.Windows.Forms.TabPage(); this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.numOfCurrDown_lbl = new System.Windows.Forms.Label(); + this.fullDownloadBtn = new System.Windows.Forms.Button(); this.lblFreeSpace = new System.Windows.Forms.Label(); this.btnPurgeCache = new System.Windows.Forms.Button(); this.lblCacheSize = new System.Windows.Forms.Label(); @@ -60,8 +62,7 @@ private void InitializeComponent() this.changeVideoSourceText = new System.Windows.Forms.TextBox(); this.tabAbout = new System.Windows.Forms.TabPage(); this.timerDiskUpdate = new System.Windows.Forms.Timer(this.components); - this.fullDownloadBtn = new System.Windows.Forms.Button(); - this.numOfCurrDown_lbl = new System.Windows.Forms.Label(); + this.SetToFourK_btn = new System.Windows.Forms.Button(); this.tabs.SuspendLayout(); this.tabPreferences.SuspendLayout(); this.grpChosenVideos.SuspendLayout(); @@ -77,10 +78,10 @@ private void InitializeComponent() // this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.okButton.Location = new System.Drawing.Point(18, 591); - this.okButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.okButton.Location = new System.Drawing.Point(16, 473); + this.okButton.Margin = new System.Windows.Forms.Padding(4); this.okButton.Name = "okButton"; - this.okButton.Size = new System.Drawing.Size(112, 35); + this.okButton.Size = new System.Drawing.Size(100, 28); this.okButton.TabIndex = 4; this.okButton.Text = "OK"; this.okButton.UseVisualStyleBackColor = true; @@ -91,10 +92,10 @@ private void InitializeComponent() this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.cancelButton.CausesValidation = false; this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.Location = new System.Drawing.Point(140, 591); - this.cancelButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.cancelButton.Location = new System.Drawing.Point(124, 473); + this.cancelButton.Margin = new System.Windows.Forms.Padding(4); this.cancelButton.Name = "cancelButton"; - this.cancelButton.Size = new System.Drawing.Size(112, 35); + this.cancelButton.Size = new System.Drawing.Size(100, 28); this.cancelButton.TabIndex = 5; this.cancelButton.Text = "Cancel"; this.cancelButton.UseVisualStyleBackColor = true; @@ -103,11 +104,11 @@ private void InitializeComponent() // lblVersion // this.lblVersion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.lblVersion.Location = new System.Drawing.Point(308, 595); + this.lblVersion.Location = new System.Drawing.Point(274, 476); this.lblVersion.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lblVersion.Name = "lblVersion"; this.lblVersion.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.lblVersion.Size = new System.Drawing.Size(320, 35); + this.lblVersion.Size = new System.Drawing.Size(284, 28); this.lblVersion.TabIndex = 13; this.lblVersion.TabStop = true; this.lblVersion.Text = "Version Info"; @@ -123,22 +124,22 @@ private void InitializeComponent() this.tabs.Controls.Add(this.tabCache); this.tabs.Controls.Add(this.tabSource); this.tabs.Controls.Add(this.tabAbout); - this.tabs.Location = new System.Drawing.Point(18, 18); - this.tabs.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.tabs.Location = new System.Drawing.Point(16, 14); + this.tabs.Margin = new System.Windows.Forms.Padding(4); this.tabs.Name = "tabs"; this.tabs.SelectedIndex = 0; - this.tabs.Size = new System.Drawing.Size(615, 555); + this.tabs.Size = new System.Drawing.Size(547, 444); this.tabs.TabIndex = 14; // // tabPreferences // this.tabPreferences.Controls.Add(this.grpChosenVideos); this.tabPreferences.Controls.Add(this.groupBox1); - this.tabPreferences.Location = new System.Drawing.Point(4, 29); - this.tabPreferences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.tabPreferences.Location = new System.Drawing.Point(4, 25); + this.tabPreferences.Margin = new System.Windows.Forms.Padding(4); this.tabPreferences.Name = "tabPreferences"; - this.tabPreferences.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.tabPreferences.Size = new System.Drawing.Size(607, 522); + this.tabPreferences.Padding = new System.Windows.Forms.Padding(4); + this.tabPreferences.Size = new System.Drawing.Size(539, 415); this.tabPreferences.TabIndex = 0; this.tabPreferences.Text = "Preferences"; this.tabPreferences.UseVisualStyleBackColor = true; @@ -150,11 +151,11 @@ private void InitializeComponent() this.grpChosenVideos.Controls.Add(this.player); this.grpChosenVideos.Controls.Add(this.pictureBox1); this.grpChosenVideos.Controls.Add(this.chkUseTimeOfDay); - this.grpChosenVideos.Location = new System.Drawing.Point(10, 115); - this.grpChosenVideos.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.grpChosenVideos.Location = new System.Drawing.Point(9, 92); + this.grpChosenVideos.Margin = new System.Windows.Forms.Padding(4); this.grpChosenVideos.Name = "grpChosenVideos"; - this.grpChosenVideos.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.grpChosenVideos.Size = new System.Drawing.Size(584, 391); + this.grpChosenVideos.Padding = new System.Windows.Forms.Padding(4); + this.grpChosenVideos.Size = new System.Drawing.Size(519, 313); this.grpChosenVideos.TabIndex = 13; this.grpChosenVideos.TabStop = false; this.grpChosenVideos.Text = "Chosen Videos"; @@ -163,12 +164,12 @@ private void InitializeComponent() // this.tvChosen.CheckBoxes = true; this.tvChosen.FullRowSelect = true; - this.tvChosen.Location = new System.Drawing.Point(9, 29); - this.tvChosen.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.tvChosen.Location = new System.Drawing.Point(8, 23); + this.tvChosen.Margin = new System.Windows.Forms.Padding(4); this.tvChosen.Name = "tvChosen"; this.tvChosen.ShowLines = false; this.tvChosen.ShowPlusMinus = false; - this.tvChosen.Size = new System.Drawing.Size(206, 350); + this.tvChosen.Size = new System.Drawing.Size(184, 281); this.tvChosen.TabIndex = 19; this.tvChosen.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvChosen_AfterSelect); // @@ -177,10 +178,10 @@ private void InitializeComponent() this.cbLivePreview.AutoSize = true; this.cbLivePreview.Checked = true; this.cbLivePreview.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbLivePreview.Location = new System.Drawing.Point(226, 320); - this.cbLivePreview.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.cbLivePreview.Location = new System.Drawing.Point(201, 256); + this.cbLivePreview.Margin = new System.Windows.Forms.Padding(4); this.cbLivePreview.Name = "cbLivePreview"; - this.cbLivePreview.Size = new System.Drawing.Size(121, 24); + this.cbLivePreview.Size = new System.Drawing.Size(109, 21); this.cbLivePreview.TabIndex = 18; this.cbLivePreview.Text = "Live Preview"; this.cbLivePreview.UseVisualStyleBackColor = true; @@ -189,7 +190,7 @@ private void InitializeComponent() // this.player.Enabled = true; this.player.Location = new System.Drawing.Point(151, 19); - this.player.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.player.Margin = new System.Windows.Forms.Padding(4); this.player.Name = "player"; this.player.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("player.OcxState"))); this.player.Size = new System.Drawing.Size(232, 132); @@ -200,10 +201,10 @@ private void InitializeComponent() this.pictureBox1.ErrorImage = null; this.pictureBox1.Image = global::Aerial.Properties.Resources.surfacebook; this.pictureBox1.InitialImage = global::Aerial.Properties.Resources.surfacebook; - this.pictureBox1.Location = new System.Drawing.Point(226, 48); - this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.pictureBox1.Location = new System.Drawing.Point(201, 38); + this.pictureBox1.Margin = new System.Windows.Forms.Padding(4); this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(348, 277); + this.pictureBox1.Size = new System.Drawing.Size(309, 222); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox1.TabIndex = 17; this.pictureBox1.TabStop = false; @@ -213,10 +214,10 @@ private void InitializeComponent() this.chkUseTimeOfDay.AutoSize = true; this.chkUseTimeOfDay.Checked = true; this.chkUseTimeOfDay.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkUseTimeOfDay.Location = new System.Drawing.Point(226, 355); - this.chkUseTimeOfDay.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.chkUseTimeOfDay.Location = new System.Drawing.Point(201, 284); + this.chkUseTimeOfDay.Margin = new System.Windows.Forms.Padding(4); this.chkUseTimeOfDay.Name = "chkUseTimeOfDay"; - this.chkUseTimeOfDay.Size = new System.Drawing.Size(230, 24); + this.chkUseTimeOfDay.Size = new System.Drawing.Size(207, 21); this.chkUseTimeOfDay.TabIndex = 14; this.chkUseTimeOfDay.Text = "Prioritize current time of day"; this.chkUseTimeOfDay.UseVisualStyleBackColor = true; @@ -225,11 +226,11 @@ private void InitializeComponent() // this.groupBox1.Controls.Add(this.chkMultiscreenDisabled); this.groupBox1.Controls.Add(this.chkDifferentMonitorMovies); - this.groupBox1.Location = new System.Drawing.Point(9, 9); - this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.groupBox1.Location = new System.Drawing.Point(8, 7); + this.groupBox1.Margin = new System.Windows.Forms.Padding(4); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.groupBox1.Size = new System.Drawing.Size(585, 97); + this.groupBox1.Padding = new System.Windows.Forms.Padding(4); + this.groupBox1.Size = new System.Drawing.Size(520, 78); this.groupBox1.TabIndex = 12; this.groupBox1.TabStop = false; this.groupBox1.Text = "Multi-screen setups"; @@ -239,10 +240,10 @@ private void InitializeComponent() this.chkMultiscreenDisabled.AutoSize = true; this.chkMultiscreenDisabled.Checked = true; this.chkMultiscreenDisabled.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkMultiscreenDisabled.Location = new System.Drawing.Point(9, 65); - this.chkMultiscreenDisabled.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.chkMultiscreenDisabled.Location = new System.Drawing.Point(8, 52); + this.chkMultiscreenDisabled.Margin = new System.Windows.Forms.Padding(4); this.chkMultiscreenDisabled.Name = "chkMultiscreenDisabled"; - this.chkMultiscreenDisabled.Size = new System.Drawing.Size(367, 24); + this.chkMultiscreenDisabled.Size = new System.Drawing.Size(328, 21); this.chkMultiscreenDisabled.TabIndex = 14; this.chkMultiscreenDisabled.Text = "Show only on main screen on 3+ screen setups"; this.chkMultiscreenDisabled.UseVisualStyleBackColor = true; @@ -252,10 +253,10 @@ private void InitializeComponent() this.chkDifferentMonitorMovies.AutoSize = true; this.chkDifferentMonitorMovies.Checked = true; this.chkDifferentMonitorMovies.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkDifferentMonitorMovies.Location = new System.Drawing.Point(9, 29); - this.chkDifferentMonitorMovies.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.chkDifferentMonitorMovies.Location = new System.Drawing.Point(8, 23); + this.chkDifferentMonitorMovies.Margin = new System.Windows.Forms.Padding(4); this.chkDifferentMonitorMovies.Name = "chkDifferentMonitorMovies"; - this.chkDifferentMonitorMovies.Size = new System.Drawing.Size(281, 24); + this.chkDifferentMonitorMovies.Size = new System.Drawing.Size(253, 21); this.chkDifferentMonitorMovies.TabIndex = 12; this.chkDifferentMonitorMovies.Text = "Play different video on each screen"; this.chkDifferentMonitorMovies.UseVisualStyleBackColor = true; @@ -263,11 +264,11 @@ private void InitializeComponent() // tabCache // this.tabCache.Controls.Add(this.groupBox2); - this.tabCache.Location = new System.Drawing.Point(4, 29); - this.tabCache.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.tabCache.Location = new System.Drawing.Point(4, 25); + this.tabCache.Margin = new System.Windows.Forms.Padding(4); this.tabCache.Name = "tabCache"; - this.tabCache.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.tabCache.Size = new System.Drawing.Size(607, 522); + this.tabCache.Padding = new System.Windows.Forms.Padding(4); + this.tabCache.Size = new System.Drawing.Size(539, 415); this.tabCache.TabIndex = 1; this.tabCache.Text = "Cache"; this.tabCache.UseVisualStyleBackColor = true; @@ -283,31 +284,51 @@ private void InitializeComponent() this.groupBox2.Controls.Add(this.chkCacheVideos); this.groupBox2.Controls.Add(this.changeCacheLocationButton); this.groupBox2.Controls.Add(this.txtCacheFolderPath); - this.groupBox2.Location = new System.Drawing.Point(10, 9); - this.groupBox2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.groupBox2.Location = new System.Drawing.Point(9, 7); + this.groupBox2.Margin = new System.Windows.Forms.Padding(4); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.groupBox2.Size = new System.Drawing.Size(584, 497); + this.groupBox2.Padding = new System.Windows.Forms.Padding(4); + this.groupBox2.Size = new System.Drawing.Size(519, 398); this.groupBox2.TabIndex = 16; this.groupBox2.TabStop = false; this.groupBox2.Text = "Cache"; // + // numOfCurrDown_lbl + // + this.numOfCurrDown_lbl.AutoSize = true; + this.numOfCurrDown_lbl.Location = new System.Drawing.Point(333, 57); + this.numOfCurrDown_lbl.Name = "numOfCurrDown_lbl"; + this.numOfCurrDown_lbl.Size = new System.Drawing.Size(152, 17); + this.numOfCurrDown_lbl.TabIndex = 21; + this.numOfCurrDown_lbl.Text = "# of files downloading: "; + // + // fullDownloadBtn + // + this.fullDownloadBtn.Location = new System.Drawing.Point(308, 22); + this.fullDownloadBtn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.fullDownloadBtn.Name = "fullDownloadBtn"; + this.fullDownloadBtn.Size = new System.Drawing.Size(203, 29); + this.fullDownloadBtn.TabIndex = 20; + this.fullDownloadBtn.Text = "Download All Videos"; + this.fullDownloadBtn.UseVisualStyleBackColor = true; + this.fullDownloadBtn.Click += new System.EventHandler(this.fullDownloadBtn_Click); + // // lblFreeSpace // this.lblFreeSpace.AutoSize = true; - this.lblFreeSpace.Location = new System.Drawing.Point(24, 169); + this.lblFreeSpace.Location = new System.Drawing.Point(21, 135); this.lblFreeSpace.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lblFreeSpace.Name = "lblFreeSpace"; - this.lblFreeSpace.Size = new System.Drawing.Size(163, 20); + this.lblFreeSpace.Size = new System.Drawing.Size(146, 17); this.lblFreeSpace.TabIndex = 19; this.lblFreeSpace.Text = "Free Space Available:"; // // btnPurgeCache // - this.btnPurgeCache.Location = new System.Drawing.Point(346, 161); - this.btnPurgeCache.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.btnPurgeCache.Location = new System.Drawing.Point(308, 129); + this.btnPurgeCache.Margin = new System.Windows.Forms.Padding(4); this.btnPurgeCache.Name = "btnPurgeCache"; - this.btnPurgeCache.Size = new System.Drawing.Size(228, 35); + this.btnPurgeCache.Size = new System.Drawing.Size(203, 28); this.btnPurgeCache.TabIndex = 18; this.btnPurgeCache.Text = "Delete Cache"; this.btnPurgeCache.UseVisualStyleBackColor = true; @@ -316,19 +337,19 @@ private void InitializeComponent() // lblCacheSize // this.lblCacheSize.AutoSize = true; - this.lblCacheSize.Location = new System.Drawing.Point(24, 132); + this.lblCacheSize.Location = new System.Drawing.Point(21, 106); this.lblCacheSize.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lblCacheSize.Name = "lblCacheSize"; - this.lblCacheSize.Size = new System.Drawing.Size(151, 20); + this.lblCacheSize.Size = new System.Drawing.Size(134, 17); this.lblCacheSize.TabIndex = 17; this.lblCacheSize.Text = "Current Cache Size:"; // // btnOpenCache // - this.btnOpenCache.Location = new System.Drawing.Point(346, 124); - this.btnOpenCache.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.btnOpenCache.Location = new System.Drawing.Point(308, 99); + this.btnOpenCache.Margin = new System.Windows.Forms.Padding(4); this.btnOpenCache.Name = "btnOpenCache"; - this.btnOpenCache.Size = new System.Drawing.Size(228, 35); + this.btnOpenCache.Size = new System.Drawing.Size(203, 28); this.btnOpenCache.TabIndex = 16; this.btnOpenCache.Text = "Open Cache Location"; this.btnOpenCache.UseVisualStyleBackColor = true; @@ -337,10 +358,10 @@ private void InitializeComponent() // chkCacheVideos // this.chkCacheVideos.AutoSize = true; - this.chkCacheVideos.Location = new System.Drawing.Point(9, 29); - this.chkCacheVideos.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.chkCacheVideos.Location = new System.Drawing.Point(8, 23); + this.chkCacheVideos.Margin = new System.Windows.Forms.Padding(4); this.chkCacheVideos.Name = "chkCacheVideos"; - this.chkCacheVideos.Size = new System.Drawing.Size(222, 24); + this.chkCacheVideos.Size = new System.Drawing.Size(199, 21); this.chkCacheVideos.TabIndex = 13; this.chkCacheVideos.Text = "Cache videos while playing"; this.chkCacheVideos.UseVisualStyleBackColor = true; @@ -348,10 +369,10 @@ private void InitializeComponent() // changeCacheLocationButton // this.changeCacheLocationButton.Enabled = false; - this.changeCacheLocationButton.Location = new System.Drawing.Point(346, 214); - this.changeCacheLocationButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.changeCacheLocationButton.Location = new System.Drawing.Point(308, 171); + this.changeCacheLocationButton.Margin = new System.Windows.Forms.Padding(4); this.changeCacheLocationButton.Name = "changeCacheLocationButton"; - this.changeCacheLocationButton.Size = new System.Drawing.Size(228, 35); + this.changeCacheLocationButton.Size = new System.Drawing.Size(203, 28); this.changeCacheLocationButton.TabIndex = 15; this.changeCacheLocationButton.Text = "Change Cache Location..."; this.changeCacheLocationButton.UseVisualStyleBackColor = true; @@ -361,41 +382,44 @@ private void InitializeComponent() // this.txtCacheFolderPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtCacheFolderPath.Location = new System.Drawing.Point(9, 217); - this.txtCacheFolderPath.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.txtCacheFolderPath.Location = new System.Drawing.Point(8, 174); + this.txtCacheFolderPath.Margin = new System.Windows.Forms.Padding(4); this.txtCacheFolderPath.Name = "txtCacheFolderPath"; this.txtCacheFolderPath.ReadOnly = true; - this.txtCacheFolderPath.Size = new System.Drawing.Size(326, 26); + this.txtCacheFolderPath.Size = new System.Drawing.Size(290, 22); this.txtCacheFolderPath.TabIndex = 14; // // tabSource // + this.tabSource.Controls.Add(this.SetToFourK_btn); this.tabSource.Controls.Add(this.videoSourceResetButton); this.tabSource.Controls.Add(this.lbl_VideoSourceURL); this.tabSource.Controls.Add(this.changeVideoSourceText); - this.tabSource.Location = new System.Drawing.Point(4, 29); + this.tabSource.Location = new System.Drawing.Point(4, 25); + this.tabSource.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.tabSource.Name = "tabSource"; - this.tabSource.Size = new System.Drawing.Size(607, 522); + this.tabSource.Size = new System.Drawing.Size(539, 415); this.tabSource.TabIndex = 3; this.tabSource.Text = "Video Source"; this.tabSource.UseVisualStyleBackColor = true; // // videoSourceResetButton // - this.videoSourceResetButton.Location = new System.Drawing.Point(17, 90); + this.videoSourceResetButton.Location = new System.Drawing.Point(15, 72); + this.videoSourceResetButton.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.videoSourceResetButton.Name = "videoSourceResetButton"; - this.videoSourceResetButton.Size = new System.Drawing.Size(179, 34); + this.videoSourceResetButton.Size = new System.Drawing.Size(189, 27); this.videoSourceResetButton.TabIndex = 25; - this.videoSourceResetButton.Text = "Reset Video Source"; + this.videoSourceResetButton.Text = "Set to Standard Videos"; this.videoSourceResetButton.UseVisualStyleBackColor = true; this.videoSourceResetButton.Click += new System.EventHandler(this.videoSourceResetButton_Click); // // lbl_VideoSourceURL // this.lbl_VideoSourceURL.AutoSize = true; - this.lbl_VideoSourceURL.Location = new System.Drawing.Point(13, 21); + this.lbl_VideoSourceURL.Location = new System.Drawing.Point(12, 17); this.lbl_VideoSourceURL.Name = "lbl_VideoSourceURL"; - this.lbl_VideoSourceURL.Size = new System.Drawing.Size(418, 20); + this.lbl_VideoSourceURL.Size = new System.Drawing.Size(373, 17); this.lbl_VideoSourceURL.TabIndex = 24; this.lbl_VideoSourceURL.Text = "Video Source URL (change requires restart to take effect)"; // @@ -403,18 +427,18 @@ private void InitializeComponent() // this.changeVideoSourceText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.changeVideoSourceText.Location = new System.Drawing.Point(17, 56); - this.changeVideoSourceText.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.changeVideoSourceText.Location = new System.Drawing.Point(15, 45); + this.changeVideoSourceText.Margin = new System.Windows.Forms.Padding(4); this.changeVideoSourceText.Name = "changeVideoSourceText"; - this.changeVideoSourceText.Size = new System.Drawing.Size(565, 26); + this.changeVideoSourceText.Size = new System.Drawing.Size(503, 22); this.changeVideoSourceText.TabIndex = 23; // // tabAbout // - this.tabAbout.Location = new System.Drawing.Point(4, 29); - this.tabAbout.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.tabAbout.Location = new System.Drawing.Point(4, 25); + this.tabAbout.Margin = new System.Windows.Forms.Padding(4); this.tabAbout.Name = "tabAbout"; - this.tabAbout.Size = new System.Drawing.Size(607, 522); + this.tabAbout.Size = new System.Drawing.Size(539, 415); this.tabAbout.TabIndex = 2; this.tabAbout.Text = "About"; this.tabAbout.UseVisualStyleBackColor = true; @@ -425,37 +449,28 @@ private void InitializeComponent() this.timerDiskUpdate.Interval = 1000; this.timerDiskUpdate.Tick += new System.EventHandler(this.timerDiskUpdate_Tick); // - // fullDownloadBtn - // - this.fullDownloadBtn.Location = new System.Drawing.Point(346, 28); - this.fullDownloadBtn.Name = "fullDownloadBtn"; - this.fullDownloadBtn.Size = new System.Drawing.Size(228, 36); - this.fullDownloadBtn.TabIndex = 20; - this.fullDownloadBtn.Text = "Download All Videos"; - this.fullDownloadBtn.UseVisualStyleBackColor = true; - this.fullDownloadBtn.Click += new System.EventHandler(this.fullDownloadBtn_Click); - // - // numOfCurrDown_lbl + // SetToFourK_btn // - this.numOfCurrDown_lbl.AutoSize = true; - this.numOfCurrDown_lbl.Location = new System.Drawing.Point(375, 71); - this.numOfCurrDown_lbl.Name = "numOfCurrDown_lbl"; - this.numOfCurrDown_lbl.Size = new System.Drawing.Size(169, 20); - this.numOfCurrDown_lbl.TabIndex = 21; - this.numOfCurrDown_lbl.Text = "# of files downloading: "; + this.SetToFourK_btn.Location = new System.Drawing.Point(331, 74); + this.SetToFourK_btn.Name = "SetToFourK_btn"; + this.SetToFourK_btn.Size = new System.Drawing.Size(187, 27); + this.SetToFourK_btn.TabIndex = 26; + this.SetToFourK_btn.Text = "Set to 4k Video"; + this.SetToFourK_btn.UseVisualStyleBackColor = true; + this.SetToFourK_btn.Click += new System.EventHandler(this.SetToFourK_btn_Click); // // SettingsForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(651, 645); + this.ClientSize = new System.Drawing.Size(579, 516); this.Controls.Add(this.tabs); this.Controls.Add(this.lblVersion); this.Controls.Add(this.cancelButton); this.Controls.Add(this.okButton); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.Margin = new System.Windows.Forms.Padding(4); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "SettingsForm"; @@ -514,5 +529,6 @@ private void InitializeComponent() private System.Windows.Forms.TextBox changeVideoSourceText; private System.Windows.Forms.Button fullDownloadBtn; private System.Windows.Forms.Label numOfCurrDown_lbl; + private System.Windows.Forms.Button SetToFourK_btn; } } diff --git a/ScreenSaver/SettingsForm.cs b/ScreenSaver/SettingsForm.cs index 806307d..4959f1f 100644 --- a/ScreenSaver/SettingsForm.cs +++ b/ScreenSaver/SettingsForm.cs @@ -259,6 +259,12 @@ private void videoSourceResetButton_Click(object sender, EventArgs e) { changeVideoSourceText.Text = AerialGlobalVars.appleVideosURI; } + + private void SetToFourK_btn_Click(object sender, EventArgs e) + { + changeVideoSourceText.Text = AerialGlobalVars.applefourKVideoURI; + } + private void fullDownloadBtn_Click(object sender, EventArgs e) { var movies = AerialContext.GetAllMovies();