Little fixes.

This commit is contained in:
Norbi Peti 2015-01-10 23:32:31 +00:00
parent 261c67fe9b
commit d76568373a
4 changed files with 43 additions and 2 deletions

View file

@ -83,6 +83,10 @@
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View file

@ -28,12 +28,14 @@
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.SuspendLayout();
//
@ -98,12 +100,26 @@
this.label4.TabIndex = 5;
this.label4.Text = "If you want to automatically start the program on boot, provide the \"silent\" pare" +
"meter.";
//
// textBox1
//
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBox1.Location = new System.Drawing.Point(16, 96);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ReadOnly = true;
this.textBox1.Size = new System.Drawing.Size(402, 197);
this.textBox1.TabIndex = 6;
this.textBox1.Text = resources.GetString("textBox1.Text");
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(440, 118);
this.ClientSize = new System.Drawing.Size(440, 305);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
@ -126,6 +142,7 @@
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox1;
}
}

View file

@ -117,4 +117,13 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="textBox1.Text" xml:space="preserve">
<value>
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.
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.
The way it works is that it stores a path and if you don't select all, then it stores the images selected or not selected possibly based on which has more. Even if you select all images, it stores what files are selected, which is different than selecting the whole folder...</value>
</data>
</root>

View file

@ -20,6 +20,12 @@ namespace DEIFR
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if(!File.Exists("Newtonsoft.Json.dll"))
{
MessageBox.Show("Could not find library Newtonsoft.Json.dll\nPlease download the file to use this program.");
return;
}
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
if (File.Exists("DEIFRSettings.ini"))
{
string[] ss = File.ReadAllLines("DEIFRSettings.ini");
@ -40,12 +46,17 @@ namespace DEIFR
ImageDownloader.Update();
if (args.Length == 0)
Application.Run(new Form1());
else if (args[0] != "silent")
else if (args[0].ToLower() != "silent")
Console.WriteLine("Error: Unknown parameter(s). Use \"silent\" to open in background, otherwise don't give any parameters to show settings.");
List<string> sw = new List<string>();
sw.Add("maximages=" + MaxImages);
sw.Add("keepimages=" + KeepImages);
File.WriteAllLines("DEIFRSettings.ini", sw);
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
MessageBox.Show("Error!\n" + ((Exception)e.ExceptionObject).Message);
}
}
}