Пример #1
0
        public BoardPanel()
            : base(COLUMNS, ROWS)
        {
            this.GrowStyle = TableLayoutPanelGrowStyle.AddColumns;

            for (int i = 0; i < COLUMNS; i++)
            {
                Single percent = 100F / COLUMNS;
                this.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, percent));
            }
            for (int i = 0; i < COLUMNS; i++)
            {
                sticks[i] = new StickPanel(Stick_Names[i]);

                this.Controls.Add(sticks[i]);
            }
            this.HScroll = false;
            this.CellBorderStyle = TableLayoutPanelCellBorderStyle.None;
        }
Пример #2
0
        public BoardPanel()
            : base(COLUMNS, ROWS)
        {
            this.GrowStyle = TableLayoutPanelGrowStyle.AddColumns;

            for (int i = 0; i < COLUMNS; i++)
            {
                Single percent = 100F / COLUMNS;
                this.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, percent));
            }
            for (int i = 0; i < COLUMNS; i++)
            {
                sticks[i] = new StickPanel(Stick_Names[i]);

                this.Controls.Add(sticks[i]);
            }
            this.HScroll         = false;
            this.CellBorderStyle = TableLayoutPanelCellBorderStyle.None;
        }