Reminder: All posts in this series can be found here.
Some time ago, I started work on hosting the Windows Forms design surface in a project. Since that was nearly three years ago, I believe it was in the early .NET 2.0 days. My priorities got redirected and the project languished. A new project is clearly targeted at achieving the same goal, so I am back to building a solid implementation to get a beta front end out the door.
Those old posts are still of good use to remind me of everything I have forgotten in the interim:
Microsoft has subsequently posted a much more complete MSDN Magazine sample:
I am using this sample as the basis for a new project which has a Windows Forms design surface at its heart. The main application will control the execution of a suite of 30 or so training applications in a standalone network. The instructor will be able to control everything from a central computer, remote boot the computers, group the computers together into teams/rooms, remote start individual applications on the computers, assign the teams to specific training exercises, monitor the status of the exercises, and remote stop the applications, and remote shut down the computers.
The use of the Windows Forms design surface will allow me to use custom Windows controls to represent the computers, groups, and rooms. This removes a significant amount of the complexity from the application. The tradeoff is the implementation of the Windows Forms design surface details are nontrivial, but not too difficult.
The first thing I did with the sample was to customize the code to my layout tastes (Ctrl+E, D), deleting and adding blank lines as I scanned through the files. Recompile. Change the namespaces to fit our development scheme. Recompile after each. Extract extra types where there was more than one in a file, again to match our standards. Recompile. Change the executable names and compile locations. Recompile. Add our assembly attributes. Recompile. Clean up the using statements at the top of the code files. Recompile.
OK. Now I feel like I can do some coding.