Refactor ProfileManager to prefer isolated instances

- Replace DB nomenclatures with ProfilesDoc/Profiles terms
- Convert SetLastProfile() to LastProfileID property
- Remove LoadLastProfileWithoutRecovery function
  - Use LoadWithoutRecovery(LastProfileID)
  - One caller, far more clear with only one LoadWithout function
- Move safe FileSystem UserName to AuthenticationData, like UserName
- Skip importing guest profiles that are missing PrinterSettings files
This commit is contained in:
John Lewin 2016-10-21 12:59:10 -07:00
parent 9cb1aa1575
commit 42cc88b9d4
6 changed files with 112 additions and 129 deletions

View file

@ -105,7 +105,7 @@ namespace MatterHackers.MatterControl.DataStorage.ClassicDB
if (string.IsNullOrEmpty(ProfileManager.Instance.LastProfileID))
{
ProfileManager.Instance.SetLastProfile(printer.Id.ToString());
ProfileManager.Instance.LastProfileID = printer.Id.ToString();
}
printerSettings.UserLayer[SettingsKey.active_theme_name] = UserSettings.Instance.get(UserSettingsKey.ActiveThemeName);