- create a new application named ShellApplication.sln
- In Add Reference Select these three DLLs:
Microsoft.Practices.CompositeUI.dll
Microsoft.Practices.CompositeUI.WinForms.dll
Microsoft.Practices.ObjectBuilder.dll - Create a form named ShellForm.cs
- Create a WorkItem
- Create a class named ShellWorkItem.cs
using Microsoft.Practices.CompositeUI - ShellWorkItem class inherits from WorkItem as shown
public class ShellWorkItem : WorkItem
{}
- Create a class named ShellWorkItem.cs
- rename the file Program.cs to ShellApplication.cs and open it.
using Microsoft.Practices.CompositeUI.WinForms;- Replace the static class ShellApplication with a public class that inherits from FormShellApplication as below
public class ShellApplication : FormShellApplication < shellworkitem, ShellForm> - Change the static Main method as follows
[STAThread]
static void Main()
{
new ShellApplication().Run();
}
- Replace the static class ShellApplication with a public class that inherits from FormShellApplication as below
- Save and Run the application
Sunday, May 20, 2007
Stage 1: Creating the Shell and the Form
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment