コード例 #1
0
        public void ClearDescription()
        {
            RuneImage.Image = null;
            CursorY         = 0;

            TextBoxDescription.Clear();
            foreach (var pb in Links)
            {
                TextBoxDescription.Controls.Remove(pb);
            }
            Links.Clear();
        }
コード例 #2
0
        private void SetRune(Rune r)
        {
            ClearDescription();

            Program.image_cache.LoadRuneImage(r.Hash);

            TextBoxDescription.Clear();

            TextBoxDescription.SelectionColor = Color.LightGray;
            TextBoxDescription.SelectionFont  = ItalicFont;
            TextBoxDescription.AppendText("Illustrated by  " + r.Artist + "\r\n\r\n");


            TextBoxDescription.SelectionColor = GetColorByRarity(r.Rarity);
            TextBoxDescription.SelectionFont  = BoldFont;
            TextBoxDescription.AppendText(r.Name + "\r\n");

            CursorY += 32;

            TextBoxDescription.SelectionColor = Color.LightGray;
            AddLine("Expansion: ", r.Expansion);

            string faction = "";

            for (int i = 0; i < r.Faction.Count - 1; i++)
            {
                faction += r.Faction[i] + ", ";
            }
            if (r.Faction.Count != 0)
            {
                faction += r.Faction[r.Faction.Count - 1];
            }
            AddLine("Faction: ", faction);

            AddLine("Deck limit: ", r.DeckLimit.ToString());
            AddLine("", "");
        }
コード例 #3
0
        public void SetAbility(Ability a)
        {
            ClearDescription();

            a.Description = database_ref.ExtractAbilitiesAndConditions(a.Description, ref a.DescriptionAbilities, ref a.DescriptionConditions);

            TextBoxDescription.Clear();

            TextBoxDescription.SelectionColor = Color.White;
            AddLine(a.ToString(), "");


            TextBoxDescription.SelectionColor = Color.LightGray;

            AddLine("Nora cost: ", a.NoraCost.ToString());
            AddLine("AP cost: ", a.APCost.ToString());
            AddLine("Cooldown: ", a.Cooldown.ToString());

            TextBoxDescription.SelectionColor = Color.LightGray;
            TextBoxDescription.AppendText("\r\n");

            TextBoxDescription.SelectionFont = RegularFont;
            TextBoxDescription.AppendText(a.Description + "\r\n");
        }