Beispiel #1
0
        public void RefreshOnItemButonClick(StorageDataItemBase item)
        {
            int idForKey = item.GetIdForKey();

            if (this._sellItemMap.ContainsKey(idForKey))
            {
                this._sellItemMap.Remove(idForKey);
                if (this._isMultiSell)
                {
                    this._sellNum = 0;
                }
            }
            else if (this._isMultiSell)
            {
                this._sellItemMap.Clear();
                this._sellItemMap.Add(idForKey, item);
                this._sellNum = 1;
            }
            else if (this._sellItemMap.Count < 20)
            {
                this._sellItemMap.Add(idForKey, item);
            }
            this.UpdateDataView();
        }
Beispiel #2
0
        public bool IsItemInSelectedMap(StorageDataItemBase item)
        {
            int idForKey = item.GetIdForKey();

            return(this._sellItemMap.ContainsKey(idForKey));
        }
 private KeyValuePair <System.Type, int> GetKeyByItem(StorageDataItemBase item)
 {
     return(new KeyValuePair <System.Type, int>(item.GetType(), item.GetIdForKey()));
 }