Added the other files too.

This commit is contained in:
Norbi Peti 2015-01-11 12:51:53 +00:00
parent d76568373a
commit 167002018f
3 changed files with 38 additions and 2 deletions

22
DEIFR.sln Normal file
View file

@ -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

View file

@ -43,6 +43,16 @@
// //
this.numericUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 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.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.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(120, 20); this.numericUpDown1.Size = new System.Drawing.Size(120, 20);
this.numericUpDown1.TabIndex = 0; this.numericUpDown1.TabIndex = 0;

View file

@ -51,11 +51,15 @@ namespace DEIFR
continue; //Otherwise we don't know what is there continue; //Otherwise we don't know what is there
} }
//Image.FromStream(respstr).Save(i + "." + s.Split('/').Last().Split('.')[1]); //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()) using (WebClient client = new WebClient())
{
try
{ {
client.DownloadFile(s, "wallpapers" + Path.DirectorySeparatorChar + path); client.DownloadFile(s, "wallpapers" + Path.DirectorySeparatorChar + path);
} }
catch { } //If the image is removed then don't do anything
}
files.Remove(path); files.Remove(path);
i++; i++;
} }