예제 #1
0
        /// <summary>
        /// 将蓝图转换成一个要显示的 ListViewItem
        /// </summary>
        /// <returns></returns>
        public ListViewItem ListViewItem()
        {
            ListViewItem lvi = new ListViewItem();

            // 蓝图名称
            if (BluePrints == null)
            {
                lvi.Text = invTypes.GetInvTypes(BluePrintID).Name;
            }
            else
            {
                lvi.Text = BluePrints.invTypes.Name;
            }

            lvi.SubItems.Add(ID.ToString());
            lvi.SubItems.Add(ItemID.ToString());
            lvi.SubItems.Add(BluePrintID.ToString());
            lvi.SubItems.Add(MaterialEfficiency.ToString());
            lvi.SubItems.Add(TimeEfficiency.ToString());
            lvi.SubItems.Add(Quantity.ToString());
            lvi.SubItems.Add(Runs.ToString());

            // 如果是角色拥有则显示角色名称, 否则直接显示"军团"
            if (CharacterOwned)
            {
                if (Characters == null)
                {
                    lvi.SubItems.Add(Characters.GetCharacters(Owner).CharacterName);
                }
                else
                {
                    lvi.SubItems.Add(Characters.CharacterName);
                }
            }
            else
            {
                lvi.SubItems.Add("军团");
            }

            lvi.SubItems.Add(LocationID.ToString());
            lvi.SubItems.Add(LocationFlag.ToString());
            lvi.SubItems.Add(UpdateTime.ToString());
            lvi.SubItems.Add(Cost.ToString());

            return(lvi);
        }
예제 #2
0
 public override string ToString()
 {
     return(BluePrints.invTypes.Name + " " + MaterialEfficiency.ToString() + " " + TimeEfficiency.ToString());
 }