After you create the project, there are some default settings you must change:
Right-click the XYZSales project in the Solution Explorer and select Properties.
In the Propeerties window, select Common Properties | General from the left-hand tree navigation menu.
In the Application category of the Properties editor,
on the right side of the screen, change the Assembly Name field
to XYZ Sales
(there is a space between
XYZ and Sales).
Open the Form1.cs file and
search the source code for Form1
.
Replace all instances of the Form1
string
with FormSalesOrders
.
Rename the Form1.cs file to FormSalesOrders.cs.
In the FormSalesOrders.cs file, locate and remove the Main function. You will add a new customized Main function to the project later, in a different class.
Now you must add the references to the Unwired Accelerator API assemblies that are included in the UA.API-bin.zip archive file:
Unzip the UA.API-bin.zip file on your C:\ drive.
In the Visual Studio .NET Solution Explorer window, from the Option menu, select Add Reference.
In the window that appears, on the .NET tab, click Browse.
From the unzipped archive, browse to theUA.API\bin\CF1.0 directory and select these two files:
Sybase.UnwiredAccelerator.Commons.dll
Sybase.UnwiredAccelerator.Data.dll
Browse to UA.API\bin\ultralite\ce and select iAnywhere.Data.UltraLite.dll.
Browse to UA.API\bin\ultralite\ce\en and select iAnywhere.Data.UltraLite.resources.dll.
Click OK to add the references to the project.
In the Solution Explorer, right-click the project and select Add | Add Existing Item and browse to UA.API\bin\ultralite\ce\arm.
Change the Files of Type drop-down to All Files.
Select ulnet9.dll, click the arrow next to the Open button, and select Link File. Repeat this step for these files:
UA.API\bin\base.usm
UA.API\bin\localdb.usm
After linking the files in the previous step, select each file individually in the Solution Explorer and check the Properties window to verify the Build Action property is set to Content for each file.
Now add a new class file to the project named Program.cs that contains a class named Program. The purpose of the Program class is to serve as a main point of entry for the client as well as a single interface for some global management classes that will be added next. See the sample implementation to get the source code of the Program class.