示例#1
0
 /// <summary>
 /// 移除PurchaseResult
 /// </summary>
 public void RemovePurchaseResult(PurchaseResult result)
 {
     if (HasPurchaseResult())
     {
         _keys.Remove(result);
         _keyDirty = true;
     }
 }
示例#2
0
 void AddKey(PurchaseResult item)
 {
     if (_keys == null)
     {
         LoadKeys();
     }
     if (_keys != null)
     {
         _keys.Add(item);
         _keyDirty = true;
     }
 }
示例#3
0
        /// <summary>
        /// 获得第一个PurchaseResult
        /// </summary>
        /// <param name="remove">是否移除记录</param>
        public PurchaseResult GetFristPurchaseResult(bool remove)
        {
            PurchaseResult res = null;

            if (HasPurchaseResult())
            {
                res = _keys [0];
                if (remove)
                {
                    RemovePurchaseResult(res);
                }
            }

            return(res);
        }
示例#4
0
        /// <summary>
        /// 获得第一个PurchaseResult
        /// </summary>
        /// <param name="remove">是否移除记录</param>
        public PurchaseResult GetFristPurchaseResult(string key, int code, bool remove)
        {
            PurchaseResult res = null;

            if (HasPurchaseResult())
            {
                for (int i = 0; i < _keys.Count; i++)
                {
                    if (_keys[i].iapKey.CompareTo(key) == 0 && _keys[i].code == code)
                    {
                        res = _keys [i];
                        if (remove)
                        {
                            RemovePurchaseResult(res);
                        }
                        break;
                    }
                }
            }

            return(res);
        }