Exemple #1
0
        private void AddRibbonSprite(RibbonInfo rib)
        {
            var        name = rib.Name;
            PictureBox pb   = new PictureBox {
                AutoSize = false, Size = new Size(40, 40), BackgroundImageLayout = ImageLayout.Center, Visible = false, Name = PrefixPB + name
            };
            var img = PKMUtil.GetRibbonSprite(name);

            if (img != null)
            {
                pb.BackgroundImage = (Bitmap)img;
            }
            if (img == null)
            {
                return;
            }

            var display = RibbonStrings.GetName(name);

            pb.MouseEnter += (s, e) => tipName.SetToolTip(pb, display);
            FLP_Ribbons.Controls.Add(pb);
        }