Chapter 11 Generating .NET 2.0 Persistent Objects and Windows Applications
Generating Code for Windows Application
Before generating code for Windows Application, you need to install CAB (available from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/cab.asp)
. Check for the following required files in your installation directory:
- Microsoft.Practices.CompositeUI.dll
- Microsoft.Practices.CompositeUI.WinForms.dll
- Microsoft.Practices.ObjectBuilder.dll
To generate UnitTest code:
- Select Tools→Check Model to verify if there are errors or warnings in the model. If there are errors, fix them before continuing with code generation.
- Select Tools→General Options, and click the Variables node.
- Add a variable CAB_PATH with the value of your installation directory
- Select Language→Generate C# 2.0 Code or Generate Visual Basic 2005 Code to open the Generation dialog box.
- Specify a target directory, and then click OK to begin generation.
The following files will be generated:
- Domain files (persistent classes, mapping files)
- DAL files (database connection file and data access files)
- A solution file and project files
- A login dialog
- Forms for persistent classes
- Controller files
For each persistent class, PowerDesigner generates:
- A find dialog for searching objects
- A list view form for displaying find results
- A detail view form for displaying object's detailed information
- A create view form for creating new objects
You can deploy or edit a Windows application in an IDE, such as Visual Studio .NET 2005.
Copyright (C) 2006. Sybase Inc. All rights reserved.
|
|