From bfafff210c4f590600375a80b829523581ded240 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Tue, 19 Apr 2016 22:20:58 +0200 Subject: [PATCH] Added NuGet package, and did other things --- DEIFR/DEIFR.csproj | 7 ++++--- DEIFR/Form1.Designer.cs | 1 + DEIFR/Form1.cs | 8 ++++++++ DEIFR/Form1.resx | 2 +- DEIFR/Program.cs | 5 +++-- DEIFR/packages.config | 4 ++++ 6 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 DEIFR/packages.config diff --git a/DEIFR/DEIFR.csproj b/DEIFR/DEIFR.csproj index f08f915..158eef8 100644 --- a/DEIFR/DEIFR.csproj +++ b/DEIFR/DEIFR.csproj @@ -32,9 +32,9 @@ 4 - - False - bin\Debug\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + True @@ -69,6 +69,7 @@ True Resources.resx + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/DEIFR/Form1.Designer.cs b/DEIFR/Form1.Designer.cs index 627e360..0ad552a 100644 --- a/DEIFR/Form1.Designer.cs +++ b/DEIFR/Form1.Designer.cs @@ -160,6 +160,7 @@ this.Controls.Add(this.numericUpDown1); this.Name = "Form1"; this.Text = "DEIFR - Download Earth Images From Reddit"; + this.Load += new System.EventHandler(this.Form1_Load); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); diff --git a/DEIFR/Form1.cs b/DEIFR/Form1.cs index e540c8e..04dca6b 100644 --- a/DEIFR/Form1.cs +++ b/DEIFR/Form1.cs @@ -20,6 +20,7 @@ namespace DEIFR Program.Progress = progressBar1; Program.AllProgress = progressBar2; this.FormClosing += Form1_FormClosing; + ImageDownloader.Update(); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) @@ -28,6 +29,8 @@ namespace DEIFR { ImageDownloader.Stop = true; e.Cancel = true; + this.ControlBox = false; + this.Enabled = false; } } @@ -41,5 +44,10 @@ namespace DEIFR Program.MaxImages = (int)numericUpDown1.Value; numericUpDown1.Value = Program.MaxImages; //A way to disallow non-integer inputs } + + private void Form1_Load(object sender, EventArgs e) + { + + } } } diff --git a/DEIFR/Form1.resx b/DEIFR/Form1.resx index c085ab9..f74667c 100644 --- a/DEIFR/Form1.resx +++ b/DEIFR/Form1.resx @@ -120,7 +120,7 @@ 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: %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. diff --git a/DEIFR/Program.cs b/DEIFR/Program.cs index 2f78dea..88a96bc 100644 --- a/DEIFR/Program.cs +++ b/DEIFR/Program.cs @@ -29,7 +29,7 @@ namespace DEIFR return; } AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; - + if (File.Exists("DEIFRSettings.ini")) { string[] ss = File.ReadAllLines("DEIFRSettings.ini"); @@ -47,7 +47,8 @@ namespace DEIFR } } } - ImageDownloader.Update(); + else + MaxImages = 50; if (args.Length == 0) Application.Run(Form = new Form1()); else if (args[0].ToLower() != "silent") diff --git a/DEIFR/packages.config b/DEIFR/packages.config new file mode 100644 index 0000000..55658b8 --- /dev/null +++ b/DEIFR/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file