mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Small stability fixes
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1811 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
9017331dc5
commit
9b7c7a9b7e
4 changed files with 86 additions and 55 deletions
|
@ -54,25 +54,30 @@ namespace GreenshotPlugin.Core {
|
|||
/// Static initializer for the language code
|
||||
/// </summary>
|
||||
static Language() {
|
||||
if (!LogHelper.isInitialized) {
|
||||
LOG.Warn("Log4net hasn't been initialized yet! (Design mode?)");
|
||||
LogHelper.InitializeLog4NET();
|
||||
}
|
||||
if (!IniConfig.IsInited) {
|
||||
LOG.Warn("IniConfig hasn't been initialized yet! (Design mode?)");
|
||||
IniConfig.Init("greenshot", "greenshot");
|
||||
}
|
||||
string applicationDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
string applicationFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
|
||||
// PAF Path
|
||||
AddPath(Path.Combine(applicationFolder, @"App\Greenshot\Languages"));
|
||||
|
||||
// Application data path
|
||||
AddPath(Path.Combine(applicationDataFolder, @"Greenshot\Languages\"));
|
||||
|
||||
// Startup path
|
||||
AddPath(Path.Combine(applicationFolder, @"Languages"));
|
||||
if (!LogHelper.isInitialized) {
|
||||
LOG.Warn("Log4net hasn't been initialized yet! (Design mode?)");
|
||||
LogHelper.InitializeLog4NET();
|
||||
}
|
||||
|
||||
try {
|
||||
string applicationDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
string applicationFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
|
||||
// PAF Path
|
||||
AddPath(Path.Combine(applicationFolder, @"App\Greenshot\Languages"));
|
||||
|
||||
// Application data path
|
||||
AddPath(Path.Combine(applicationDataFolder, @"Greenshot\Languages\"));
|
||||
|
||||
// Startup path
|
||||
AddPath(Path.Combine(applicationFolder, @"Languages"));
|
||||
} catch (Exception pathException) {
|
||||
LOG.Error(pathException);
|
||||
}
|
||||
|
||||
try {
|
||||
using (RegistryKey languageGroupsKey = Registry.LocalMachine.OpenSubKey(LANGUAGE_GROUPS_KEY, false)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue