I'm working on an existing wizard dialog which is implemented as a tabbed page control (with the tabs hidden). The steps of the wizard are defined in an enumerated type. When the user clicks a navigation button the current step is run through a switch statement. Each branch of the switch is filled with additional branching logic (if/then/else) which saves the state of various user choices and assigns the next step (which isn't necessarily sequential and doesn't necessarily coincide with the tab page displayed to the user).
When the current step is modified it triggers an additional switch statement which updates the UI (change tab page, enable/disable controls, etc.)
As implemented the wizard is very sensitive to changes and requires a lot of debugging. I can't help but feel there is a better way to design it. Any suggestions?