private void CreateButtons()
{
string[,] table =
{
{"1","f","e","d","c","b","a"},
{"8","7","6","5","4","3","2"},
{"15","14","13","12","11","10","9"},
{"22","21","20","19","18","17","16"},
{"29","28","27","26","25","24","23"},
{"36","35","34","33","32","31","30"}
};
var buttons = new Button[6,7];
int y = 20;
for (int i = 0; i < 6; ++i)
{
for (int j = 0; j < 7; ++j)
{
buttons[i,j] = new Button();
buttons[i,j].Text = table[i,j];
var x = 10 + j * 40;
buttons[i,j].Location = new Point(x, y);
buttons[i,j].Size = new Size(40, 20);
Controls.Add(buttons[i,j]);
}
y += 20;
}
}