private void CheckPanelAlreadySet(TableLayoutPanel panel) { if (!mainPanel.Contains(panel)) { mainPanel.Controls.Remove(gamePanel); mainPanel.Controls.Add(panel, 0, 1); } }