Пример #1
0
 public FreeGameSetup()
 {
     Slot1 = new FreeGameSlot();
     Slot2 = new FreeGameSlot();
     Slot3 = new FreeGameSlot();
     Slot4 = new FreeGameSlot();
     Slot5 = new FreeGameSlot();
     Slot6 = new FreeGameSlot();
     Slot7 = new FreeGameSlot();
     Slot8 = new FreeGameSlot();
     SimulatorConfiguration = new SimulatorConfiguration();
     KnownSettingFiles      = new List <string>();
     Reset();
 }
 private void DiscoverPlayerInfo(FreeGameSlot slot)
 {
     if (slot != null &&
         !string.IsNullOrEmpty(slot.Filename) &&
         !string.IsNullOrEmpty(slot.Typename))
     {
         try
         {
             PlayerStore.Instance.RegisterFile(slot.Filename);
             slot.PlayerInfo = PlayerStore.Instance.KnownPlayer.FirstOrDefault(p =>
                                                                               p.File.ToLower().Equals(slot.Filename.ToLower()) && p.ClassName.Equals(slot.Typename));
         }
         catch (Exception)
         {
             // Kick slot, falls es probleme gab
             slot.Filename   = string.Empty;
             slot.PlayerInfo = null;
             slot.Typename   = string.Empty;
         }
     }
 }