Recompute `SolveInstance` in AppendAdditionalMenuItems

I have the following definition in my GH plugin:

        public override void AppendAdditionalMenuItems(ToolStripDropDown menu)
            Menu_AppendItem(menu, "Single Form", (sender, e) => singleForm = !singleForm, true, singleForm);
        bool singleForm = false;

The above code runs correctly and the variable singleForm changes correctly using the menu item.
However, in my SolveInstance{} I have a different mechanism based on the variable singleForm.

I want the component to be recomputed when I change the variable with right-click menu.
This currently is achieved by F5 and refreshing the canvas.

Is there a function that I can all run the SolveInstance method from other methods?