public static void BindNavButton(Button button, FormGenerator formGen) { if (buttons.Contains(button)) { button.Click += (sender, e) => NavButtonWrapper(sender, e, formGen); } }
public static void NavButtonWrapper(object sender, EventArgs e, FormGenerator formGen) { ClearControls(); formGen.GenForm(); }