コード例 #1
0
ファイル: AuditorService.cs プロジェクト: OlegGelezcov/boscs
        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();
            }
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
ファイル: AuditorService.cs プロジェクト: OlegGelezcov/boscs
 public override void LoadDefaults()
 {
     Auditors.Clear();
     SpeedMults.Clear();
     IsLoaded = true;
 }
コード例 #4
0
 public override void LoadDefaults()
 {
     TempMechanics.Clear();
     SpeedMults.Clear();
     IsLoaded = true;
 }