Construct your own software development platform using TangRam (1)

xiaoxiao2021-03-05  21

use

Tangram

Construct your own software development platform

Tangram Website: http://www.appTemplate.com/opencn/

Technical Forum: http://www.appTemplate.com/opencn/msgboard/default.asp

First of production

Tangram

Program main window

After installing the TangRAM development package, open Visual Studio .NET 2003 IDE, select the new project to get the following dialog:

Choose Tangram Application With Com & .Net Support project, enter the project name, produce your first Tangram program, which is an MFC Based application framework. After compiling, you get the following procedure:

The figure above shows the runtime image of a default TangRam program.

Customize

Tangram

program

A Tangram program is dependent on its configuration file, there is a .config file in the same directory of the program, the file name is: "Program. EXE.CONFIG", you can modify this file, in the program engineering RES There is a template for this file in the catalog. If you do not find the specified file in the program directory, the program automatically creates the corresponding .config file according to this template file, this file specifies the basic configuration of Tangram, which is equivalent to a partial registry. If you are not satisfied with the programs' default, you can generate a new main window, the method is as follows: Run the default TangRAM program, click the right mouse button in the default main window, there will be a context menu:

Select "New Work Space" and pop up a new design interface:

In this design interface, you can freely design your main window, the specific example is as follows: Design a split structure, select "createSplitter" in the toolbox and enter the necessary parameters:

Click the CREATE button, the main window becomes:

Choose a creation, select Create TabWindow in the Toolbox, enter the necessary style, parameter:

Click the CREATE button to pop up the following dialog:

Choose a TabWnd type you want, you will get:

Select "MDIPAGE" to enter the appropriate title in the toolbox, select the Add Page:

Select "MDI Page" and select Create MDI Window in the Toolbox:

Click Create to get:

Save this window (turn off the design window) to the directory: c: / program files / tangram / documentserver.appobj / workspace, our specified file is newWorkspace.App, find the configuration file Tangramapp1.exe in the debug directory of the program's project file directory .config, open and edit this file, replace tangramapp1.app replace TangRamapp1.app replace TangRamApp1.app replace TangraMApp1.app, and save, restart, you will get the following procedure:

If you want your new main window you design, you can use C: / Program Files / Tangram / DocumentServer.Appobj / Workspace / NewWorkSpace.App, the default project file in the replacement project project file Tangramapp1.app Delete the original TangraMApp1.app, copy newworkspace.app to the specified RES directory, and renamed Tangramapp1.app), remove the Workspace file with your program as the same name in C: / Program Files / TangRam / DocumentServer.Appobj / Workspace / (This example is TangramApp1.app1.app), restart your Tangram program, you can get the effect you want. By design patterns, you can design your main window arbitrarily. For you

Tangram

Generate a document template:

Start your tangram program, select the New Menu to get the dialog:

Select New Document Template items to get:

Like the design main window, you can design your template window, save templates to c: / program files / tangram / documentserver.Appobj / DOCTEMPLATE directory, so you get a new template, you can design any multiple templates You can create a subdirectory in C: / Program Files / Tangram / DocumentServer.Appobj / DocumentServer.Appobj / DOCTEMPLATE to plan your template, Tangram automatically retrieves the template in C: / Program Files / Tangram / DocumentServer.Appobj / DOCTEMPLATE. There is a property page in the design kit:

There is a command button "showdocpropertypage", you can specify an icon (bitmap of 16'16) for each template, and you can specify the title of the template in the property page, create a drag and drop control bar, etc. Once you have created a template, you can create your own document. Each TangRAM program allows you to support any multiple templates.

转载请注明原文地址:https://www.9cbs.com/read-38133.html

New Post(0)