public static void OverwriteSettings(ProgramSettings source, ProgramSettings destination) { if (source.GetType() != destination.GetType()) { ErrorLog.WriteLine("Types do not match between settings objects; source: {0}, destination: {1}", new object[] { source.GetType(), destination.GetType() }); DlgMessage.ShowDialog(Loc.Get("<LOC>An error occured while saving settings, some changes may not take effect and it is recommended you restart the application.")); } _OverwriteSettings(source, destination); }
public static ProgramSettings Merge(ProgramSettings source, ProgramSettings destination) { try { if (source.GetType() != destination.GetType()) { ErrorLog.WriteLine("Types do not match between settings objects; source: {0}, destination: {1}", new object[] { source.GetType(), destination.GetType() }); MessageBox.Show(Loc.Get("<LOC>An error occured while saving settings, some changes may not take effect and it is recommended you restart the application.")); } _Merge(source, source, destination); return destination; } catch (Exception exception) { ErrorLog.WriteLine(exception); return destination; } }