public static AppSettings Load() { var appSettings = Load(Path.Combine(AppDataDir, "settings.xml")); appSettings.Profiles = ProfileSerialize.Load().Items; appSettings.MoveList = MoveSerialize.Load().Items; appSettings.CopyList = CopySerialize.Load().Items; Log.Debug("All AppSettings data sucessfully loaded."); Log.DebugFormat("{0} profiles loaded", AppSettings.DefInstance.Profiles.Count); Log.DebugFormat("Selected language: {0}", AppSettings.DefInstance.CurrentLanguage.Name); return(appSettings); }
public static void Save() { Log.Debug("Saving AppSettings data"); ProfileSerialize.DefInstance.Items = _profiles; ProfileSerialize.Save(); MoveSerialize.DefInstance.Items = _moveList; MoveSerialize.Save(); CopySerialize.DefInstance.Items = _copyList; CopySerialize.Save(); Save(Path.Combine(AppDataDir, "settings.xml")); Log.Debug("All AppSettings data sucessfully saved."); }