Added logic which forces the greenshot.ini to be created in the startup-path (where the executable is) when there is no log4net.xml available. This is useful when someone just wants to use the greenshot.exe

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1607 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-01-24 20:59:26 +00:00
commit 83570e855b
4 changed files with 28 additions and 5 deletions

View file

@ -50,7 +50,7 @@ namespace GreenshotPlugin.Core {
/// </summary>
[IniSection("Core", Description="Greenshot core configuration")]
public class CoreConfiguration : IniSection {
[IniProperty("Language", Description="The language in IETF format (e.g. en-EN)")]
[IniProperty("Language", Description="The language in IETF format (e.g. en-US)")]
public string Language;
[IniProperty("RegionHotkey", Description="Hotkey for starting the region capture", DefaultValue="PrintScreen")]

View file

@ -23,6 +23,7 @@ using System.IO;
using System.Reflection;
using System.Windows.Forms;
using IniFile;
using log4net;
using log4net.Appender;
using log4net.Config;
@ -58,6 +59,7 @@ namespace GreenshotPlugin.Core {
using (Stream stream = assem.GetManifestResourceStream("GreenshotPlugin.log4net-embedded.xml")) {
XmlConfigurator.Configure(stream);
isLog4NetConfigured = true;
IniConfig.ForceIniInStartupPath();
}
} catch {}
}