private void InitializeButtons() { string[] buttonNames = new string[5]; for (int i = 0; i < 5; i++) { buttonNames[i] = dbMgr.ReadShortcutButtonName(i + 1); } if (buttonNames[0] != null) { shortcutButton1.Text = buttonNames[0]; } if (buttonNames[1] != null) { shortcutButton2.Text = buttonNames[1]; } if (buttonNames[2] != null) { shortcutButton3.Text = buttonNames[2]; } if (buttonNames[3] != null) { shortcutButton4.Text = buttonNames[3]; } if (buttonNames[4] != null) { shortcutButton5.Text = buttonNames[4]; } }