public bool Init()
{
bool retVal = false;
try
{
Attributions.Add("PRESAGE",
Resources.PresageAttribution);
Settings.PreferencesFilePath = UserManager.GetFullPath(SettingsFileName);
_presageSettings = Settings.Load();
if (_presageSettings.StartPresageIfNotRunning)
{
checkAndRunPresage();
}
retVal = initPresage();
if (!retVal)
{
// failure mostly means the presage config file has an
// incorrect database path. Delete the config file so
// it will regenerate and then we can insert the correct
// database path when we init again
deletePresageConfigFile();
retVal = initPresage();
}
}
catch (Exception ex)
{
Log.Debug("Error initializing Presage. " + ex);
}
return retVal;
}