Is it possible to replace this
private void buttonClose_Click(object sender, System.EventArgs e)
this.panelPageEdit.Enabled = false;
this.panelPageEdit.Visible = false;
this.panelMainMenu.Enabled = true;
this.panelMainMenu.Visible = true;
with a function that will disable and make invisible any panel depending on which panel the button clicked resides on? In other words I want to access the panel in which 'sender' is on. panelMainMenu will always be the panel I want to enable and make visible so that can stay the same.