コード例 #1
0
 public CardMatsChangedEventArgs(CardMat cardMat, Operation operation)
 {
     this.CardMat        = cardMat;
     _OperationPerformed = operation;
     _AddedCards         = new CardCollection();
     _RemovedCards       = new CardCollection();
 }
コード例 #2
0
        public CardMatsChangedEventArgs(CardMat cardMat, Player player, Operation operation, IEnumerable <Card> cardsChanged)
            : this(cardMat, player, operation)
        {
            switch (operation)
            {
            case CardMatsChangedEventArgs.Operation.Added:
                _AddedCards.AddRange(cardsChanged);
                break;

            case CardMatsChangedEventArgs.Operation.Removed:
                _RemovedCards.AddRange(cardsChanged);
                break;
            }
        }
コード例 #3
0
        internal static CardMat Load(XmlNode xnCardMat)
        {
            XmlNode xnType = xnCardMat.SelectSingleNode("type");

            if (xnType == null)
            {
                return(null);
            }

            Type type = Type.GetType(xnType.InnerText);

            CardMat cardMat = CardMat.CreateInstance(type);

            cardMat.LoadInstance(xnCardMat);

            return(cardMat);
        }
コード例 #4
0
 public CardMatsChangedEventArgs(CardMat cardMat, Player player, Operation operation)
     : this(cardMat, operation)
 {
     _Player = player;
 }