コード例 #1
0
        public override void OnInitialized()
        {
            var rMasterInfo = KanColleGame.Current.MasterInfo;

            using (var rCommand = CreateCommand())
            {
                rCommand.CommandText = "SELECT DISTINCT ship FROM construction ORDER BY ship;";
                using (var rReader = rCommand.ExecuteReader())
                {
                    var rShips = new List <ShipInfo>(rReader.VisibleFieldCount);

                    while (rReader.Read())
                    {
                        rShips.Add(rMasterInfo.Ships[rReader.GetInt32(0)]);
                    }

                    Ships.AddRange(rShips);
                }
            }
        }
コード例 #2
0
 public void RestoreState(PlayerMemento memento)
 {
     Ships.AddRange(memento.State.ships);
     Resourses = memento.State.resourses;
 }