TEAM DEVELOPER. Your First.NET/WPF Application. Product Version 6.3



Similar documents
TD MOBILE. Guide to Publishing Applications. Product Version 1.2

TD MOBILE. NoSQL Data Operations. Product Version 2.0

SQLBASE. Starter Guide. Product Version

TD MOBILE. Database Connectivity Guide. Product Version 2.0

SQLBASE. Console Guide. Product Version

NXJ. What s New in NXJ. Product Version 12.2

SQLBase. Starter Guide

SQLConsole Guide Sqlconsole Guide Page 1

Symantec Enterprise Vault Technical Note. Administering the Monitoring database. Windows

Symantec Indepth for. Technical Note

Symantec Enterprise Vault

How to Deploy Models using Statistica SVB Nodes

Enterprise Vault.cloud. Microsoft Exchange Managed Folder Archiving Guide

Track and Trace. Administration Guide

Team Developer 6 New Controls Demonstration. Gupta Technologies

FOR WINDOWS FILE SERVERS

Norton Small Business. Getting Started Guide

Quest ChangeAuditor 5.1 FOR ACTIVE DIRECTORY. User Guide

Symantec Backup Exec Management Plug-in for VMware User's Guide

ChangeAuditor 6.0. Web Client User Guide

Aras Innovator.NET Client Security Policy Configuration

Symantec Enterprise Vault

Enabling Windows Management Instrumentation Guide

Using Backup Exec System Recovery's Offsite Copy for disaster recovery

Dell Spotlight on Active Directory Server Health Wizard Configuration Guide

formerly Help Desk Authority HDAccess Administrator Guide

4.0. Offline Folder Wizard. User Guide

Symantec Mobile Management for Configuration Manager

Symantec Enterprise Vault

Symantec Enterprise Vault

Policy Based Encryption Essentials. Administrator Guide

Symantec Mail Security for Microsoft Exchange Management Pack Integration Guide

formerly Help Desk Authority Upgrade Guide

Craig Pelkie Bits & Bytes Programming, Inc. craig@web400.com

Veritas Cluster Server Database Agent for Microsoft SQL Configuration Guide

Symantec Enterprise Vault

Symantec Enterprise Vault

Backup Exec 15. Quick Installation Guide

hp digital home networking wireless USB network adapter hn210w quick start guide

Dell Statistica Document Management System (SDMS) Installation Instructions

Symantec Enterprise Vault

Keynote DeviceAnywhere/HP Application Lifecycle Management (HP ALM/QC) Integration Guide. TCE Automation 5.2

Symantec Enterprise Vault

CA VPN Client. User Guide for Windows

DEPLOYING A VISUAL BASIC.NET APPLICATION

Symantec Managed PKI. Integration Guide for ActiveSync

For Active Directory Installation Guide

Security Explorer 9.5. User Guide

AccelPro SSL VPN v3.1.9 AccelPro SSL VPN. End User Installation Guide for Director General Of Hydro Carbon Users

Excel Companion. (Profit Embedded PHD) User's Guide

NetBackup Backup, Archive, and Restore Getting Started Guide

Symantec Backup Exec System Recovery Granular Restore Option User's Guide

SolarWinds Technical Reference

Symantec Backup Exec System Recovery Exchange Retrieve Option User's Guide

Enterprise Vault Installing and Configuring

Altiris Patch Management Solution for Windows 7.1 from Symantec Release Notes

Symantec Enterprise Vault Technical Note. Troubleshooting the Monitoring database and agents. Windows

Address Registration. Administrator Guide

Symantec Backup Exec TM 11d for Windows Servers. Quick Installation Guide

Symantec Mail Security for Microsoft Exchange Management Pack Integration Guide

formerly Help Desk Authority HDAccess User Manual

Introduction to Version Control in

Polar Help Desk 4.1. User s Guide

Invoice Quotation and Purchase Orders Maker

formerly Help Desk Authority Quest Free Network Tools User Manual

USER MANUAL APPLICATION MONITOR. Version March 2015

VERITAS Backup Exec 9.1 for Windows Servers Quick Installation Guide

Defender Delegated Administration. User Guide

STEP BY STEP IIS, DotNET and SQL-Server Installation for an ARAS Innovator9x Test System

Getting Started Guide for Symantec On-Demand Protection for Outlook Web Access 3.0

BlackBerry IT Policy Manager Research In Motion

INSTALLATION GUIDE. AXIS Camera Station

Cisco UCS Director Payment Gateway Integration Guide, Release 4.1

Altiris Monitor Pack for Servers 7.1 SP2 from Symantec Release Notes

User Document. Adobe Acrobat 7.0 for Microsoft Windows Group Policy Objects and Active Directory

NCD ThinPATH Load Balancing Startup Guide

Self Help Guides. Create a New User in a Domain

AvePoint Tags 1.1 for Microsoft Dynamics CRM. Installation and Configuration Guide

1. Right click using your mouse on the desktop and select New Shortcut.

Boundary Encryption.cloud Deployment Process Overview

Learn About Analysis, Interactive Reports, and Dashboards

ActiveRoles 6.8. Web Interface User Guide

Web Security Firewall Setup. Administrator Guide

Dell One Identity Cloud Access Manager How to Configure vworkspace Integration

Scribe Online Integration Services (IS) Tutorial

Introducing Gupta Team Developer

8.7. Resource Kit User Guide

for Sage 100 ERP Business Insights Overview Document

Symantec LiveUpdate Administrator. Getting Started Guide

ACS EPF Download Manager Technical Guide. Table of Contents

Virtual Contact Center

Symantec AntiVirus Corporate Edition Patch Update

CommVault Simpana Archive 8.0 Integration Guide

ACT! by Sage. Premium for Workgroups 2007 (9.0) Administrator s Guide to the ACT! Reader Utility

Clearview Customer Web Access

Policy Based Encryption Z. Administrator Guide

Legal Information Trademarks Licensing Disclaimer

Policy Based Encryption E. Administrator Guide

Policy Based Encryption E. Administrator Guide

Transcription:

TEAM DEVELOPER Your First.NET/WPF Application Product Version 6.3

Team Developer : Your First.NET/WPF Application, Product Version 6.3 The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement. Last updated: November 12, 2014. Legal Notice Copyright 2014-2015 Gupta Technologies, Inc. All rights reserved. Gupta, Gupta Technologies, the Gupta logo, Gupta Powered, the Gupta Powered logo, ACCELL, Centura, Centura Ranger, the Centura logo, Centura Web Developer, Component Development Kit, Connectivity Administrator, DataServer, DBIntegrator, Development Kit, ewave, Fast Facts, NXJ, Object Nationalizer, Quest, Quest/Web, QuickObjects, RDM, Report Builder, RPT Report Writer, RPT/Web, SQL/API, SQLBase, SQLBase Exchange, SQLBase Resource Manager, SQLConsole, SQLGateway, SQLHost, SQLNetwork, SQLRouter, SQLTalk, Team Developer, Team Object Manager, TD Mobile, Velocis, VISION, Web Developer and WebNow! are trademarks of Gupta Technologies and may be registered in the United States of America and/or other countries. SQLWindows is a registered trademark and TeamWindows, ReportWindows and EditWindows are trademarks exclusively used and licensed by Gupta Technologies. The product described in this document is distributed under licenses restricting its use, copying, distribution, and decompilation/reverse engineering. No part of this document may be reproduced in any form by any means without prior written authorization of Gupta Technologies Corporation and its licensors, if any. THE DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. GUPTA TECHNOLOGIES, INC. SHALL NOT BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH THE FURNISHING, PERFORMANCE, OR USE OF THIS DOCUMENTATION. THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS SUBJECT TO CHANGE WITHOUT NOTICE. This document may describe features and/or functionality not present in your software or your service agreement. Contact your account representative to learn more about what is available with this Gupta Technologies product. Gupta Technologies, Inc. 1420 Rocky Ridge Drive, Suite 380 Roseville, CA 95661 Gupta Technologies.com 2

Table of Contents INTRODUCTION... 4 REQUIREMENTS... 4 WRITING A.NET WPF DESKTOP APPLICATION... 5 RUNNING YOUR APPLICATION IN.NET WPF DESKTOP MODE... 9 DEPLOYING YOUR.NET WPF DESKTOP APPLICATION... 10 RUNNING YOUR APPLICATION IN.NET WPF BROWSER MODE... 11 PUBLISHING YOUR.NET WPF BROWSER APPLICATION... 12 3

Introduction With Team Developer v6.0 you now have the ability to write applications which utilize the Microsoft.NET Framework and Windows Presentation Foundation (WPF) graphical subsystem. This Framework is supported by multiple languages, including TD v6. Included in.net is a large library of coded solutions and a common language infrastructure which manages the execution of applications written specifically for this Framework. You define that your Team Developer v6 application can be saved and run in one of two.n ET WPF modes: Desktop (EXE) application Web Browser (XBAP) application You are most familiar with running your application as a Desktop application because, prior to Team Developer v6.0, the default option for running an executable (EXE) application was Standard EXE. Later, when you wanted an executable created for your application, you clicked menu Project/Build: <> (which displayed the executable name) and your executable was created. This executable would then run as a Win32 Desktop application. Now with Team Developer v6, when you define the Build Settings for your application, you can specify that the Build Target will be a Win32, i.e., Standard EXE, application. The same output and Windows runtime environment as defined in prior versions of Team Developer. Alternatively, you can define the Build Target to be a.net application, where your application will take advantage of the.net/wpf subsystem features and run in one of two modes: Either in the Windows.NET subsystem as a Desktop application; or as an XBAP (pronounced ex-bap ) Web Browser application, hosted and run inside a web browser. This white paper will describe how to write a small database application using a Form Window with Tab Bar, Child Grid and Rich Text controls, and how to save and run as either a.net Desktop or Web Browser application. For further details about.net and WPF in Team Developer v6.0, be sure to read the Gupta book DotNet.PDF. Requirements The application demonstrated in this document requires that you have: Installed Team Developer 6.0 Access to the SQLBase ISLAND database. This database is installed by default when you install Team Developer v6.0 The demonstration application is called: FirstTDv6WPFApp.app 4

Writing a.net WPF Desktop Application This will not be a complex TD v6 application, though it will use several v6 controls: the Tab Bar, a Child Grid, and a Rich Text Control. For demonstration purposes, the application will connect to the demo database, SQLBase ISLAND, and query the COMPANY table. The completed application form window will consist of a Tab Bar with 2 pages. The Tab Bar s page one contains the Child Grid: After clicking on a row (either in a column or on the left side row header), Tab Bar s page two contains a Rich Text Control displaying an address label: The Rich Text Control allows you to change text font, font size, add bold, change format, and so on, and print out the address label directly from the RTC. On the next pages we will add the Form, child controls and code to provide the functionality shown above. 5

Steps to writing the application: Open TD, click File/New and leave Project/Build Settings set to Win32 Application while we write the application. Add a Form Window, title it First WPF Application In the outline, navigate to the Global Declarations/Window Defaults section (shown below) and change font size to 8 for the Form Window and child items text: Add variables and SAM_Create code to establish a DB connection: Add SAM_Destroy code to disconnect from the DB on application exit, as shown on page 5. 6

Add to the Form a Tab Bar and a Child Grid; name them as shown here. Note Tab Bar s Tab Child defined to contain: cgcompany: In the form window, size the Tab Bar large enough to contain the Child Grid, per the screen shot shown on page 4. Position and size the Child Grid as necessary. The Child Grid contains 6 columns, a local function for formatting a company s address information and updating the Rich Text Control, a window variable, and traps 3 Team Developer SAM messages: SAM_Click calls updatertcaddresslabel() when the user clicks on a column. SAM_Create populates the Child Grid with some of the COMPANY table data and has a While loop to disable editing of the grid columns. SAM_RowHeaderClick calls updatertcaddresslabel() when the user clicks on the row header square to the left of each grid row. 7

Add to the Tab Bar a second page and a Rich Text Control and associate the RTC with the Tab Bar s page2. Position and size the RTC so it fits within the Tab Bar s page2: Title Tab Bar s page1 and page2 per the screen shot shown in the document on page 4. Sample FirstTDv6WPFApp.app contains the completed code with comments. When you have completed the code, save your application, then, as a test run using TD s menu Debug/Go, compile and run it in Win32 mode. The application will connect to ISLAND, and when the form appears, the Child Grid will be populated with COMPANY data. If you click on the second tab, you will see the Rich Text Control with address information of the first company listed in the Child Grid. If you click on another row in the grid, then click tab page 2, that company s data will appear in the Tab s page 2 Rich Text Control. If your application does that, you are successful. Congratulations! Now let s change the Build Settings so we can execute the application in.net WPF Desktop or Web Browser mode. 8

Running Your Application in.net WPF Desktop Mode Our application is written so that it will run in either as a Win32 application, or as a NET/WPF application. Now, to change the application s setting, we need to display the Build Settings dialog box. To access that dialog box, click the TD menu Project/Build Settings The Build Settings dialog is displayed, showing our current Build Target as Win32 Application with Target Type: Standard EXE. Change that setting by clicking the radio button.net Application and set the.net Target Type to.net WPF Desktop (EXE), like this: Type in the Target Name: FirstTDv6WPFAppD.exe A D is added to the name, standing for Desktop, to keep the Win32 and.net versions as separate EXE names. Click OK to complete the change. Now run the application in WPF/Desktop mode from the Team Developer IDE. 9

Your application will look similar to this running in WPF/Desktop mode: The application s functionality is the same as in Win32 mode. Click on a company row or row header in the Child Grid, then click the Address Label tab and the Rich Text Control will display that company s mailing information in address label format. Building an executable of your application: Click TD menu Project/Build: FirstTDv6WPFAppD.exe Once the executable is built, look in your application s folder. You will see several new DLLs have been written by Team Developer v6: IBM.Data.Informix.dll Oracle.DataAccess.dll Sybase.Data.AseClient.dll Gupta.SQLBase.Data.dll These are used for database access for your.net Desktop application and all 4 of the DLLs must be available when you run your TD v6 executable in.net WPF Desktop mode. Even though this application only connects to a SQLBase database, all 4 DLLs are still required for your application to start successfully. If any are missing, TD will display a runtime error. So, in addition to the standard set of TD deploy runtime files, these 4 DLLs must also be included as part of deploying a TD v6.0 executable when you build it as a.net WPF Desktop application. Deploying Your.NET WPF Desktop Application To deploy your Desktop application for your users, you will need to create an Installer. For details on how to do this, read the section titled Deploying WPF Desktop Applications in the Gupta book DotNet.PDF. 10

Running Your Application in.net WPF Browser Mode To change the application s setting, we need to display the Build Settings dialog box again and change the.net Application setting NET Target Type to.net WPF Browser (XBAP), like this: Type in the Target Name: FirstTDv6WPFAppX.exe An X has been added to the name, standing for XBAP, to keep the Win32 and.net Desktop versions as separate EXE names. Click OK to complete the change. To build it, click TD menu Project/Build: FirstTDv6WPFAppX.exe 11

Once the executable is built, look in your application s folder. You will see several more new files have been written by Team Developer v6: The 4 database DLLs as were written in WPF Desktop mode A copy of Team Developer v6 sql.ini Xbap_key.pfx FirstTDv6WPFAppX.xbap FirstTDv6WPFAppX.exe.config FirstTDv6WPFAppX.exe.manifest As with the.net Desktop application, all these files are necessary to run your.net WPF Browser application. So, in addition to the standard set of TD deploy runtime files, these additional files must also be included as part of publishing a TD v6.0 executable when you build it as a.net WPF Browser application. Publishing Your.NET WPF Browser Application FirstTDv6WPFAppX.xbap This is the.net WPF Browser executable used for running your application in a web browser. Double-click on that file name to run in your web browser. For details on publishing your Browser application for your users, read the section titled Publishing XBAP Applications in WPF Browser in the Gupta book DotNet.PDF. Additionally, depending on which web browser you will be using, Gupta book DotNet.PDF has details for those browsers in the sections titled WPF Browser Applications in FireFox and in WPF Browser Applications in Internet Explorer. 12