Added NuGet package, and did other things

This commit is contained in:
Norbi Peti 2016-04-19 22:20:58 +02:00
parent 1c4e88b6a5
commit bfafff210c
6 changed files with 21 additions and 6 deletions

View file

@ -32,9 +32,9 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>bin\Debug\Newtonsoft.Json.dll</HintPath> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@ -69,6 +69,7 @@
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
</Compile> </Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>

View file

@ -160,6 +160,7 @@
this.Controls.Add(this.numericUpDown1); this.Controls.Add(this.numericUpDown1);
this.Name = "Form1"; this.Name = "Form1";
this.Text = "DEIFR - Download Earth Images From Reddit"; this.Text = "DEIFR - Download Earth Images From Reddit";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();

View file

@ -20,6 +20,7 @@ namespace DEIFR
Program.Progress = progressBar1; Program.Progress = progressBar1;
Program.AllProgress = progressBar2; Program.AllProgress = progressBar2;
this.FormClosing += Form1_FormClosing; this.FormClosing += Form1_FormClosing;
ImageDownloader.Update();
} }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) private void Form1_FormClosing(object sender, FormClosingEventArgs e)
@ -28,6 +29,8 @@ namespace DEIFR
{ {
ImageDownloader.Stop = true; ImageDownloader.Stop = true;
e.Cancel = true; e.Cancel = true;
this.ControlBox = false;
this.Enabled = false;
} }
} }
@ -41,5 +44,10 @@ namespace DEIFR
Program.MaxImages = (int)numericUpDown1.Value; Program.MaxImages = (int)numericUpDown1.Value;
numericUpDown1.Value = Program.MaxImages; //A way to disallow non-integer inputs numericUpDown1.Value = Program.MaxImages; //A way to disallow non-integer inputs
} }
private void Form1_Load(object sender, EventArgs e)
{
}
} }
} }

View file

@ -120,7 +120,7 @@
<data name="textBox1.Text" xml:space="preserve"> <data name="textBox1.Text" xml:space="preserve">
<value> <value>
Important: Important:
You will need to do a little change to automatically update the wallpapers because currently the program cannot do it. Then it should work fine but it needs more testing. If it needs to set again and again then I will make an option in the program to do that automatically. You may need to do a little change to automatically update the wallpapers and currently the program cannot do it. Then it should work fine but it needs more testing. If it needs to set again and again then I will make an option in the program to do that automatically.
Open this file: Open this file:
%appdata%\Microsoft\Windows\Themes\slideshow.ini %appdata%\Microsoft\Windows\Themes\slideshow.ini
And delete everything starting with [Slideshow1] and such. Only keep the first [Slideshow] part. Save the file and now it should select every file in the folder. And delete everything starting with [Slideshow1] and such. Only keep the first [Slideshow] part. Save the file and now it should select every file in the folder.

View file

@ -29,7 +29,7 @@ namespace DEIFR
return; return;
} }
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
if (File.Exists("DEIFRSettings.ini")) if (File.Exists("DEIFRSettings.ini"))
{ {
string[] ss = File.ReadAllLines("DEIFRSettings.ini"); string[] ss = File.ReadAllLines("DEIFRSettings.ini");
@ -47,7 +47,8 @@ namespace DEIFR
} }
} }
} }
ImageDownloader.Update(); else
MaxImages = 50;
if (args.Length == 0) if (args.Length == 0)
Application.Run(Form = new Form1()); Application.Run(Form = new Form1());
else if (args[0].ToLower() != "silent") else if (args[0].ToLower() != "silent")

4
DEIFR/packages.config Normal file
View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
</packages>