private bool SaveConfig()
{
try
{
var config = Config.Load();
config.FromSyncServer(_server);
config.SyncCryptoKey = _cryptoKey;
config.Save();
return true;
}
#region Error handling
catch (IOException ex)
{
Log.Error(ex);
Msg.Inform(this, ex.Message, MsgSeverity.Error);
return false;
}
catch (UnauthorizedAccessException ex)
{
Log.Error(ex);
Msg.Inform(this, ex.Message, MsgSeverity.Error);
return false;
}
catch (InvalidDataException ex)
{
Log.Error(ex);
Msg.Inform(this, ex.Message, MsgSeverity.Error);
return false;
}
#endregion
}
#endregion