示例#1
0
 public void selectItem(int select_style, int select_hatch)
 {
     foreach (ImgBrush ib in Controls)
     {
         if (ib.style == select_style && ib.hatch == select_hatch)
         {
             selectedBrush = ib;
         }
     }
 }
示例#2
0
        private void positioned(ImgBrush ib)
        {
            //horizontal
            //Controls.Add(ib);
            //ib.Location = new Point(x, y);
            //y += ib.Height;
            //if(y>Height-ib.Height)
            //{ x += ib.Width; y = 2; }

            //vertical
            Controls.Add(ib);
            ib.Location = new Point(x, y);
            x          += ib.Width + 4;
            if (x > Width - ib.Width - 10)
            {
                y += ib.Height + 4; x = 5;
            }
        }