public void RefreshOnItemButonClick(StorageDataItemBase item) { KeyValuePair <System.Type, int> keyByItem = this.GetKeyByItem(item); if (this._selectedItemMap.ContainsKey(keyByItem)) { if (this._isMulti) { this._modifyingItem = this._selectedItemMap[keyByItem]; this.OnIncreaseBtnClick(); } else { this._selectedItemList.Remove(this._selectedItemMap[keyByItem]); this._selectedItemMap.Remove(keyByItem); } } else if (this._selectedItemMap.Count < 6) { StorageDataItemBase base2 = item.Clone(); base2.number = 1; this._selectedItemList.Add(base2); this._selectedItemMap.Add(keyByItem, base2); if (this._isMulti) { this._modifyingItem = base2; } } this.UpdateDataView(); }