コード例 #1
0
        public void SetCard(CardInfos card)
        {
            tb_cardname.Text = card.Name;
            CardType[] typeArray = card.GetCardTypes();
            string     level     = "";
            string     atkdef    = "";
            string     attribute = "";

            if (typeArray.Contains(CardType.Magie) || typeArray.Contains(CardType.Piège))
            {
            }
            else
            {
                if (!typeArray.Contains(CardType.Link))
                {
                    if (typeArray.Contains(CardType.Pendule))
                    {
                        level = string.Format("◊{0}    {1}◊", card.LScale, card.RScale);
                    }
                    else
                    {
                        level = card.Level + "★";
                    }

                    atkdef = string.Format("{0}/{1}", card.Atk, card.Def);
                }
                else
                {
                    LinkMarker[] markers = card.GetLinkMarkers();
                    atkdef = card.Atk + "/LINK-" + markers.Count();

                    level = GetStringLinksMarkers(markers);
                }
                attribute = string.Format("{0}|{1}", card.GetRace(), card.GetAttribute());
            }
            tb_cardlevel.Text     = level;
            tb_cardatkdef.Text    = atkdef;
            tb_cardattribute.Text = attribute;
            tb_cardtype.Text      = card.GetCardType();
            tb_carddesc.Text      = card.Description;

            img_card.Source = FormExecution.AssetsManager.GetPics(new string[] { "BattleCityAlpha", "pics", card.Id + ".jpg" });
        }
コード例 #2
0
        private void SetCard(CardInfos card)
        {
            tb_cardname.Text = card.Name;
            CardType[] typeArray = card.GetCardTypes();
            string     level     = "";
            string     atkdef    = "";
            string     attribute = "";

            if (typeArray.Contains(CardType.Magie) || typeArray.Contains(CardType.Piège))
            {
            }
            else
            {
                if (!typeArray.Contains(CardType.Link))
                {
                    if (typeArray.Contains(CardType.Pendule))
                    {
                        level = string.Format("◊{0}    {1}◊", card.LScale, card.RScale);
                    }
                    else
                    {
                        level = card.Level + "★";
                    }

                    atkdef = string.Format("{0}/{1}", card.Atk, card.Def);
                }
                else
                {
                    LinkMarker[] markers = card.GetLinkMarkers();
                    atkdef = card.Atk + "/LINK-" + markers.Count();

                    level = GetStringLinksMarkers(markers);
                }
                attribute = string.Format("{0}|{1}", card.GetRace(), card.GetAttribute());
            }
            tb_cardlevel.Text     = level;
            tb_cardatkdef.Text    = atkdef;
            tb_cardattribute.Text = attribute;
            tb_cardtype.Text      = card.GetCardType();
            tb_carddesc.Text      = card.Description;
        }