private void LoadGameDataFile(string file, bool isUserData) { if (string.IsNullOrWhiteSpace(file) || !File.Exists(file)) { return; } BaseGameData baseGameData = null; try { baseGameData = BaseGameData.Load(file); } catch { // do nothing, just swallow the error } var gameDataFile = new GameDataFile { CreatedDate = baseGameData?.Created ?? DateTime.MinValue, File = file, FileName = string.IsNullOrWhiteSpace(file) ? string.Empty : Path.GetFileNameWithoutExtension(file), IsUserData = isUserData, Version = baseGameData?.Version ?? "0.0.0", HasError = baseGameData == null, }; GameDataFiles.Add(gameDataFile); }
public RaceXEntity() { gameData = new RaceXData(); }
public void SetGameData(BaseGameData data) { gameData = data; }