From 167002018f4799bbbd28e66949daae24d4308167 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Sun, 11 Jan 2015 12:51:53 +0000 Subject: [PATCH] Added the other files too. --- DEIFR.sln | 22 ++++++++++++++++++++++ DEIFR/Form1.Designer.cs | 10 ++++++++++ DEIFR/ImageDownloader.cs | 8 ++++++-- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 DEIFR.sln diff --git a/DEIFR.sln b/DEIFR.sln new file mode 100644 index 0000000..db36ca4 --- /dev/null +++ b/DEIFR.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2013 for Windows Desktop +VisualStudioVersion = 12.0.30723.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DEIFR", "DEIFR\DEIFR.csproj", "{885CF010-4AC8-407C-97F7-1542411709E5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {885CF010-4AC8-407C-97F7-1542411709E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {885CF010-4AC8-407C-97F7-1542411709E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {885CF010-4AC8-407C-97F7-1542411709E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {885CF010-4AC8-407C-97F7-1542411709E5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/DEIFR/Form1.Designer.cs b/DEIFR/Form1.Designer.cs index 727a9ef..e50e6d0 100644 --- a/DEIFR/Form1.Designer.cs +++ b/DEIFR/Form1.Designer.cs @@ -43,6 +43,16 @@ // this.numericUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.numericUpDown1.Location = new System.Drawing.Point(304, 13); + this.numericUpDown1.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numericUpDown1.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); this.numericUpDown1.Name = "numericUpDown1"; this.numericUpDown1.Size = new System.Drawing.Size(120, 20); this.numericUpDown1.TabIndex = 0; diff --git a/DEIFR/ImageDownloader.cs b/DEIFR/ImageDownloader.cs index 4dabde4..2761279 100644 --- a/DEIFR/ImageDownloader.cs +++ b/DEIFR/ImageDownloader.cs @@ -51,10 +51,14 @@ namespace DEIFR continue; //Otherwise we don't know what is there } //Image.FromStream(respstr).Save(i + "." + s.Split('/').Last().Split('.')[1]); - string path = id + "." + s.Split('/').Last().Split('.')[1]; + string path = id + "." + s.Split('/').Last().Split('.')[1].Split('?')[0]; //?: FB and similar sites using (WebClient client = new WebClient()) { - client.DownloadFile(s, "wallpapers" + Path.DirectorySeparatorChar + path); + try + { + client.DownloadFile(s, "wallpapers" + Path.DirectorySeparatorChar + path); + } + catch { } //If the image is removed then don't do anything } files.Remove(path); i++;