Beispiel #1
0
    public List <CardData> FiltterCardsData(List <CardData> cDat, bool showCardPlayerDontOwn = false, Dictionary <string, int> quantityOfCardsUserHaveFromBDOnline = null,
                                            CardRarity rarity = CardRarity.NONE, bool isChainable            = false, bool isDarkCard = false, int darkPoints = -1,
                                            CARDTYPE cardType = CARDTYPE.NONE, ACTIVATIONTYPE activationType = ACTIVATIONTYPE.NONE, string keyword = "")
    {
        if (quantityOfCardsUserHaveFromBDOnline != null && showCardPlayerDontOwn == false)
        {
            cDat = FiltterCardDataWithCardsUserDontOwn(quantityOfCardsUserHaveFromBDOnline, cDat);
        }

        cDat = FiltterCardDataByRarity(rarity, cDat);
        cDat = FiltterCardDataByType(cardType, cDat);
        cDat = FiltterCardDataByActivationType(activationType, cDat);
        if (isChainable)
        {
            cDat = FiltterCardDataOnlyChainable(cDat);
        }
        if (isDarkCard || darkPoints > -1)
        {
            cDat = FiltterCardDataOnlyDark(cDat);
        }
        if (darkPoints > -1)
        {
            cDat = FiltterCardDataByDarkPointAmount(cDat, darkPoints);
        }
        cDat = FiltterCardDataByKeyword(cDat, keyword);

        var             orderList = cDat.OrderBy(c => c.ID);
        List <CardData> cda       = orderList.ToList();

        return(cda);
    }
        public static ACTIVATIONTYPE GetActivationTypeFromInt(int pIDActType)
        {
            //var myEnumMemberCount = Enum.GetNames(typeof(MyEnum)).Length;
            //YourEnum foo = (YourEnum)yourInt;
            int acTypeTotalCount = Enum.GetNames(typeof(ACTIVATIONTYPE)).Length;

            if (pIDActType - 1 >= acTypeTotalCount || pIDActType - 1 < 0)
            {
                return(ACTIVATIONTYPE.NONE);
            }

            ACTIVATIONTYPE acType = (ACTIVATIONTYPE)pIDActType - 1;

            return(acType);
        }
Beispiel #3
0
    public List <CardData> FiltterCardDataByActivationType(ACTIVATIONTYPE acType, List <CardData> cards)
    {
        if (acType == ACTIVATIONTYPE.NONE)
        {
            return(cards);
        }

        List <CardData> returnC = new List <CardData>();

        for (int i = 0; i < cards.Count; i++)
        {
            if (cards[i].ActivationType == acType)
            {
                returnC.Add(cards[i]);
            }
        }
        return(returnC);
    }
        void IActivationFilter.HandleActivation(ACTIVATIONTYPE dwActivationType, ref Guid rclsid, out Guid pReplacementClsId)
        {
            pReplacementClsId = rclsid;
            lock (this)
            {
                if (_writer == null)
                {
                    return;
                }

                COMCLSIDEntry entry = _registry?.MapClsidToEntry(rclsid);
                if (entry == null)
                {
                    _writer.WriteLine("dwActivationType: {0} rclsid: {1}",
                                      dwActivationType, rclsid);
                }
                else
                {
                    _writer.WriteLine("dwActivationType: {0} rclsid: {1} name '{2}'",
                                      dwActivationType, rclsid, entry.Name);
                }
            }
        }
Beispiel #5
0
 public void HandleActivation(ACTIVATIONTYPE dwActivationType, ref Guid rclsid, out Guid pReplacementClsId)
 {
     pReplacementClsId = rclsid;
     System.Diagnostics.Trace.WriteLine(string.Format("{0} {1}", dwActivationType, rclsid));
 }
 public void SetCardActivationTypeInteractuableImage(CardCollectionSearchManager cardColelctionSearchManager, ACTIVATIONTYPE actType, string text)
 {
     this.cardColelctionSearchManager = cardColelctionSearchManager;
     this.actType   = actType;
     this.text.text = text;
 }
Beispiel #7
0
    public void OnFiltterByActivationTypeButtonPress(List <CardActivationTypeInteractuableImage> cardActivationTypeInteractuableImage, ACTIVATIONTYPE actType)
    {
        if (vsFiltters.actType == actType)
        {
            return;
        }

        foreach (CardActivationTypeInteractuableImage i in cardActivationTypeInteractuableImage)
        {
            if (i.actType != actType)
            {
                i.backgroundImage.color = i.UnactiveColor;
                i.IsPressed             = false;
            }
        }
        vsFiltters.actType = actType;
        Refresh();
    }
Beispiel #8
0
 public void OnFiltterByActivationTypeButtonPress(ACTIVATIONTYPE actType)
 {
     visualFiltterUIHandler.OnFiltterByActivationTypeButtonPress(cardActivationTypeInteractImage, actType);
 }