Is there a simple .NET code generator for a Event-driven finite state machine?
I am tired of doing this by hand for user-interface objects. I just need the enum definition, the switch statement, and each function call. I do not need a "library".
See Event-driven finite state machine at http://en.wikipedia.org/wiki/Event_driven_finite_state_machine.
State Machines in C# 3.0 using T4 Templates at http://aabs.wordpress.com/2008/06/26/state-machines-in-c-30-using-t4-templates/ seems like it is what I want but the link to the example code is broken.
If I were in your position, I would download the trial version of Enterprise Architect:
http://www.sparxsystems.com.au/products/ea/index.html
I would then model my scenario and then use the code generator. Depending on how many you need to generate you might want to look into some of the more advanced options in the product, such as scripting that might allow you to generate multiple time changing parameters based on a list.
P.S. I don't work for Sparx systems :-), I do love their tools though.