示例#1
0
        private void addiconbutton_Click(object sender, EventArgs e)
        {
            ChooseIcon chooseform = new ChooseIcon(itemicons);

            if (chooseform.ShowDialog() == DialogResult.OK)
            {
                SelectedIcon holder = new SelectedIcon();
                holder.Size = new Size(2048, 2048);
                Panel pp = new Panel();
                pp.Left   = 10; pp.Top = 10;
                pp.Height = 32; pp.Width = 32;
                pp.Controls.Add(holder);
                holder.DoubleClick += new EventHandler(removeicon);
                holder.Image        = itemicons.Image;
                //holder.Width = 32;holder.Height = 32;
                SetIcon(chooseform.Icon, holder);
                CurrentItemType.Icons.Add(chooseform.Icon);
                holder.IconValue = chooseform.Icon;
                iconlayout.Controls.Add(pp);
                foreach (Control k in equiptypeicongroup.Controls)
                {
                    //Reposition(k);
                }
            }
        }
示例#2
0
        private void iconimage_DoubleClick(object sender, EventArgs e)
        {
            ChooseIcon chooseform = new ChooseIcon(iconimage);

            if (chooseform.ShowDialog() == DialogResult.OK)
            {
                SetIcon(chooseform.Icon, iconimage);
                CurrentAbility.Icon = chooseform.Icon;
            }
        }