コード例 #1
0
        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);
        }
コード例 #2
0
 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()
         );
 }
コード例 #3
0
        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));
        }