public void Store(PlayerMonoInfo playerMonoInfo) { var entry = this.GetEntry(playerMonoInfo.Id); if (entry != null) { var index = this.entrys.IndexOf(entry); this.entrys[index] = new PlayerMonoInfoEntry() { Id = playerMonoInfo.Id, MonoInfoId = playerMonoInfo.MonoInfo.Id, IsRelease = playerMonoInfo.IsRelease }; } else { this.entrys.Add(new PlayerMonoInfoEntry() { Id = playerMonoInfo.Id, MonoInfoId = playerMonoInfo.MonoInfo.Id, IsRelease = playerMonoInfo.IsRelease }); } PlayerContextMap.WriteEntry(this.entrys); }
public void SetDetail(PlayerMonoInfo playerMonoInfo, int currentArrangementCount) { this.monoDetailView.UpdateView( playerMonoInfo.MonoInfo.Name, playerMonoInfo.MonoInfo.MakingFee.ToString(), playerMonoInfo.MonoInfo.ArrangementItemAmount.ToString(), currentArrangementCount.ToString(), playerMonoInfo.MonoInfo.ArrangementMaxCount.GetMaxCount(playerMonoInfo.MonoInfo.Id).ToString(), playerMonoInfo.MonoInfo.BaseSatisfaction.ToString(), playerMonoInfo.MonoInfo.Size() ); }
public PlayerMonoInfo GetById(uint id) { var foundEntry = this.GetEntry(id); if (foundEntry == null) { var MonoInfo = this.monoInfoRepository.Get(id); Debug.Assert(MonoInfo != null, "MonoInfo がありません : " + id.ToString()); var playerMonoInfo = new PlayerMonoInfo( id, MonoInfo, false ); return(playerMonoInfo); } return(new PlayerMonoInfo(foundEntry.Id, monoInfoRepository.Get(foundEntry.Id), foundEntry.IsRelease)); }