예제 #1
0
 /// <summary>
 /// 艦隊情報を反映
 /// </summary>
 /// <param name="deckData"></param>
 public void UpdateShipListDeck(MemberData.Deck deckData)
 {
     if (InvokeRequired)
     {
         BeginInvoke((MethodInvoker)(() => updateDeck(deckData)));
     }
     else
     {
         updateDeck(deckData);
     }
 }
예제 #2
0
        void updateDeck(MemberData.Deck deckData)
        {
            lvShipList.BeginUpdate();
            int used = 0;

            foreach (ShipListViewItem it in lvShipList.Items)
            {
                var fld = deckData.GetShipDeckData(it.Info.ShipId);
                it.Info.UpdateDeckInfo(fld);
                it.UpdateItem(ShipListViewItem.ColumnIndex.Fleet);

                if (it.Info.Fleet != null && it.Info.Fleet.Length > 0)
                {
                    used++;
                }
            }

            Text = string.Format("艦娘一覧 艦隊:{0} {1}/{2}", used, lvShipList.Items.Count, MaxShip);
            lvShipList.EndUpdate();
        }