vdf-sig codejock classes martin pincott asckey data services

75
VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Upload: chad-merritt

Post on 30-Dec-2015

252 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

VDF-SIG Codejock Classes

Martin PincottASCKEY Data Services

Page 2: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Codejock

1. Codejock components 1. Codejock components

2. Data Access components 2. Data Access components

3. VDF-SIG Classes 3. VDF-SIG Classes

4. Sig Training Courses4. Sig Training Courses

Page 3: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Codejock Xtreme SuitePro

• Xtreme CommandBars Included in VDF 14.1• Xtreme SkinFramework Included in VDF 14.1• Xtreme DockingPane• Xtreme ShortcutBar• Xtreme TaskPanel• Xtreme PropertyGrid• Xtreme CalendarPro• Xtreme ReportControl Included in VDF 16.0• Xtreme Controls

Page 4: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

VDF-SIG Classes

• Client Area Tabs• Docking Panels  • Short Cut Bar• Task Panel • Popup Message Control• Message Task Dialogues• Month Calendar   (Pop Up) • Property Grid • Push Buttons• Tri-State Checkbox• XAML (Label Control) • Report Control (List/Grid)• Calendar• Tree View

Page 5: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Sig Training Courses

• Getting Started

• Docking Panes

• Property Grid

• Report Control

• Calendar Control

Page 6: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

VDF-SIG Class set

Questions?

Page 7: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Getting Started Requirements

1. Codejock Installation 1. Codejock Installation

2. Sig Libraries 2. Sig Libraries

3. Workspaces 3. Workspaces

4. Codejock this! 4. Codejock this!

Page 8: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

USB Pen

• Create a temp directory .\devsig

• Copy the contents of the USB pen to your .\devsig directory

• This includes: -– Codejock Training (Today's training course)– Codejock Classes (Sig CJ Class sets)– Installs (Codejock 15.2.1 eval Pro suite)– SigCj.chm (VDF Studio Help)

Page 9: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Codejock Installation

• If you don’t have the Full set of Codejock Version n.n.n installed then:- – Make sure you have Administrator rights and

if running Vista turn off UAC for the installations.

– Run the Codejock installation routine from the .\dev\sig\Installs directory

Page 10: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Workspace Installation

• Next we need to copy over all directories to your development area.

• Run Visual Dataflex Studio 16.n and open the Sig Codejock Training 16.n workspace

• Add the Sig Codejock Classes v1 library Compile and run the Order sample

Page 11: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Getting Started Training

• First we need to make some changes to the your Program

• Delete the following lines– Use DfAllent.pkg– Use Dftimer.pkg– Use cCJStandardCommandBarSystem.pkg

• Add the following– Use OrderPrecompile.pkg

• Review the OrderPrecompile.pkg

Page 12: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Getting Started Training

• After the Application Object add the following

Object oSkin is a cCJSkinFramework

Set psSkinFile to "Office2007.cjstyles"

Set psSkinIni to "NormalBlue.ini"

End_Object

Page 13: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Getting Started Training

• Change the Command bar system class in the Main application Panel

– to read cSigCJCommandBarSystem

Page 14: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Getting Started Training

• Now we need to make some minor changes to the Client Area

Object oClientArea is a ClientArea

Set Color to clWhite

Set Bitmap to "logo.bmp"

Set Bitmap_Style to Bitmap_Center

Page 15: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Getting Started Training

Compile, run and review

• Open some views

• What has changed?

Page 16: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Getting Started Training

Page 17: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Getting Started

Questions?

Page 18: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Docking Pane Training

1. Functionality 1. Functionality

2. Sig Class features 2. Sig Class features

3. Create simple panes3. Create simple panes

4. Explore the features! 4. Explore the features!

Page 19: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Docking Pane Training – Functionality

• Xtreme DockingPane™ 2012 provides Windows developers with a sophisticated style docking pane.  Windows developers can easily create tear off tabs and auto hide windows that allow for a more manageable application workspace.  The docking panes comes with built in theme support that will allow you to choose from predefined themes such as Visio and Visual Studio .NET, or create your own custom theme.

• General Features• Theme Support• Tab Customization• Auto Hide Panel Customization• Load and Save State

Page 20: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Docking Pane Training – Sig Features

• Standard supported options– Label – Icons and Images– Sticker Style– Themes– Location– Floating panes– Pinned panes– Save layout for each user

Page 21: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Docking Pane Training – How

• Add a pane toolbar

• Created a container pane package• Add the docking panes – each pane requires a

unique number for the Save layout option to work, so to make things easy, our suggestion is to create an Enum_List

• Enum_List•     Define C_Pane_None•     Define C_Pane_Property_Grid• End_Enum_List

• Add the above to the top of your Program

Page 22: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Docking Pane Training –Toolbar• Add the following toolbar to the program just before the

StatusBar.

Object oDockingPaneBar is a cCJToolbar Set psTitle to "Docking Pane Toolbar"

Object oPropertyGrid_Menu is a cCJMenuItem Set psCaption to "Property Grid" Set psToolTip to "Property Grid" Set psDescription to "Property Grid" Set psImage to "Configure_16.ico" Procedure OnExecute Variant vCommandBarControl Send ShowPane of oDockingManager C_Pane_Property_Grid End_Procedure

End_Object End_Object

Page 23: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Docking Pane Training – Container

• Just before the Client area add the following codeObject oPropertyGrid_Container is a cSigCJDockingPane_Container

Set Border_Style to Border_Dialog

Set Location to 2000 2000

Set Size to 66 206

Set peAnchors to anAll

Set Color to clFuchsia

End_Object

Page 24: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Docking Pane Training – Docking

• Just before the Client area add the following Docking Manager and Pane code

Object oDockingManager is a cSigCjDockingManager Set psPX_Tag to "Docking Manager“

Object oPropertyGrid_Pane is a cSigCjDockingPane Set psTitle to "Property Grid"

Set psImage to "Configure_16.ico" Set phoClientObject to (oPropertyGrid_Container(Self)) Set peLocation to OLEDockRightOf Set piId to C_Pane_Property_Grid End_Object // oPropertyGrid_Pane

End_Object // oDockingManager Compile, run and review

Page 25: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Docking Pane Training – Explore

• Lets changed the Toolbar button so it’s not active all the time

• Change the following Menu item property– Set pbActiveUpdate to True

• Add the following Function

Function IsEnabled Returns Boolean Boolean bStatus Get IsPaneClosed of oDockingManager C_Pane_Property_Grid to bStatus Function_Return bStatus End_Function

Compile, run and review

Page 26: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Docking Pane Training – Explore

Page 27: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Docking Pane Training

Questions?

Page 28: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Property Grid Training

1. Functionality 1. Functionality

2. Sig Class features 2. Sig Class features

3. Create simple grid3. Create simple grid

4. Explore the features! 4. Explore the features!

Page 29: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Property Grid Training – Functionality

• Xtreme PropertyGrid™ 2012 provides Windows developers with a sophisticated style property grid.  Windows developers can easily create a hierarchical list of editable properties and represent any data type or sub-item. The property grid comes with a built in toolbar for easy sorting and grouping, and a help panel to display information on each selected item.

• General Features• Built in Data Types• Customization • Theme Support

Page 30: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Property Grid Training – Sig Features

• Standard supported options– Data aware – Label – Icons and Images– Grid Categories – Grid Items

• Item Button• Expand Button• Combo form• Spin form• Slider• Spin and Slider

Page 31: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Property Grid Training – How

• There are so many options!• In the Program where you have placed the

Object oPropertyGrid_Container is a

cSigCJDockingPane_Container

– Replace the object with following

Use oPropertyGrid_Container.pkg

Compile, run and review

Page 32: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Property Grid Training – Explore

Page 33: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Property Grid Training

Questions?

Page 34: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Task Dialog Training

1. Functionality 1. Functionality

2. Sig Class features 2. Sig Class features

3. Create simple dialogs3. Create simple dialogs

4. Explore the features! 4. Explore the features!

Page 35: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Task Dialog Training – Functionality

• Xtreme Controls™ 2012 provides Windows GUI software engineers with numerous MFC components that have been thoroughly designed and tested. This comprehensive set of object-oriented components has been designed to handle most any GUI application development requirement.

• Task Dialogs (messages)

Page 36: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Task Dialog Training – Sig Features

• Standard supported options– Sig versions for all the DF Box type dialogs– Icon and Images – Radio buttons– Hyperlinks– Sub Text– Progress bar– Automatic Word wrap (no more \n!)

Page 37: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Task Dialog Training – How

• Add the Task Dialog Object

• Create a test view

Page 38: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Task Dialog Training – Coding• Add the following to the Client Area object

in the Program Use oSigCJTaskDialog.pkg

• Now create a new view and add five buttons to it with the following Labels

• YesNo• YesNoCancel• Info• Warning• Stop

Page 39: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Task Dialog Training – Coding

• In the OnClick procedure add the following

• YesNo– Integer iResult – Get sigYesNo_Box "Humbugs!" "Hello World" 0 to iResult

• YesNoCancel– Integer iResult – Get sigYesNoCancel_Box "Humbugs!" "Hello World" eBtn_Cancel to iResult

• Info– Send SigInfo_Box "Humbugs are great, so you think you can program!" "Hello

World"

• Warning– Send SigWarning_Box "Humbugs are great, so you still think you can program!"

"Hello World"

• Stop– Send SigStop_Box "Humbugs, you can program!" "Hello World"

Page 40: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Task Dialog Training – Coding

Compile, run and review

• Try adding a lot of text to a message

Compile, run and review

Page 41: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Task Dialog Training – Explore

• Lets add the Sig demo view– SigCJTaskDialogDemo

Compile, run and review

Page 42: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Task Dialog Training – Explore

Page 43: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Task Dialog Training

Questions?

Page 44: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Monthly Calendar Training

1. Functionality 1. Functionality

2. Sig Class features 2. Sig Class features

3. Create simple dialogs3. Create simple dialogs

4. Explore the features! 4. Explore the features!

Page 45: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Monthly Calendar Training – Functionality

• Xtreme Controls™ 2012 provides Windows GUI software engineers with numerous MFC components that have been thoroughly designed and tested. This comprehensive set of object-oriented components has been designed to handle most any GUI application development requirement.

• Month Calendar

Page 46: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Monthly Calendar Training – Sig Features

• Standard supported options– Show today– Week numbers– Start of the week– Show/Hide buttons– Show/Hide borders– Multi month grid

Page 47: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Monthly Calendar Training – How

• Make some changes to Order view

• Change a date field to popup the calendar

• Sub class dbForm

Page 48: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Monthly Calendar Training – Coding

• Add the following to the Order.vw– Use SigCJMonthCalendar.sl

• Find the date field oOrderHea_Order_Date and do the following– Change the class from dbSpinform to dbForm

– Add Set Prompt_Button_Mode to PB_PromptOn

– Add Set Prompt_Object to oSigCJMonthCalendar_Lookup

Compile, run and review

Page 49: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Monthly Calendar Training – Coding

• To improve this we need a sub Class, in the Order view– Remove

• Use SigCJMonthCalendar.sl– Add

• Use cSigCJdbForm.pkg

• Find the date field oOrderHea_Order_Date and do the following– Remove

• Set Prompt_Button_Mode to PB_PromptOn• Set Prompt_Object to oSigCJMonthCalendar_Lookup

– Change the class to cSigCJdbForm

Compile, run and review

Page 50: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Monthly Calendar Training – Explore

• Lets add the Sig demo view– SigCJMonthCalendarDemo

Compile, run and review

Page 51: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Monthly Calendar Training – Explore

Page 52: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Monthly Calendar Training

Questions?

Page 53: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training

1. Functionality 1. Functionality

2. Sig Class features 2. Sig Class features

3. Create simple data view3. Create simple data view

4. Explore all the features!4. Explore all the features!

Page 54: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Functionality

• Xtreme ReportControl™ 2012 provides Windows developers with a sophisticated styled Report.  Windows developers can easily create group and sort data in a flat or hierarchical format. All colours in the reports can be customized to match any existing application.

• General Features• Report Column Features• Report Grid Lines• Report Cell Types and Features• Report Cell Attributes

Page 55: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Sig Features

• Database support– Text files– Dataflex– SQL, including options for both Dataflex and MerTech drivers– DDO can automatically create columns– In SQL mode will automatically create SQL scripts– Eval and SQL Case– Build your own SQL scripts– RowId mode– Show recnum– Table index– Active Track– Changing Tables at runtime!– Field Chooser– Save and load layout

Page 56: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Sig Features

• Format support– Colour control

• Foreground, background

– Field types• String, Text, • Integer, Real, Decimal, Currency• Date, Datetime, Datetime(string), Time

– Styles• Standard, Checkboxes

– Alignment• Automatic including Word Wrap on text fields

Page 57: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Sig Features

• Standard supported options– Icons and Images

• column, row, item– Show Grouping box (true by default)– Max number rows– Row count– Ascending, Descending– Row colours– Bug tracking help

• ptsTimeSpan_Load• ptsTimeSpan_SQL

– Double Click– Right Click (Context menu)

Page 58: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Sig Features

• Context menu– Rebuild– Refresh– Field Chooser– Default Layout– Select All– Deselect All– Invert Selection– Preview Report– Print Report– Export to CSV– Process selected rows

Page 59: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Sig Features

• Developer events hooks– OnSetColumnFormats– OnDefine_Columns– OnCreateColumn Integer iColumn Handle hoCol– OnCreateRowItem Integer iColumn Handle hoItem String sValue– OnBefore_Load_Data– OnAfter_Load_Data– OnBuild_SQL_Statement– OnOpen_DataSource (Text files only)– OnClose_DataSource (Text files only)– OnSetRowColor Integer iColumn String sValue– OnActive_Track String sID– OnProcess_Rows String sID– OnProcess_Rows_RowID RowID Row_ID– OnDouble_Click String sID– OnDouble_Click_RowID RowID Row_ID

Page 60: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Sig Features

• Standard Methods– Reset_Data_Properties– Resync_to_Focus_Row– Find_Row_Tag String sValue

Page 61: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Simple view

• Create a view based on the Codejock Report Control View

• Add the Order Detail Table to the view and make it the main DDO

• Select and Drag the Report Control onto the view

• Set pbAuto_Columns to true

Compile, run review

Page 62: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Explore

• Controlling the how data is displayed• Lets change a few things

– Set pbAuto_Columns to False– Add the following

Procedure OnDefine_ColumnsSend Add_Report_Column "Order" 80 eRC_Integer eRC_Standard "OrderDtl.Order_Number" Send Add_Report_Column "Line" 80 eRC_Integer eRC_Standard "OrderDtl.Detail_Number" Send Add_Report_Column "Item" 100 eRC_String eRC_Standard "OrderDtl.Item_ID" Send Add_Report_Column "Qty" 80 eRC_Integer eRC_Standard "OrderDtl.Qty_Ordered" Send Add_Report_Column "Price" 80 eRC_Currency eRC_Standard "OrderDtl.Price" Send Add_Report_Column "Line Total" 100 eRC_Currency eRC_Standard "OrderDtl.Extended_Price"

End_Procedure

Compile, run and review

Page 63: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Explore

• Lets add some parent columns

• Add the followingSend Add_Report_Column "Sales Person" 100 eRC_String eRC_Standard "SalesP.Name"

Send Add_Report_Column "Customer" 150 eRC_String eRC_Standard "Customer.Name"

Send Add_Report_Column "Dated" 80 eRC_Date eRC_Standard "OrderHea.Order_Date"

Send Add_Report_Column "Order Total" 100 eRC_Currency eRC_Standard "OrderHea.Order_Total"

Send Add_Report_Column "!" 100 eRC_String eRC_Standard "OrderHea.Order_Total” ;

“(If(OrderHea.Order_Total > 10000,'Large Order',''))"

Compile, run and review

Page 64: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Explore

• Time to add some colour– Set pbRow_Colors to True– Add the following code– Procedure OnSetRowColor Integer iColumn String sValue– String sColumn_Name – – Get psColumn_Label iColumn to sColumn_Name – If (sColumn_Name = Order Total') Begin– If (Number(sValue) > 5000) Set piRow_ForeColor to clFuchsia – End– End_Procedure

Compile, run and review

Page 65: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Explore

• Time to add some Icons– Set pbRow_Item to True– Add the following code– Procedure OnCreateRowItem Integer iColumn Handle hoItem String sValue– String sColumn_Name – – Get psColumn_Label iColumn to sColumn_Name – If (sColumn_Name = “!”') Begin– If (Trim(sValue) > "") Set psImage of hoItem to "FlagUK_16.bmp" – End– End_Procedure

Compile, run and review

Page 66: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Explore

• Field Chooser

• Property Exchange– Set psPX_Tag to a unique name eg. The View label– Set pbPX_Save_Layout to True

Compile, run and review

Page 67: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Explore

• Let’s try some of the Options– RowId Option (set pbRowID_Mode to True)– Double Click option– Show Group Box (pbShowGroupBox)

• What's next

Page 68: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Explore

Page 69: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training – Explore

Page 70: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Report Control Training

Questions?

Page 71: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Other Controls

• Popup Control

• Short Cut Bar

• Task Panel

• Push Buttons

• Tri-State Checkbox

• Tree View

Page 72: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Other Controls

Questions?

Page 73: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

Who

• Contributors: Martin Pincott, Ian Smith and Peter Bragg (The Three Musketeers!)

Page 74: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

How and Where

• http://www.vdfsig.co.uk

• http://www.codejock.com

• Codejock forum– http://support.dataaccess.com/forums/

Page 75: VDF-SIG Codejock Classes Martin Pincott ASCKEY Data Services

VDF-SIG Class set

Questions?