private void LoadAvailableSavegames() { var slots = FileSystemOperations.GetSaveSlots(); if (slots.Length > 0) { AvailableSavegames.Add("Choose a slot"); slots.ToList().ForEach(i => AvailableSavegames.Add(string.Format("Slot {0}", i))); } else { AvailableSavegames.Add("No slots found"); } SelectedSavegame = AvailableSavegames[0]; }
private void ReloadSlots() { AvailableSavegames.Clear(); foreach (var slot in FileSystemOperations.GetSaveSlots()) { AvailableSavegames.Add(string.Format("Slot {0}", slot)); } if (AvailableSavegames.Count > 0) { SelectedSavegame = AvailableSavegames[0]; } AvailableBackups.Clear(); foreach (var slot in BackupManager.GetBackupedSavegameSlots()) { AvailableBackups.Add(string.Format("Slot {0}", slot)); } if (AvailableBackups.Count > 0) { SelectedBackup = AvailableBackups[0]; } }