CadEditor.UtilsGui.prepareBlocksPanel C# (CSharp) Метод

prepareBlocksPanel() публичный статический Метод

public static prepareBlocksPanel ( System.Windows.Forms.FlowLayoutPanel blocksPanel, Size buttonSize, ImageList buttonsImages, EventHandler buttonBlockClick, int startIndex, int count ) : void
blocksPanel System.Windows.Forms.FlowLayoutPanel
buttonSize System.Drawing.Size
buttonsImages System.Windows.Forms.ImageList
buttonBlockClick EventHandler
startIndex int
count int
Результат void
        public static void prepareBlocksPanel(FlowLayoutPanel blocksPanel, Size buttonSize, ImageList buttonsImages, EventHandler buttonBlockClick, int startIndex, int count)
        {
            blocksPanel.Controls.Clear();
            blocksPanel.SuspendLayout();
            for (int i = startIndex; i < startIndex + count; i++)
            {
                var but = new Button();
                but.FlatStyle = FlatStyle.Flat;
                but.Size = buttonSize;
                but.ImageList = buttonsImages;
                but.ImageIndex = i;
                but.Click += buttonBlockClick;
                but.Margin = new Padding(0);
                but.Padding = new Padding(0);
                blocksPanel.Controls.Add(but);
            }
            blocksPanel.ResumeLayout();
        }