private void buttonBack_Click(object sender, EventArgs e) { if (panelIndex > 0) { panelIndex = GetPreviousPanelIndex(); if (panelIndex == -1) { } else { ShowCurrentPanel(); } } }