示例#1
0
            public void Update(MemberData.Item.Info _info)
            {
                Info = _info;
                SubItems[(int)ColumnIndex.Id].Text       = _info.ItemUID.ToString();
                SubItems[(int)ColumnIndex.Owner].Text    = _info.OwnerString;
                SubItems[(int)ColumnIndex.Name].Text     = _info.Name;
                SubItems[(int)ColumnIndex.Type].Text     = _info.Type;
                SubItems[(int)ColumnIndex.対空].Text       = _info.対空.ToString();
                SubItems[(int)ColumnIndex.装甲].Text       = _info.装甲.ToString();
                SubItems[(int)ColumnIndex.火力].Text       = _info.火力.ToString();
                SubItems[(int)ColumnIndex.雷撃].Text       = _info.雷撃.ToString();
                SubItems[(int)ColumnIndex.回避].Text       = _info.砲撃回避.ToString();
                SubItems[(int)ColumnIndex.Soku].Text     = _info.Soku.ToString();
                SubItems[(int)ColumnIndex.爆装].Text       = _info.爆装.ToString();
                SubItems[(int)ColumnIndex.耐久].Text       = _info.耐久.ToString();
                SubItems[(int)ColumnIndex.対潜].Text       = _info.対潜.ToString();
                SubItems[(int)ColumnIndex.命中].Text       = _info.砲撃命中.ToString();
                SubItems[(int)ColumnIndex.Houk].Text     = _info.Houk.ToString();
                SubItems[(int)ColumnIndex.索敵].Text       = _info.索敵.ToString();
                SubItems[(int)ColumnIndex.運].Text        = _info.運.ToString();
                SubItems[(int)ColumnIndex.射程].Text       = _info.射程String;
                SubItems[(int)ColumnIndex.Rarelity].Text = _info.RareString;
                SubItems[(int)ColumnIndex.Locked].Text   = _info.Locked.ToString();
                SubItems[(int)ColumnIndex.Level].Text    = _info.Level.ToString();


                ImageIndex = _info.TypeNum;
            }
示例#2
0
 public SlotItemInfo(MemberData.Item.Info info)
 {
     ItemOwner = new List <Owner>();
     ID        = info.SlotItemType;
     Name      = info.Name;
     Type      = info.Type;
     TypeNum   = info.TypeNum;
     Count     = 1;
     AddSlotItemOwner(info.Owner);
 }
示例#3
0
            public ItemListViewItem(MemberData.Item.Info info)
            {
                UseItemStyleForSubItems = false;

                for (int n = 0; n < Enum.GetValues(typeof(ColumnIndex)).Length; n++)
                {
                    SubItems.Add("");
                }

                Update(info);
            }
示例#4
0
            /// <summary>
            /// IComparable<ShipListViewItem> の魂の実装
            /// </summary>
            /// <param name="it2"></param>
            /// <returns></returns>
            private int compare(MemberData.Item.Info it2)
            {
                switch (_column)
                {
                case (int)ColumnIndex.Houk:
                    return(Info.Houk - it2.Houk);

                case (int)ColumnIndex.Id:
                    return(Info.ItemUID - it2.ItemUID);

                case (int)ColumnIndex.Name:
                    return(string.Compare(Info.Name, it2.Name));

                case (int)ColumnIndex.Owner:
                    return(string.Compare(Info.OwnerString, it2.OwnerString));

                case (int)ColumnIndex.Rarelity:
                    return(Info.Rare - it2.Rare);

                case (int)ColumnIndex.Soku:
                    return(Info.Soku - it2.Soku);

                case (int)ColumnIndex.Type:
                    return(Info.TypeNum - it2.TypeNum);

                case (int)ColumnIndex.運:
                    return(Info.運 - it2.運);

                case (int)ColumnIndex.火力:
                    return(Info.火力 - it2.火力);

                case (int)ColumnIndex.索敵:
                    return(Info.索敵 - it2.索敵);

                case (int)ColumnIndex.回避:
                    return(Info.砲撃回避 - it2.砲撃回避);

                case (int)ColumnIndex.射程:
                    return(Info.射程 - it2.射程);

                case (int)ColumnIndex.装甲:
                    return(Info.装甲 - it2.装甲);

                case (int)ColumnIndex.対空:
                    return(Info.対空 - it2.対空);

                case (int)ColumnIndex.対潜:
                    return(Info.対潜 - it2.対潜);

                case (int)ColumnIndex.耐久:
                    return(Info.耐久 - it2.耐久);

                case (int)ColumnIndex.爆装:
                    return(Info.爆装 - it2.爆装);

                case (int)ColumnIndex.命中:
                    return(Info.砲撃命中 - it2.砲撃命中);

                case (int)ColumnIndex.雷撃:
                    return(Info.雷撃 - it2.雷撃);

                case (int)ColumnIndex.Locked:
                    return((Info.Locked ? 1 : 0) - (it2.Locked ? 1 : 0));

                case (int)ColumnIndex.Level:
                    return(Info.Level - it2.Level);

                default:
                    System.Diagnostics.Debug.WriteLine("ItemListViewItem compare unknown column" + _column.ToString());
                    throw new NotImplementedException("ItemListViewItem compare unknown column" + _column.ToString());
                }
            }