Module SigCJTaskDialogDemo.vw
1Use Windows.pkg
2Use DFClient.pkg
3Use cSigCjTaskDialog.pkg
4
5Deferred_View Activate_oSigCJTaskDialogDemo_View for ;
6Object oSigCJTaskDialogDemo_View is a dbView
7
8 Set Border_Style to Border_Thick
9 Set Size to 138 275
10 Set Location to 4 15
11 Set Icon to "SIG.ico"
12 Set Label to "Task Dialogs Boxes"
13 Set piMinSize to 138 275
14 Set Maximize_Icon to True
15
16 Object oGroup1 is a Group
17 Set Size to 130 130
18 Set Location to 4 4
19 Set Label to "Standard Dialog Boxes"
20
21 Object oStandardYesNo_btn is a Button
22 Set Size to 14 90
23 Set Location to 20 20
24 Set Label to "Yes No Box"
25 Set peAnchors to anTopLeftRight
26
27 Procedure OnClick
28 Integer iRetval
29 Get sigYesNo_Box "Was this demonstration any good?" to iRetval
30 //Option 2 Get sigYesNo_Box "Was this demonstration any good?" "Question" to iRetval
31 //Option 3 Get sigYesNo_Box "Was this demonstration any good?" "Question" eBtn_Yes to iRetval
32 End_Procedure
33 End_Object
34 Object oStandardYesNoCancel_btn is a Button
35 Set Location to 40 21
36 Set Size to 14 90
37 Set Label to "Yes No Cancel Box"
38 Set peAnchors to anTopLeftRight
39
40 Procedure OnClick
41 Integer iRetval
42 Get sigYesNoCancel_Box "Humbugs!" to iRetval
43 //Option 2 Get sigYesNoCancel_Box "Humbugs!" "Hello World" to iRetval
44 //Option 3 Get sigYesNoCancel_Box "Humbugs!" "Hello World" eBtn_Cancel to iRetval
45 End_Procedure
46 End_Object
47 Object oStandardInfo_btn is a Button
48 Set Size to 14 90
49 Set Location to 60 20
50 Set Label to "Info Box"
51 Set peAnchors to anTopLeftRight
52
53 Procedure OnClick
54 Send SigInfo_Box "Humbugs are great, so you think you can program!"
55 //Option 2 Send SigInfo_Box "Humbugs are great, so you think you can program!" "Hello World"
56 End_Procedure
57 End_Object
58 Object oStandardWarning_btn is a Button
59 Set Size to 14 90
60 Set Location to 80 20
61 Set Label to "Warning Box"
62 Set peAnchors to anTopLeftRight
63
64 Procedure OnClick
65 Send SigWarning_Box "Humbugs are great, so you still think you can program!"
66 //Option 2 Send SigWarning_Box "Humbugs are great, so you still think you can program!" "Hello World"
67 End_Procedure
68 End_Object
69 Object oStandardStop_btn is a Button
70 Set Size to 14 90
71 Set Location to 100 20
72 Set Label to "Stop Box"
73 Set peAnchors to anTopLeftRight
74
75 Procedure OnClick
76 Send SigStop_Box "Humbugs, you can program!"
77 //Option 2 Send SigStop_Box "Humbugs, you can program!" "Hello World"
78 End_Procedure
79 End_Object
80 End_Object
81
82 Object oGroup2 is a Group
83 Set Size to 130 130
84 Set Location to 4 140
85 Set Label to "Custom Dialog Boxes"
86
87 Object oInfoDialog_btn is a Button
88 Set Size to 14 90
89 Set Location to 20 20
90 Set Label to "Information Dialog"
91 Set peAnchors to anTopLeftRight
92
93 Procedure OnClick
94 Handle hoDialog
95 Integer eReply
96
97 Get Initialise of (oSigCJTaskDialog(Self)) to hoDialog
98
99 Set pbShowWindowsExitButton of hoDialog to True
100 Set psTitle of hoDialog to "VDF SIG UK"
101 Set pbShowButtonOk of hoDialog to True
102 Set pbShowButtonCancel of hoDialog to True
103 Set psMainInstructionText of hoDialog to "Task Dialogs"
104 Set piMainIcon of hoDialog to eTaskIconInfo
105 Set pbEnableHyperLinks of hoDialog to True
106 Set psContentText of hoDialog to ('Package: cSigCJTaskDialog.pkg' +CLF+ 'Publisher: vdfsig uk')
107 Set psExpandedInformationText of hoDialog to "First demonstrated at EDUC 2008 in Copenhagen"
108 Set psFooterText of hoDialog to "Contributors: Martin Pincott, Ian Smith and Peter Bragg (The Three Musketeers?)"
109 Set piFooterIcon of hoDialog to eTaskIconCustom
110 Set psFooterIconImage of hoDialog to "ThreeMusketeers_16.ico"
111 Set pbRelativePosition of hoDialog to True
112 Set ComVerificationText of hoDialog to "Don't show me this again"
113
114 Get ShowDialog of (oSigCJTaskDialog(Self)) to eReply
115 Send info_box ("Button Clicked: "+String(eReply)) "Return Value"
116 End_Procedure
117
118 End_Object
119 Object oProgramUpdateDialog_Btn is a Button
120 Set Size to 14 90
121 Set location to 40 20
122 Set Label to "Upgrade Dialog"
123 Set peAnchors to anTopLeftRight
124
125 Procedure OnClick
126 Handle hoDialog
127 Integer eReply
128
129 Get Initialise of (oSigCJTaskDialog(Self)) to hoDialog
130
131 Set piWidth of hoDialog to 228
132 Set pbShowWindowsExitButton of hoDialog to True
133 Set psTitle of hoDialog to "Internet Explorer - Security Warning"
134 Set psMainInstructionText of hoDialog to "Do you want to run this software?"
135 Set piMainIcon of hoDialog to eTaskIconCustom
136 Set psMainIconImage of hoDialog to "sig.ico"
137 Set pbEnableHyperLinks of hoDialog to True
138 Set psContentText of hoDialog to ('Name: Special Interest Group' +CLF+ 'Publisher: Special Interest Group UK')
139 Set TaskDialogOptionButton of hoDialog to "Run" 100
140 Set TaskDialogOptionButton of hoDialog to "Don't Run" 101
141 Set pbEnableCommandLinks of hoDialog to True
142 Set pbShowCommandLinkIcons of hoDialog to True
143 Set psFooterText of hoDialog to ("While files from the internet can be useful, this file type can potentially harm your computer. " ;
144 + 'Only run software from publishers you trust. '+"What's the risk?")
145 Set piFooterIcon of hoDialog to eTaskIconShield
146 Set pbRelativePosition of hoDialog to True
147
148 Get ShowDialog of (oSigCJTaskDialog(Self)) to eReply
149 // Send info_box ("Button Clicked: "+String(eReply)) "Return Value"
150 End_Procedure
151 End_Object
152 Object oErrorDialog_Btn is a Button
153 Set Size to 14 90
154 Set Location to 60 20
155 Set Label to "Error Dialog"
156 Set peAnchors to anTopLeftRight
157
158 Procedure OnClick
159 Handle hoDialog
160 Integer eReply
161
162 Get Initialise of (oSigCJTaskDialog(Self)) to hoDialog
163
164 Set pbShowWindowsExitButton of hoDialog to True
165 Set psTitle of hoDialog to "Application Error"
166 Set psMainInstructionText of hoDialog to "Error Report"
167 Set piMainIcon of hoDialog to eTaskIconError
168 Set psContentText of hoDialog to ("Line: 9673 Error Number: 98" + CLF + "Invalid Message: 'This presenter is too good looking'" )
169 Set pbRelativePosition of hoDialog to True
170
171 Get ShowDialog of (oSigCJTaskDialog(Self)) to eReply
172 End_Procedure
173 End_Object
174 Object oProgressDialog_btn is a Button
175 Set Size to 14 90
176 Set Location to 80 20
177 Set Label to "Progress Dialog"
178 Set peAnchors to anTopLeftRight
179
180 Procedure OnClick
181 Handle hoDialog
182 Integer eReply
183
184 Get Initialise of (oSigCJTaskDialog(Self)) to hoDialog
185
186 Set pbShowWindowsExitButton of hoDialog to False
187 Set psTitle of hoDialog to "Export Data"
188 Set piMainIcon of hoDialog to eTaskIconCustom
189 Set psMainIconImage of hoDialog to "export_32.ico"
190 Set psMainInstructionText of hoDialog to "Processing... 0%"
191 Set psContentText of hoDialog to "Please wait..."
192 Set peProgressBarStyle of hoDialog to eTaskProgressBar_Normal
193 Set pbEnableCallbackTimer of hoDialog to True
194 Set ProgressBarRange of hoDialog 1 to 98
195 Set pbShowButtonCancel of hoDialog to True
196
197 Get ShowDialog of (oSigCJTaskDialog(Self)) to eReply
198 End_Procedure
199 End_Object
200 Object oDialogWithRadioOptions_btn is a Button
201 Set Size to 14 90
202 Set location to 100 20
203 Set Label to "With Radio Options"
204 Set peAnchors to anTopLeftRight
205
206 Procedure OnClick
207 Handle hoDialog
208 Integer eReply
209
210 Get Initialise of (oSigCJTaskDialog(Self)) to hoDialog
211
212 Set pbShowWindowsExitButton of hoDialog to True
213 Set psTitle of hoDialog to "You're a winner!"
214 Set piMainIcon of hoDialog to eTaskIconCustom
215 Set psMainIconImage of hoDialog to "Cashbag_32.ico"
216 Set psMainInstructionText of hoDialog to "Congratulations"
217 Set psContentText of hoDialog to ("Congratulations! You are today's instant prize winner!" + CLF ;
218 + "You have won $1000. Do you wish to...")
219 Set TaskDialogOptionRadio of hoDialog to "Give it all to the wife" 100
220 Set TaskDialogOptionRadio of hoDialog to "Buy everyone in the room a drink" 101
221 Set TaskDialogOptionRadio of hoDialog to "Donate it all to charity" 102
222 Set TaskDialogOptionRadio of hoDialog to "Buy a new laptop" 103
223 Set piDefaultRadioOption of hoDialog to 103
224
225 Set psFooterText of hoDialog to ("Send your choice of option along with a cheque for $1000 to " ;
226 + "The Three Musketeers (Les Trois Mousquetaires), the nearest bar!")
227 Set piFooterIcon of hoDialog to eTaskIconInfo
228
229 Get ShowDialog of (oSigCJTaskDialog(Self)) to eReply
230 End_Procedure
231 End_Object
232 End_Object
233
234Cd_End_Object
235