private void changeCodesMenu_Click(object sender, EventArgs e)
{
// Initialize the dialog with the current codes.
ChangeAllCodes changeCodesDialog = new ChangeAllCodes();
changeCodesDialog.SetEventDB(controller.GetEventDB());
changeCodesDialog.Codes = controller.GetAllControlCodes();
// Show the dialog to allow people to change the codes.
DialogResult result = changeCodesDialog.ShowDialog(this);
// Apply the changes.
if (result == DialogResult.OK) {
controller.SetAllControlCodes(changeCodesDialog.Codes);
}
changeCodesDialog.Dispose();
}