private void Pic_Match_Add(LinkStack <Hero> linkStack)
        {
            LinkStack <Hero> replaceStack = linkStack;
            int i = 0;

            while (replaceStack.Next != null || replaceStack.Head != null)
            {
                LinkStack <Hero> temp = replaceStack.Next;

                this.form.Add_Pic_Box(temp.Node, i * Litle_Util.Properties.Settings.Default.IconSize, y, "Match", Pic_Match_Click);

                i++;
                if (temp.Next != null)
                {
                    replaceStack = temp;
                }
                else if (temp.Head != null)
                {
                    replaceStack = temp.Head;
                    int count = 0;
                    foreach (AttrFilter.Node node in replaceStack.Nodes)
                    {
                        this.form.Add_Pic_Box(node, count * Litle_Util.Properties.Settings.Default.IconSize, y + Litle_Util.Properties.Settings.Default.IconSize + 10, "CurrentAttr", Pic_Match_Click, this.form.Show_ToolTip, this.form.Hide_ToolTip);
                        count++;
                    }
                    AttrFilter.Node describe = new AttrFilter.Node(HeroType.Assassin, 0, 0, replaceStack.Msg, Properties.Resources.TiersIcon);
                    this.form.Add_Pic_Box(describe, 8 * Litle_Util.Properties.Settings.Default.IconSize, y + Litle_Util.Properties.Settings.Default.IconSize + 10, "CurrentAttr", Pic_Info_Click, this.form.Show_ToolTip, this.form.Hide_ToolTip);
                    y += Litle_Util.Properties.Settings.Default.IconSize * 2 + 20;
                    i  = 0;
                }
            }
        }
Example #2
0
        public void Add_Pic_Box(AttrFilter.Node node, int x, int y, String prefix,
                                EventHandler e, EventHandler e2, EventHandler e3)
        {
            PictureBox pic = new PictureBox();

            pic.BackgroundImage       = node.image;
            pic.Location              = new Point(x, y);
            pic.Size                  = new Size(Litle_Util.Properties.Settings.Default.IconSize, Litle_Util.Properties.Settings.Default.IconSize);
            pic.BackgroundImageLayout = ImageLayout.Zoom;
            pic.Click                += new EventHandler(e);
            pic.MouseEnter           += new EventHandler(e2);
            pic.MouseLeave           += new EventHandler(e3);
            pic.Tag = node.msg;
            this.Controls.Add(pic);
        }