Пример #1
0
        private void CloseButton_Click(object sender, RoutedEventArgs e)
        {
            var button = e.OriginalSource as CardAcceptanceButton;
            CardAcceptanceDescription descr    = button.CardAcceptanceDescription;
            StrategyDescription       strategy = button.StrategyDescription;

            strategy.PurchaseOrderDescriptions.Remove(descr);
        }
        private void AddSelectedCardsToStrateyDescription(StrategyDescription strategyDescription)
        {
            Dominion.Card[] cards = GetSelectedCardsAndClear();
            var             originalDescription = strategyDescription.ConvertToDominionStrategy();

            if (originalDescription.IsEmptyPurchaseOrder)
            {
                originalDescription = Dominion.Strategy.Description.StrategyDescription.GetDefaultDescription(this.appDataContext.GetGameConfig());
            }
            var newDescription = originalDescription.AddCardsToPurchaseOrder(cards);

            strategyDescription.PopulateFrom(newDescription);
        }