I had a go at this last night and I achieved this in the following way:
- Setup a class that inherited ServiceBase as my entry point.
- Had a check in the startup to see if (Interactive=true) if true then I displayed my windows form, else I ran as service.
- The web server class is instantiated from the main class thats inherits ServiceBase and talks to each other via events.
- The windows form interacts with my main class to give the same sort of output that the web server module does.
- The quartz was instantiated from my main class also, and I have routines inside this class for getting state values, running jobs, and event handlers for running new jobs.