public void OnNavigatedTo(NavigationContext navigationContext) { _player = (from player in _state.Context.Players where player.Id == (int) navigationContext.Parameters["player"] select player).FirstOrDefault(); }
private void ChangePages(Uri obj) { if (obj.Equals(NewAirlineUri)) { _player = new Player { Continent = Continent, Region = SelectedRegion, MajorAirports = MajorAirports, StartYear = Year, Focus = SelectedFocus, Difficulty = SelectedDifficulty, NumOfOpponents = SelectedOpponents, RandomOpponents = RandomOpponents, SameRegion = SameRegion, RealData = RealData, UseDays = GameTurn, Paused = PausedOnStart }; _state.Context.Players.Add(_player); _state.SaveState(); } _regionManager.RequestNavigate("MainContentRegion", obj); }