Ejemplo n.º 1
0
        private void UpdateDetails()
        {
            labelName.Text       = _card.Name;
            labelCardText.Text   = AdjustText(_card.Text);
            labelFlavorText.Text = AdjustText(_card.FlavorText);
            labelType.Text       = _card.Type;
            if (_card.Types.Contains("Planeswalker"))
            {
                labelPower.Text = LoyaltyText(_card.Loyalty);
            }
            else
            {
                labelPower.Text = PowerToughnessText(_card.Power, _card.Toughness);
            }
            CreateCostImages(_card.Manacost);

            if (_card.OtherCard != null)
            {
                SetOtherCardText(_card.OtherCard);
                if (Visible)
                {
                    ShowOtherCard(_card.OtherCard);
                }
            }
            else
            {
                if (_otherCardView != null)
                {
                    _otherCardView.Close();
                }
            }
        }
Ejemplo n.º 2
0
 private void buttonCard_Click(object sender, EventArgs e)
 {
     if (_cardView == null)
     {
         _cardView             = new FormCard();
         _cardView.FormClosed += CardView_FormClosed;
         if (listBoxCardList.SelectedItem != null)
         {
             _cardView.Card = (Card)listBoxCardList.SelectedItem;
         }
         _cardView.Show(this);
     }
     else
     {
         _cardView.Close();
     }
 }