• No results found

Team Developer 6 New Controls Demonstration. Gupta Technologies

N/A
N/A
Protected

Academic year: 2021

Share "Team Developer 6 New Controls Demonstration. Gupta Technologies"

Copied!
17
0
0

Loading.... (view fulltext now)

Full text

(1)

Team Developer 6

New Controls Demonstration

(2)

Table of Contents

Introduction ... 3

Requirements ... 3

Creating a Microsoft Outlook Look and Feel Application ... 4

Team Developer 6 NEW Controls ... 4

Tree ... 4 Navigation Bar ... 5 Tab Control ... 6 SalMail Class ... 6 WPF Custom Control ... 6 Application Demonstration ... 7

Creating a Split Window ... 8

Implementing a Tree Control... 9

Implementing a Navigation Bar... 10

Implementing a Tab Control ... 11

Implementing the SalMail Class ... 13

Receiving emails using POP3 protocol ... 13

Sending emails using SMTP protocol ... 14

Implementing WPF Custom Control ... 15

(3)

Introduction

This document illustrates the implementation of the new controls introduced in Team Developer 6 to create an application that looks and feels like

Microsoft Outlook.

Note: You will find the demonstration application used in this document under the following directory:

C:\...\Gupta\Team Developer 6.0\Samples\60Demos\Demo1\

Requirements

The application used in this document requires that you have: …installed Team Developer 6 samples;

(4)

Creating a Microsoft Outlook Look and Feel Application

Creating an application that looks and feels like Microsoft Outlook has never been as easy as it is with Team Developer 6.

In Team Developer 6 you will find all the pieces you will need to build sleek looking interfaces.

Team Developer 6 NEW Controls

Team Developer 6 introduces the following new controls:

Tree

A Tree control is a rich and compact way of repre-senting hierarchical data. It allows end-users to navigate and interact with data.

Each element in a Tree is called a Tree Item. De-pending on the nature of the data that you might want to represent, tree itemscan be static or dy-namically created –the application used in this

document builds a Tree control based on the result set of two SQL SELECT statements.

To implement this control, create a top level win-dow and look for the “Tree Control” icon ( ) in your Controls screen; click on this icon and draw it on the window of your selection.

Team Developer 6 providesa new set of

SalTree* functions that have been properly docu-mented to ensure that you gain the flexibility and control that you will need to manipulate this object in any way –for details about Tree Control new

API please refer to Team Developer 6 Help and type the keyword: SalTree…

(5)

Navigation Bar

The Navigation Bar is a container used primarily to control the navigation within your programs. To understand how a Navigation Bar

behaves it is important for you to be aware that within a Navigation Bar

you might find one or more

Navigation Panes and Groups . Each of these Navigation Panes and

Groups will help you get the screen layout you look for.

To implement this control create a top level window and look for the “Navigation Bar” icon ( ) in your

Controls screen; click on this icon and draw it on the window of your selection.

Team Developer 6 offers a vast num-ber of SalNav* functions that you are able to use to manipulate this control –for details on Navigation Bar new API please refer to Team Developer 6 Help and type the keyword: Sal-Nav…

(6)

Tab Control

The Tab Control in Team De-veloper 6 is a brand new object that behaves pretty much like what you are accustomed to with QuickTabs in previous ver-sions of Team Developer.

If you have QuickTabs applica-tion and you want to convert them to use Team Developer 6

new Tab Control, you can use the “Quick Tab Migration Wiz-ard” that comes with Team De-veloper 6.

With this Tab Control you are able to associate child object by simply selectinga Tab Page and then dropping any object in it.

To implement this control create a top level window and look for the “Tab Bar” icon ( ) in your Controls screen; click on this icon and draw it on the window of your selection. If you want to add a new Tab Page to this control, please look for the “Tab Page” icon ( ) in you Controls screen; click on this icon and then drop the Tab Page on the Tab Control.

Team Developer 6 offers a new set of SalTab* functions that you are able to use to manipulate this control –for details on Tab Control API please refer to Team Developer 6 Help and type the keyword: SalTab…

SalMail Class

Team Developer 6 introduces a new class to its repertory of classes called SalMail. This class solves the need for an application to both: send and re-ceive emails.

The application used in this document illustrates a SalMail example using a Gmail mailbox: [email protected].

WPF Custom Control

With Team Developer 6 you are able to incorporate attractive WPF Controls

into your .NET applications. WPF Controls offer high visual attractiveness and unmatched usability.

(7)

The application used for the purpose of this document illustrates the imple-mentation of a WPF Control: Microsoft .NET WebBrowser.

You will find a more advanced WPF Control example in:

C:\...\Gupta\Team Developer 6.0\Samples\60Demos\Demo2.

Application Demonstration

Once you have installed Team Developer 6 Samples look for the following folder location:

C:\...\Gupta\Team Developer 6.0\Samples\60Demos\Demo1

Inside this folder you will find two *.APP files: a. Win32DemoApp.app

In this file you will find an implementation of the Navigation Bar, Tree Control and

(8)

b. WPFDemoApp.app

In this file you will find an implementation of the Navigation Bar, Tree Control, SalMail Class and the WPF Control.

Creating a Split Window

To create a Split Window you will need: an MDI Window, a Form Window

one (or two) Modeless Dialogs and the use of a combination of SalCre-ateWindow( ) and SalDlgSetDockStatus( ) calls.

The application used in this document illustrates a simple method to create a

Split Window–the following screenshot illustrates the method used for this demonstration:

(9)

Implementing a Tree Control

Creating a Tree Control is an easy task in Team Developer 6. It is a matter of simply selecting the “Tree Control” icon ( ) from the

Controls window and then drop-ping the object into a top-level window of your selection.

Filling the content of a Tree Con-trols can be achieved manually or dynamically –the application used

in this document illustrates the dynamic method.

As we mention earlier in this doc-ument each element of a Tree Control is called a Tree Item. All

Tree Items depend from a main element called Root. To obtain the Root handle of a Tree Element

use the following call:

Set hRoot = SalTreeGetFirstItem( treeDemo, 0 )

…the returned value for hRoot will be the one that belongs to the Root ele-ment.

You can show or hide the Root element from a Tree Control by changing the “Show Root” attribute from the Attribute Inspector window to “Yer” or “No”.

The following code illustrates how the Tree Control implemented in dlgLeft

(10)

Implementing a Navigation Bar

Navigation Bar controls can be dropped on form windows and dialogs only. Across the application used in this document you will find multiple imple-mentations of this control. The Navigation Bar is, if not the most, one of the most representative controls to achieve the look and feel of a Microsoft Out-look application.

Creating a Navigation Bar is just a matter of selecting this object from the

Team Developer 6 Controls window and then dropping it into a form window or dialog of your selection.

The following screenshots illustrates how a Navigation Bar is implemented and how its child objects get associated to each Navigation Panefor details

(11)

Implementing a Tab Control

If you are familiar with cQuickTabs you will have no trouble to get use to

Team Developer 6 new Tab Control. Existing applications that currently use

cQuickTabs can be converted to Tab Controls by using Team Developer 6 Quick Tabs Migration Wizard.

Creating a Tab Control is as easy as creating any other Team Developer con-trol. Just click on the “Tab Bar” icon ( ) in the Controls window and drop the object on a top-level window.

Tab Page controls can be added to an existing Tab Control by clicking on the “Tab Page” icon ( ) and then dropping them in it. Adding child objects to a

(12)
(13)

Implementing the SalMail Class

In order to properly implement the SalMail Class you will have to create two instances of it: one to send emails using SMTP protocol and another to re-ceive email using POP3 protocol –If you look at the Variable Declaration for

gridEmail you will find oSMTP and oPOP3, each of them represent an in-stance of the new SalMail Class.

Receiving emails using POP3 protocol 1. Define User and Mail Server settings as follows:

Call oPOP3.SetUser( sUserName, sPassword )

Call oPOP3.SetMailServer( sServerName, nPort, bSSL1, bSend 2)

2. Connect to your Mail Server. To connect to your Mail Server use the fol-lowing call:

(14)

3. Retrieve envelope(s) information as follows:

Set nPOP3ReturnGetEnvelopes = oPOP3.GetEnvelopes( bPOP3First, nPOP3Count, a_nPOP3MessageIDs, a_sPOP3DatesReceived,

a_sPOP3Subjects, a_sPOP3Originators )

If SalMail.GetEnvelopes( ) succeeds (this will happen when it’s return is zero) run through the following arrays: a_nPOP3MessageIDs,

a_sPOP3DatesReceived, a_sPOP3Subjects and a_sPOP3Originators. If you want to retrieve email body use: SalMail.GetMail( ) or

SalMail.GetNextEmail( ) respectively.

4. Once you finish downloading all your emails proceed to disconnect from the Mail Server as follows:

Set nPOP3ReturnDisconnect = oPOP3.Disconnect( )

If SalMail.Disconnect( ) function succeeds the function will return zero (0).

The code under gridEmail.PAM_Get illustrates how to receive emails and then store then inside a database table.

Sending emails using SMTP protocol 1. Define User and Mail Server settings as follows:

Call oSMTP.SetUser( sUserName, sPassword )

Call oSMTP.SetMailServer(sServerName, nPort, bSSL3, bSend 4)

2. Connect to your Mail Server. To connect to your Mail Server use the fol-lowing call:

Set nreturnConnect = oSMTP.Connect( )

If the function succeeds nreturnConnect will always be zero (0) –for a list of the different return values for SalMail.Connect( ) function please look at Team Developer 6 Help and type the keyword: “Connect - SalMail Method”.

(15)

3. Invoke SalMail.SendMail( ) function to deliver a email:

Set nreturnSendMail = oSMTP.SendMail( nMailFormat, dfSubject, dfFrom, dfTo, dfCc, mlEmailContent, sAttachments, bDeliveryRecipient, nMailPriority )

sAttachments. This is a list of fully qualified file. If you want to attach more than one file use a semicolon to separate each file.

For a full description of the SalMail.SendMail( ) function please use

Team Developer 6 Help and type the keyword “SendMail - SalMail Method”.

4. Once you have finished sending an email proceed to disconnect from the

Mail Server as follows:

Call oSMTP.Disconnect( )

In case you want to get a better sense of how to implement Team Devel-oper 6 SalMail Class to send emails please refer to the application used in this document and look the code under dlgEmailSend.pbSend.SAM_Click

you will find everything you will need to implement this functionality yourself.

Implementing WPF Custom Control

WPF Custom Controls are used in Team Developer 6WPFApplications to incorporate today’s most modern graphical controls into your applications. The following WPF Controls are examples of the types of controls that you will be able to use in your Team Developer 6 WPF Applications:

(16)

The application used in this document illustrates how to implement Microsoft .NET WebBrowser Control. You will find this control implementation in

WPFDemoApp.app under dlgEmail.SAM_CreateComplete.

For a complete description of Microsoft .NET WebBrowser Control please re-fer to the following link:

http://msdn.microsoft.com/en-us/library/cc491147.aspx

Note: For more information about the use of WPF Controls in Team De-veloper 6 please refer to the white paper titled: “WPF Container and

(17)

con-About Gupta

Gupta is an information management and eDiscovery solutions company. Gupta delivers solutions for developing, managing, modernizing, and archiving applications and business data. Over 10,000 of the world’s most demanding companies trust Gupta to help them preserve the information necessary to run their business. Comprehensive eDiscovery solutions are delivered by Daegis, a Gupta company. Gupta is headquartered in Roseville, Calif., with offices in San Francisco, Chicago, Rutherford NJ, London, Munich, Calgary, Paris, Sao Paulo and Sydney.

Visit www.guptatechnologies.com or email [email protected]. Follow Gupta on Twitter at www.twitter.com/GoGupta.

Gupta Technologies

1420 Rocky Ridge Drive, Suite 380 Roseville, CA 95661 USA Phone: 1.916.218.4700 Toll Free: 1.800.468.6439 Fax: 1.916.218.4378 Germany: +49 89 208039 – 158

References

Related documents

Open the Outlook 2010 mail application, click the “Home” tab, and then click the “New E-mail” icon to open a window to create a new email message3. In the new email message

Dept Sales Mgr: Melissa Meyers EmplID 123 FirstName Terry LastName Adams Title Sales Manager. Dept Sales Mgr: Melissa Meyers Username: Tadams Givenname Terry Surname Adams

Kjeld Johannesen is chairman of the boards of directors of Danish Crown Incorporated A/S and Tulip Food Company P/S, deputy chairman of the board of directors

Add tubes to your experiment by either clicking Next Tube in the Acquisition Dashboard Window, clicking the Tube Icon at the top of the Browser Window, or going to Experiment->

Users click the “Document” icon in “Order Status” Tab and a new window with order details will be shown... 5.1

Move your cursor as following sequence: “Start” Î “Settings” Î “Control Panel” and double click on the “Modem” icon... The following window

• Double Click the Java icon to open the ‘Java Control Panel’ window below and click the ‘Update’ tab and ‘uncheck the ‘Check for Updates Automatically’.... • Now you

Double click on the UniFLOW icon at the bottom right hand side of the screen and from the UniFLOW window select RQM Jobs. The RQM window will show you all of your pending print