public override void LoadSave(object obj) { AuditorServiceSave save = obj as AuditorServiceSave; if (save != null) { Auditors.Clear(); save.Validate(); foreach (var kvp in save.auditors) { Dictionary <string, Auditor> generatorAuditors = new Dictionary <string, Auditor>(); foreach (var kvp2 in kvp.Value) { generatorAuditors.Add(kvp2.Key, new Auditor(kvp2.Value)); } Auditors.Add(kvp.Key, generatorAuditors); } SpeedMults.Clear(); SpeedMults.CopyFrom(save.speedMults); IsLoaded = true; } else { LoadDefaults(); } }
public override void LoadSave(object obj) { TempMechanicServiceSave save = obj as TempMechanicServiceSave; if (save != null) { TempMechanics.Clear(); save.Validate(); foreach (var kvp in save.tempMechanics) { Dictionary <string, TempMechanicInfo> generatorMechanics = new Dictionary <string, TempMechanicInfo>(); foreach (var kvp2 in kvp.Value) { generatorMechanics.Add(kvp2.Key, new TempMechanicInfo(kvp2.Value)); } TempMechanics.Add(kvp.Key, generatorMechanics); } SpeedMults.Clear(); SpeedMults.CopyFrom(save.speedMults); IsLoaded = true; } else { LoadDefaults(); } }
public override void LoadDefaults() { Auditors.Clear(); SpeedMults.Clear(); IsLoaded = true; }
public override void LoadDefaults() { TempMechanics.Clear(); SpeedMults.Clear(); IsLoaded = true; }