├── AngryBirds
├── AngrBirds.Main.dfm
├── AngrBirds.Main.pas
├── AngryBirds.dpr
├── AngryBirds.dproj
├── AngryBirds.gif
└── readme.md
├── AnimatedArrows
├── AnimatedArrows.Main.dfm
├── AnimatedArrows.Main.pas
├── AnimatedArrows.dpr
├── AnimatedArrows.dproj
├── AnimatedArrows.gif
├── AnimatedArrows.res
└── readme.md
├── ClicknThrow
├── ClicknThrow.Main.dfm
├── ClicknThrow.Main.pas
├── ClicknThrow.dpr
├── ClicknThrow.dproj
├── ClicknThrow.gif
├── ClicknThrow.res
└── readme.md
├── DrawAnEgg
├── DrawAnEgg.Main.dfm
├── DrawAnEgg.Main.pas
├── DrawAnEgg.dpr
├── DrawAnEgg.dproj
├── DrawAnEgg.png
├── DrawAnEgg.res
└── readme.md
├── DrawCards
├── DrawCards.Main.dfm
├── DrawCards.Main.pas
├── DrawCards.dpr
├── DrawCards.dproj
├── DrawCards.gif
├── DrawCards.res
└── readme.md
├── RecordProperty
├── Execute.RecordProperties.Package.dpk
├── Execute.RecordProperties.Package.dproj
├── Execute.RecordProperty.Register.pas
├── Execute.RecordProperty.pas
├── Project1.dpr
├── Project1.dproj
├── Project2.dpr
├── Project2.dproj
├── RecordPropertiesGroup.groupproj
├── RecordProperty.png
├── Unit1.dfm
├── Unit1.pas
├── Unit2.dfm
├── Unit2.pas
└── readme.md
├── SQLStrings
├── SQLStrings.dpr
└── readme.md
├── SplashTest
├── Project1.dpr
├── Project1.dproj
├── Project1.res
├── Unit1.dfm
├── Unit1.pas
├── Unit2.dfm
├── Unit2.pas
├── Unit3.dfm
├── Unit3.pas
└── readme.md
├── Tuple
├── Execute.Tuple.pas
└── readme.md
└── readme.md
/AngryBirds/AngrBirds.Main.dfm:
--------------------------------------------------------------------------------
1 | object Form1: TForm1
2 | Left = 351
3 | Top = 212
4 | BorderStyle = bsDialog
5 | Caption = 'Angry Birds'
6 | ClientHeight = 400
7 | ClientWidth = 543
8 | Color = clBtnFace
9 | Font.Charset = DEFAULT_CHARSET
10 | Font.Color = clWindowText
11 | Font.Height = -11
12 | Font.Name = 'MS Sans Serif'
13 | Font.Style = []
14 | OldCreateOrder = False
15 | Position = poScreenCenter
16 | OnCreate = FormCreate
17 | PixelsPerInch = 96
18 | TextHeight = 13
19 | object Ground: TShape
20 | Left = 0
21 | Top = 353
22 | Width = 801
23 | Height = 48
24 | Brush.Color = clGreen
25 | end
26 | object Shape1: TShape
27 | Left = 112
28 | Top = 264
29 | Width = 17
30 | Height = 89
31 | Brush.Color = clMaroon
32 | end
33 | object Support: TShape
34 | Left = 96
35 | Top = 256
36 | Width = 49
37 | Height = 9
38 | Brush.Color = clMaroon
39 | end
40 | object Bird: TShape
41 | Left = 104
42 | Top = 224
43 | Width = 33
44 | Height = 33
45 | Brush.Color = clYellow
46 | Shape = stCircle
47 | end
48 | object PaintBox1: TPaintBox
49 | Left = 0
50 | Top = 0
51 | Width = 543
52 | Height = 400
53 | Align = alClient
54 | OnMouseDown = PaintBox1MouseDown
55 | OnMouseMove = PaintBox1MouseMove
56 | OnMouseUp = PaintBox1MouseUp
57 | OnPaint = PaintBox1Paint
58 | ExplicitWidth = 800
59 | end
60 | end
61 |
--------------------------------------------------------------------------------
/AngryBirds/AngrBirds.Main.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/AngryBirds/AngrBirds.Main.pas
--------------------------------------------------------------------------------
/AngryBirds/AngryBirds.dpr:
--------------------------------------------------------------------------------
1 | program AngryBirds;
2 |
3 | uses
4 | Forms,
5 | AngrBirds.Main in 'AngrBirds.Main.pas' {Form1};
6 |
7 | {$R *.res}
8 |
9 | begin
10 | Application.Initialize;
11 | Application.CreateForm(TForm1, Form1);
12 | Application.Run;
13 | end.
14 |
--------------------------------------------------------------------------------
/AngryBirds/AngryBirds.dproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {1F06E001-21D6-40A6-BA68-A402A62F3CB0}
4 | AngryBirds.dpr
5 | True
6 | Debug
7 | 1153
8 | Application
9 | VCL
10 | 18.4
11 | Win32
12 |
13 |
14 | true
15 |
16 |
17 | true
18 | Base
19 | true
20 |
21 |
22 | true
23 | Base
24 | true
25 |
26 |
27 | true
28 | Base
29 | true
30 |
31 |
32 | true
33 | Cfg_1
34 | true
35 | true
36 |
37 |
38 | true
39 | Base
40 | true
41 |
42 |
43 | true
44 | Cfg_2
45 | true
46 | true
47 |
48 |
49 | true
50 | Cfg_2
51 | true
52 | true
53 |
54 |
55 | false
56 | false
57 | false
58 | true
59 | false
60 | 00400000
61 | 1
62 | 1
63 | AngryBirds
64 | Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)
65 | 1036
66 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
67 |
68 |
69 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
70 | Debug
71 | true
72 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)
73 | 1033
74 | $(BDS)\bin\default_app.manifest
75 | Angry_Icon.ico
76 | true
77 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
78 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
79 |
80 |
81 | Angry_Icon.ico
82 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
83 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
84 |
85 |
86 | RELEASE;$(DCC_Define)
87 | 0
88 | false
89 | 0
90 |
91 |
92 | true
93 | true
94 |
95 |
96 | DEBUG;$(DCC_Define)
97 | false
98 | true
99 |
100 |
101 | Debug
102 |
103 |
104 | true
105 | true
106 | true
107 | 1033
108 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)
109 | $(BDS)\bin\delphi_PROJECTICON.ico
110 |
111 |
112 |
113 | MainSource
114 |
115 |
116 |
117 |
118 |
119 | Cfg_2
120 | Base
121 |
122 |
123 | Base
124 |
125 |
126 | Cfg_1
127 | Base
128 |
129 |
130 |
131 | Delphi.Personality.12
132 |
133 |
134 |
135 |
136 | AngryBirds.dpr
137 |
138 |
139 | Composants Microsoft Office 2000 Sample Automation Server Wrapper
140 | Composants Microsoft Office XP Sample Automation Server Wrapper
141 |
142 |
143 |
144 | True
145 | True
146 | True
147 | False
148 |
149 |
150 |
151 |
152 | AngryBirds.exe
153 | true
154 |
155 |
156 |
157 |
158 | 1
159 |
160 |
161 | Contents\MacOS
162 | 1
163 |
164 |
165 | Contents\MacOS
166 | 0
167 |
168 |
169 |
170 |
171 | classes
172 | 1
173 |
174 |
175 |
176 |
177 | library\lib\armeabi-v7a
178 | 1
179 |
180 |
181 |
182 |
183 | library\lib\armeabi
184 | 1
185 |
186 |
187 |
188 |
189 | library\lib\mips
190 | 1
191 |
192 |
193 |
194 |
195 | library\lib\armeabi-v7a
196 | 1
197 |
198 |
199 |
200 |
201 | res\drawable
202 | 1
203 |
204 |
205 |
206 |
207 | res\values
208 | 1
209 |
210 |
211 |
212 |
213 | res\drawable
214 | 1
215 |
216 |
217 |
218 |
219 | res\drawable-xxhdpi
220 | 1
221 |
222 |
223 |
224 |
225 | res\drawable-ldpi
226 | 1
227 |
228 |
229 |
230 |
231 | res\drawable-mdpi
232 | 1
233 |
234 |
235 |
236 |
237 | res\drawable-hdpi
238 | 1
239 |
240 |
241 |
242 |
243 | res\drawable-xhdpi
244 | 1
245 |
246 |
247 |
248 |
249 | res\drawable-small
250 | 1
251 |
252 |
253 |
254 |
255 | res\drawable-normal
256 | 1
257 |
258 |
259 |
260 |
261 | res\drawable-large
262 | 1
263 |
264 |
265 |
266 |
267 | res\drawable-xlarge
268 | 1
269 |
270 |
271 |
272 |
273 | 1
274 |
275 |
276 | Contents\MacOS
277 | 1
278 |
279 |
280 | 0
281 |
282 |
283 |
284 |
285 | Contents\MacOS
286 | 1
287 | .framework
288 |
289 |
290 | 0
291 |
292 |
293 |
294 |
295 | 1
296 | .dylib
297 |
298 |
299 | 1
300 | .dylib
301 |
302 |
303 | 1
304 | .dylib
305 |
306 |
307 | Contents\MacOS
308 | 1
309 | .dylib
310 |
311 |
312 | 0
313 | .dll;.bpl
314 |
315 |
316 |
317 |
318 | 1
319 | .dylib
320 |
321 |
322 | 1
323 | .dylib
324 |
325 |
326 | 1
327 | .dylib
328 |
329 |
330 | Contents\MacOS
331 | 1
332 | .dylib
333 |
334 |
335 | 0
336 | .bpl
337 |
338 |
339 |
340 |
341 | 0
342 |
343 |
344 | 0
345 |
346 |
347 | 0
348 |
349 |
350 | 0
351 |
352 |
353 | Contents\Resources\StartUp\
354 | 0
355 |
356 |
357 | 0
358 |
359 |
360 |
361 |
362 | 1
363 |
364 |
365 | 1
366 |
367 |
368 | 1
369 |
370 |
371 |
372 |
373 | 1
374 |
375 |
376 | 1
377 |
378 |
379 | 1
380 |
381 |
382 |
383 |
384 | 1
385 |
386 |
387 | 1
388 |
389 |
390 | 1
391 |
392 |
393 |
394 |
395 | 1
396 |
397 |
398 | 1
399 |
400 |
401 | 1
402 |
403 |
404 |
405 |
406 | 1
407 |
408 |
409 | 1
410 |
411 |
412 | 1
413 |
414 |
415 |
416 |
417 | 1
418 |
419 |
420 | 1
421 |
422 |
423 | 1
424 |
425 |
426 |
427 |
428 | 1
429 |
430 |
431 | 1
432 |
433 |
434 | 1
435 |
436 |
437 |
438 |
439 | 1
440 |
441 |
442 |
443 |
444 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
445 | 1
446 |
447 |
448 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
449 | 1
450 |
451 |
452 |
453 |
454 | 1
455 |
456 |
457 | 1
458 |
459 |
460 |
461 |
462 | ..\
463 | 1
464 |
465 |
466 | ..\
467 | 1
468 |
469 |
470 |
471 |
472 | 1
473 |
474 |
475 | 1
476 |
477 |
478 | 1
479 |
480 |
481 |
482 |
483 | 1
484 |
485 |
486 | 1
487 |
488 |
489 | 1
490 |
491 |
492 |
493 |
494 | ..\
495 | 1
496 |
497 |
498 |
499 |
500 | Contents
501 | 1
502 |
503 |
504 |
505 |
506 | Contents\Resources
507 | 1
508 |
509 |
510 |
511 |
512 | library\lib\armeabi-v7a
513 | 1
514 |
515 |
516 | 1
517 |
518 |
519 | 1
520 |
521 |
522 | 1
523 |
524 |
525 | 1
526 |
527 |
528 | Contents\MacOS
529 | 1
530 |
531 |
532 | 0
533 |
534 |
535 |
536 |
537 | 1
538 |
539 |
540 | 1
541 |
542 |
543 |
544 |
545 | Assets
546 | 1
547 |
548 |
549 | Assets
550 | 1
551 |
552 |
553 |
554 |
555 | Assets
556 | 1
557 |
558 |
559 | Assets
560 | 1
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 |
572 |
573 | 12
574 |
575 |
576 |
577 |
578 |
579 |
--------------------------------------------------------------------------------
/AngryBirds/AngryBirds.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/AngryBirds/AngryBirds.gif
--------------------------------------------------------------------------------
/AngryBirds/readme.md:
--------------------------------------------------------------------------------
1 | # Angry Birds for Delphi Tokyo
2 |
3 | just a quick test, not a real game :)
4 |
5 | 
--------------------------------------------------------------------------------
/AnimatedArrows/AnimatedArrows.Main.dfm:
--------------------------------------------------------------------------------
1 | object Form1: TForm1
2 | Left = 317
3 | Top = 156
4 | Caption = 'Animated Arrows (c) 2013-2018 Execute SARL'
5 | ClientHeight = 290
6 | ClientWidth = 527
7 | Color = clBtnFace
8 | Font.Charset = DEFAULT_CHARSET
9 | Font.Color = clWindowText
10 | Font.Height = -11
11 | Font.Name = 'MS Sans Serif'
12 | Font.Style = []
13 | OldCreateOrder = False
14 | OnCreate = FormCreate
15 | OnMouseDown = FormMouseDown
16 | OnMouseMove = FormMouseMove
17 | OnPaint = FormPaint
18 | PixelsPerInch = 96
19 | TextHeight = 13
20 | object Timer1: TTimer
21 | Interval = 100
22 | OnTimer = Timer1Timer
23 | Left = 80
24 | Top = 64
25 | end
26 | end
27 |
--------------------------------------------------------------------------------
/AnimatedArrows/AnimatedArrows.Main.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/AnimatedArrows/AnimatedArrows.Main.pas
--------------------------------------------------------------------------------
/AnimatedArrows/AnimatedArrows.dpr:
--------------------------------------------------------------------------------
1 | program AnimatedArrows;
2 |
3 | uses
4 | Forms,
5 | AnimatedArrows.Main in 'AnimatedArrows.Main.pas' {Form1};
6 |
7 | {$R *.res}
8 |
9 | begin
10 | Application.Initialize;
11 | Application.CreateForm(TForm1, Form1);
12 | Application.Run;
13 | end.
14 |
15 |
--------------------------------------------------------------------------------
/AnimatedArrows/AnimatedArrows.dproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {2B34BD28-8BCF-4623-AA32-5A12C2C0980A}
4 | AnimatedArrows.dpr
5 | True
6 | Debug
7 | 1153
8 | Application
9 | VCL
10 | 18.4
11 | Win32
12 |
13 |
14 | true
15 |
16 |
17 | true
18 | Base
19 | true
20 |
21 |
22 | true
23 | Base
24 | true
25 |
26 |
27 | true
28 | Base
29 | true
30 |
31 |
32 | true
33 | Cfg_1
34 | true
35 | true
36 |
37 |
38 | true
39 | Base
40 | true
41 |
42 |
43 | true
44 | Cfg_2
45 | true
46 | true
47 |
48 |
49 | true
50 | Cfg_2
51 | true
52 | true
53 |
54 |
55 | false
56 | false
57 | false
58 | false
59 | false
60 | 00400000
61 | AnimatedArrows
62 | Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)
63 | 1036
64 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
65 |
66 |
67 | System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
68 | Debug
69 | true
70 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)
71 | 1033
72 | $(BDS)\bin\default_app.manifest
73 | AnimatedArrows_Icon.ico
74 | true
75 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
76 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
77 |
78 |
79 | $(BDS)\bin\default_app.manifest
80 | AnimatedArrows_Icon.ico
81 | true
82 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
83 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
84 |
85 |
86 | RELEASE;$(DCC_Define)
87 | 0
88 | false
89 | 0
90 |
91 |
92 | true
93 | true
94 |
95 |
96 | DEBUG;$(DCC_Define)
97 | false
98 | true
99 |
100 |
101 | Debug
102 |
103 |
104 | true
105 | true
106 | true
107 | 1033
108 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)
109 | $(BDS)\bin\delphi_PROJECTICON.ico
110 |
111 |
112 |
113 | MainSource
114 |
115 |
116 |
117 |
118 |
119 | Cfg_2
120 | Base
121 |
122 |
123 | Base
124 |
125 |
126 | Cfg_1
127 | Base
128 |
129 |
130 |
131 | Delphi.Personality.12
132 |
133 |
134 |
135 |
136 | AnimatedArrows.dpr
137 |
138 |
139 | Composants Microsoft Office 2000 Sample Automation Server Wrapper
140 | Composants Microsoft Office XP Sample Automation Server Wrapper
141 |
142 |
143 |
144 | True
145 | True
146 | True
147 | False
148 |
149 |
150 | 12
151 |
152 |
153 |
154 |
155 |
--------------------------------------------------------------------------------
/AnimatedArrows/AnimatedArrows.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/AnimatedArrows/AnimatedArrows.gif
--------------------------------------------------------------------------------
/AnimatedArrows/AnimatedArrows.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/AnimatedArrows/AnimatedArrows.res
--------------------------------------------------------------------------------
/AnimatedArrows/readme.md:
--------------------------------------------------------------------------------
1 | # Animated Arrows
2 |
3 | 
--------------------------------------------------------------------------------
/ClicknThrow/ClicknThrow.Main.dfm:
--------------------------------------------------------------------------------
1 | object MainForm: TMainForm
2 | Left = 470
3 | Top = 235
4 | Caption = 'Click&Throw (c)2018 Execute SARL'
5 | ClientHeight = 475
6 | ClientWidth = 437
7 | Color = clBtnFace
8 | Font.Charset = DEFAULT_CHARSET
9 | Font.Color = clWindowText
10 | Font.Height = -11
11 | Font.Name = 'MS Sans Serif'
12 | Font.Style = []
13 | OldCreateOrder = False
14 | Position = poScreenCenter
15 | OnCreate = FormCreate
16 | OnMouseDown = FormMouseDown
17 | OnMouseMove = FormMouseMove
18 | OnMouseUp = FormMouseUp
19 | OnPaint = FormPaint
20 | OnResize = FormResize
21 | PixelsPerInch = 96
22 | TextHeight = 13
23 | end
24 |
--------------------------------------------------------------------------------
/ClicknThrow/ClicknThrow.Main.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/ClicknThrow/ClicknThrow.Main.pas
--------------------------------------------------------------------------------
/ClicknThrow/ClicknThrow.dpr:
--------------------------------------------------------------------------------
1 | program ClicknThrow;
2 |
3 | uses
4 | Forms,
5 | ClicknThrow.Main in 'ClicknThrow.Main.pas' {MainForm};
6 |
7 | {$R *.res}
8 |
9 | begin
10 | Application.Initialize;
11 | Application.CreateForm(TMainForm, MainForm);
12 | Application.Run;
13 | end.
14 |
--------------------------------------------------------------------------------
/ClicknThrow/ClicknThrow.dproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {6B33E9FF-6842-4B57-8865-1388C0113E4C}
4 | ClicknThrow.dpr
5 | True
6 | Debug
7 | 1153
8 | Application
9 | VCL
10 | 18.4
11 | Win32
12 |
13 |
14 | true
15 |
16 |
17 | true
18 | Base
19 | true
20 |
21 |
22 | true
23 | Base
24 | true
25 |
26 |
27 | true
28 | Base
29 | true
30 |
31 |
32 | true
33 | Cfg_1
34 | true
35 | true
36 |
37 |
38 | true
39 | Base
40 | true
41 |
42 |
43 | true
44 | Cfg_2
45 | true
46 | true
47 |
48 |
49 | true
50 | Cfg_2
51 | true
52 | true
53 |
54 |
55 | false
56 | false
57 | false
58 | false
59 | false
60 | 00400000
61 | ClicknThrow
62 | Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)
63 | 1036
64 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
65 |
66 |
67 | System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
68 | Debug
69 | true
70 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)
71 | 1033
72 | $(BDS)\bin\default_app.manifest
73 | iPhone_Icon.ico
74 | true
75 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
76 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
77 |
78 |
79 | iPhone_Icon.ico
80 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
81 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
82 |
83 |
84 | RELEASE;$(DCC_Define)
85 | 0
86 | false
87 | 0
88 |
89 |
90 | true
91 | true
92 |
93 |
94 | DEBUG;$(DCC_Define)
95 | false
96 | true
97 |
98 |
99 | Debug
100 |
101 |
102 | true
103 | true
104 | true
105 | 1033
106 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)
107 | $(BDS)\bin\delphi_PROJECTICON.ico
108 |
109 |
110 |
111 | MainSource
112 |
113 |
114 |
115 |
116 |
117 | Cfg_2
118 | Base
119 |
120 |
121 | Base
122 |
123 |
124 | Cfg_1
125 | Base
126 |
127 |
128 |
129 | Delphi.Personality.12
130 |
131 |
132 |
133 |
134 | ClicknThrow.dpr
135 |
136 |
137 | Composants Microsoft Office 2000 Sample Automation Server Wrapper
138 | Composants Microsoft Office XP Sample Automation Server Wrapper
139 |
140 |
141 |
142 | True
143 | True
144 | True
145 | False
146 |
147 |
148 |
149 |
150 | ClicknThrow.exe
151 | true
152 |
153 |
154 |
155 |
156 | 1
157 |
158 |
159 | Contents\MacOS
160 | 1
161 |
162 |
163 | Contents\MacOS
164 | 0
165 |
166 |
167 |
168 |
169 | classes
170 | 1
171 |
172 |
173 |
174 |
175 | library\lib\armeabi-v7a
176 | 1
177 |
178 |
179 |
180 |
181 | library\lib\armeabi
182 | 1
183 |
184 |
185 |
186 |
187 | library\lib\mips
188 | 1
189 |
190 |
191 |
192 |
193 | library\lib\armeabi-v7a
194 | 1
195 |
196 |
197 |
198 |
199 | res\drawable
200 | 1
201 |
202 |
203 |
204 |
205 | res\values
206 | 1
207 |
208 |
209 |
210 |
211 | res\drawable
212 | 1
213 |
214 |
215 |
216 |
217 | res\drawable-xxhdpi
218 | 1
219 |
220 |
221 |
222 |
223 | res\drawable-ldpi
224 | 1
225 |
226 |
227 |
228 |
229 | res\drawable-mdpi
230 | 1
231 |
232 |
233 |
234 |
235 | res\drawable-hdpi
236 | 1
237 |
238 |
239 |
240 |
241 | res\drawable-xhdpi
242 | 1
243 |
244 |
245 |
246 |
247 | res\drawable-small
248 | 1
249 |
250 |
251 |
252 |
253 | res\drawable-normal
254 | 1
255 |
256 |
257 |
258 |
259 | res\drawable-large
260 | 1
261 |
262 |
263 |
264 |
265 | res\drawable-xlarge
266 | 1
267 |
268 |
269 |
270 |
271 | 1
272 |
273 |
274 | Contents\MacOS
275 | 1
276 |
277 |
278 | 0
279 |
280 |
281 |
282 |
283 | Contents\MacOS
284 | 1
285 | .framework
286 |
287 |
288 | 0
289 |
290 |
291 |
292 |
293 | 1
294 | .dylib
295 |
296 |
297 | 1
298 | .dylib
299 |
300 |
301 | 1
302 | .dylib
303 |
304 |
305 | Contents\MacOS
306 | 1
307 | .dylib
308 |
309 |
310 | 0
311 | .dll;.bpl
312 |
313 |
314 |
315 |
316 | 1
317 | .dylib
318 |
319 |
320 | 1
321 | .dylib
322 |
323 |
324 | 1
325 | .dylib
326 |
327 |
328 | Contents\MacOS
329 | 1
330 | .dylib
331 |
332 |
333 | 0
334 | .bpl
335 |
336 |
337 |
338 |
339 | 0
340 |
341 |
342 | 0
343 |
344 |
345 | 0
346 |
347 |
348 | 0
349 |
350 |
351 | Contents\Resources\StartUp\
352 | 0
353 |
354 |
355 | 0
356 |
357 |
358 |
359 |
360 | 1
361 |
362 |
363 | 1
364 |
365 |
366 | 1
367 |
368 |
369 |
370 |
371 | 1
372 |
373 |
374 | 1
375 |
376 |
377 | 1
378 |
379 |
380 |
381 |
382 | 1
383 |
384 |
385 | 1
386 |
387 |
388 | 1
389 |
390 |
391 |
392 |
393 | 1
394 |
395 |
396 | 1
397 |
398 |
399 | 1
400 |
401 |
402 |
403 |
404 | 1
405 |
406 |
407 | 1
408 |
409 |
410 | 1
411 |
412 |
413 |
414 |
415 | 1
416 |
417 |
418 | 1
419 |
420 |
421 | 1
422 |
423 |
424 |
425 |
426 | 1
427 |
428 |
429 | 1
430 |
431 |
432 | 1
433 |
434 |
435 |
436 |
437 | 1
438 |
439 |
440 |
441 |
442 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
443 | 1
444 |
445 |
446 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
447 | 1
448 |
449 |
450 |
451 |
452 | 1
453 |
454 |
455 | 1
456 |
457 |
458 |
459 |
460 | ..\
461 | 1
462 |
463 |
464 | ..\
465 | 1
466 |
467 |
468 |
469 |
470 | 1
471 |
472 |
473 | 1
474 |
475 |
476 | 1
477 |
478 |
479 |
480 |
481 | 1
482 |
483 |
484 | 1
485 |
486 |
487 | 1
488 |
489 |
490 |
491 |
492 | ..\
493 | 1
494 |
495 |
496 |
497 |
498 | Contents
499 | 1
500 |
501 |
502 |
503 |
504 | Contents\Resources
505 | 1
506 |
507 |
508 |
509 |
510 | library\lib\armeabi-v7a
511 | 1
512 |
513 |
514 | 1
515 |
516 |
517 | 1
518 |
519 |
520 | 1
521 |
522 |
523 | 1
524 |
525 |
526 | Contents\MacOS
527 | 1
528 |
529 |
530 | 0
531 |
532 |
533 |
534 |
535 | 1
536 |
537 |
538 | 1
539 |
540 |
541 |
542 |
543 | Assets
544 | 1
545 |
546 |
547 | Assets
548 | 1
549 |
550 |
551 |
552 |
553 | Assets
554 | 1
555 |
556 |
557 | Assets
558 | 1
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 |
571 | 12
572 |
573 |
574 |
575 |
576 |
577 |
--------------------------------------------------------------------------------
/ClicknThrow/ClicknThrow.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/ClicknThrow/ClicknThrow.gif
--------------------------------------------------------------------------------
/ClicknThrow/ClicknThrow.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/ClicknThrow/ClicknThrow.res
--------------------------------------------------------------------------------
/ClicknThrow/readme.md:
--------------------------------------------------------------------------------
1 | # Click & Throw with Delphi Tokyo
2 |
3 | 
--------------------------------------------------------------------------------
/DrawAnEgg/DrawAnEgg.Main.dfm:
--------------------------------------------------------------------------------
1 | object Form1: TForm1
2 | Left = 0
3 | Top = 0
4 | Caption = 'How to Draw an Egg'
5 | ClientHeight = 494
6 | ClientWidth = 600
7 | Color = clBtnFace
8 | Font.Charset = DEFAULT_CHARSET
9 | Font.Color = clWindowText
10 | Font.Height = -11
11 | Font.Name = 'Tahoma'
12 | Font.Style = []
13 | OldCreateOrder = False
14 | OnPaint = FormPaint
15 | OnResize = FormResize
16 | PixelsPerInch = 96
17 | TextHeight = 13
18 | end
19 |
--------------------------------------------------------------------------------
/DrawAnEgg/DrawAnEgg.Main.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/DrawAnEgg/DrawAnEgg.Main.pas
--------------------------------------------------------------------------------
/DrawAnEgg/DrawAnEgg.dpr:
--------------------------------------------------------------------------------
1 | program DrawAnEgg;
2 |
3 | uses
4 | Vcl.Forms,
5 | DrawAnEgg.Main in 'DrawAnEgg.Main.pas' {Form1};
6 |
7 | {$R *.res}
8 |
9 | begin
10 | Application.Initialize;
11 | Application.MainFormOnTaskbar := True;
12 | Application.CreateForm(TForm1, Form1);
13 | Application.Run;
14 | end.
15 |
--------------------------------------------------------------------------------
/DrawAnEgg/DrawAnEgg.dproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {E4ED66E2-0D04-46D3-A1E6-D26AC7CD9ADF}
4 | 18.4
5 | VCL
6 | DrawAnEgg.dpr
7 | True
8 | Debug
9 | Win32
10 | 1
11 | Application
12 |
13 |
14 | true
15 |
16 |
17 | true
18 | Base
19 | true
20 |
21 |
22 | true
23 | Base
24 | true
25 |
26 |
27 | true
28 | Base
29 | true
30 |
31 |
32 | true
33 | Cfg_1
34 | true
35 | true
36 |
37 |
38 | true
39 | Base
40 | true
41 |
42 |
43 | DrawAnEgg
44 | System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)
45 | $(BDS)\bin\delphi_PROJECTICON.ico
46 | .\$(Platform)\$(Config)
47 | .\$(Platform)\$(Config)
48 | false
49 | false
50 | false
51 | false
52 | false
53 |
54 |
55 | true
56 | $(BDS)\bin\default_app.manifest
57 | 1033
58 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
59 | CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)
60 | ibdac210;FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;ibdacvcl210;FireDACPgDriver;fmx;IndySystem;TeeDB;tethering;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DataSnapProviderClient;DBXSybaseASEDriver;DbxCommonDriver;vclimg;dbxcds;DatasnapConnectorsFreePascal;MetropolisUILiveTile;vcldb;vcldsnap;crcontrols210;fmxFireDAC;DBXDb2Driver;DBXOracleDriver;CustomIPTransport;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;DBXMSSQLDriver;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;CodeSiteExpressPkg;dac210;DataSnapFireDAC;FireDACDBXDriver;soapserver;inetdbxpress;dsnapxml;FireDACInfxDriver;FireDACDb2Driver;adortl;FireDACASADriver;bindcompfmx;FireDACODBCDriver;RESTBackendComponents;emsclientfiredac;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;inetdb;Tee;DBXOdbcDriver;ibdacfmx210;vclFireDAC;dacfmx210;xmlrtl;DataSnapNativeClient;svnui;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindengine;vclactnband;bindcompdbx;soaprtl;FMXTee;TeeUI;bindcompvcl;dacvcl210;vclie;FireDACADSDriver;vcltouch;emsclient;VCLRESTComponents;FireDACMSSQLDriver;FireDAC;VclSmp;DBXInformixDriver;DataSnapConnectors;DataSnapServerMidas;dsnapcon;DBXFirebirdDriver;inet;fmxobj;FireDACMySQLDriver;soapmidas;vclx;svn;DBXSybaseASADriver;FireDACOracleDriver;fmxdae;RESTComponents;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;IndyIPClient;$(DCC_UsePackage)
61 | true
62 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
63 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
64 |
65 |
66 | FireDACSqliteDriver;FireDACDSDriver;DBXSqliteDriver;FireDACPgDriver;fmx;IndySystem;TeeDB;tethering;DBXInterBaseDriver;DataSnapClient;DataSnapServer;DataSnapCommon;DataSnapProviderClient;DBXSybaseASEDriver;DbxCommonDriver;vclimg;dbxcds;DatasnapConnectorsFreePascal;MetropolisUILiveTile;vcldb;vcldsnap;fmxFireDAC;DBXDb2Driver;DBXOracleDriver;CustomIPTransport;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;DBXMSSQLDriver;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;DataSnapFireDAC;FireDACDBXDriver;soapserver;inetdbxpress;dsnapxml;FireDACInfxDriver;FireDACDb2Driver;adortl;FireDACASADriver;bindcompfmx;FireDACODBCDriver;RESTBackendComponents;emsclientfiredac;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;inetdb;Tee;DBXOdbcDriver;vclFireDAC;xmlrtl;DataSnapNativeClient;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;bindengine;vclactnband;bindcompdbx;soaprtl;FMXTee;TeeUI;bindcompvcl;vclie;FireDACADSDriver;vcltouch;emsclient;VCLRESTComponents;FireDACMSSQLDriver;FireDAC;VclSmp;DBXInformixDriver;DataSnapConnectors;DataSnapServerMidas;dsnapcon;DBXFirebirdDriver;inet;fmxobj;FireDACMySQLDriver;soapmidas;vclx;DBXSybaseASADriver;FireDACOracleDriver;fmxdae;RESTComponents;FireDACMSAccDriver;dbexpress;DataSnapIndy10ServerTransport;IndyIPClient;$(DCC_UsePackage)
67 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
68 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
69 |
70 |
71 | DEBUG;$(DCC_Define)
72 | true
73 | false
74 | true
75 | true
76 | true
77 |
78 |
79 | false
80 | Debug
81 |
82 |
83 | false
84 | RELEASE;$(DCC_Define)
85 | 0
86 | 0
87 |
88 |
89 |
90 | MainSource
91 |
92 |
93 |
94 | dfm
95 |
96 |
97 | Cfg_2
98 | Base
99 |
100 |
101 | Base
102 |
103 |
104 | Cfg_1
105 | Base
106 |
107 |
108 |
109 | Delphi.Personality.12
110 | Application
111 |
112 |
113 |
114 | DrawAnEgg.dpr
115 |
116 |
117 |
118 |
119 |
120 |
121 | DrawAnEgg.exe
122 | true
123 |
124 |
125 |
126 |
127 | 1
128 |
129 |
130 | Contents\MacOS
131 | 1
132 |
133 |
134 | Contents\MacOS
135 | 0
136 |
137 |
138 |
139 |
140 | classes
141 | 1
142 |
143 |
144 |
145 |
146 | library\lib\armeabi-v7a
147 | 1
148 |
149 |
150 |
151 |
152 | library\lib\armeabi
153 | 1
154 |
155 |
156 |
157 |
158 | library\lib\mips
159 | 1
160 |
161 |
162 |
163 |
164 | library\lib\armeabi-v7a
165 | 1
166 |
167 |
168 |
169 |
170 | res\drawable
171 | 1
172 |
173 |
174 |
175 |
176 | res\values
177 | 1
178 |
179 |
180 |
181 |
182 | res\drawable
183 | 1
184 |
185 |
186 |
187 |
188 | res\drawable-xxhdpi
189 | 1
190 |
191 |
192 |
193 |
194 | res\drawable-ldpi
195 | 1
196 |
197 |
198 |
199 |
200 | res\drawable-mdpi
201 | 1
202 |
203 |
204 |
205 |
206 | res\drawable-hdpi
207 | 1
208 |
209 |
210 |
211 |
212 | res\drawable-xhdpi
213 | 1
214 |
215 |
216 |
217 |
218 | res\drawable-small
219 | 1
220 |
221 |
222 |
223 |
224 | res\drawable-normal
225 | 1
226 |
227 |
228 |
229 |
230 | res\drawable-large
231 | 1
232 |
233 |
234 |
235 |
236 | res\drawable-xlarge
237 | 1
238 |
239 |
240 |
241 |
242 | 1
243 |
244 |
245 | Contents\MacOS
246 | 1
247 |
248 |
249 | 0
250 |
251 |
252 |
253 |
254 | Contents\MacOS
255 | 1
256 | .framework
257 |
258 |
259 | 0
260 |
261 |
262 |
263 |
264 | 1
265 | .dylib
266 |
267 |
268 | 1
269 | .dylib
270 |
271 |
272 | 1
273 | .dylib
274 |
275 |
276 | Contents\MacOS
277 | 1
278 | .dylib
279 |
280 |
281 | 0
282 | .dll;.bpl
283 |
284 |
285 |
286 |
287 | 1
288 | .dylib
289 |
290 |
291 | 1
292 | .dylib
293 |
294 |
295 | 1
296 | .dylib
297 |
298 |
299 | Contents\MacOS
300 | 1
301 | .dylib
302 |
303 |
304 | 0
305 | .bpl
306 |
307 |
308 |
309 |
310 | 0
311 |
312 |
313 | 0
314 |
315 |
316 | 0
317 |
318 |
319 | 0
320 |
321 |
322 | Contents\Resources\StartUp\
323 | 0
324 |
325 |
326 | 0
327 |
328 |
329 |
330 |
331 | 1
332 |
333 |
334 | 1
335 |
336 |
337 | 1
338 |
339 |
340 |
341 |
342 | 1
343 |
344 |
345 | 1
346 |
347 |
348 | 1
349 |
350 |
351 |
352 |
353 | 1
354 |
355 |
356 | 1
357 |
358 |
359 | 1
360 |
361 |
362 |
363 |
364 | 1
365 |
366 |
367 | 1
368 |
369 |
370 | 1
371 |
372 |
373 |
374 |
375 | 1
376 |
377 |
378 | 1
379 |
380 |
381 | 1
382 |
383 |
384 |
385 |
386 | 1
387 |
388 |
389 | 1
390 |
391 |
392 | 1
393 |
394 |
395 |
396 |
397 | 1
398 |
399 |
400 | 1
401 |
402 |
403 | 1
404 |
405 |
406 |
407 |
408 | 1
409 |
410 |
411 |
412 |
413 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
414 | 1
415 |
416 |
417 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
418 | 1
419 |
420 |
421 |
422 |
423 | 1
424 |
425 |
426 | 1
427 |
428 |
429 |
430 |
431 | ..\
432 | 1
433 |
434 |
435 | ..\
436 | 1
437 |
438 |
439 |
440 |
441 | 1
442 |
443 |
444 | 1
445 |
446 |
447 | 1
448 |
449 |
450 |
451 |
452 | 1
453 |
454 |
455 | 1
456 |
457 |
458 | 1
459 |
460 |
461 |
462 |
463 | ..\
464 | 1
465 |
466 |
467 |
468 |
469 | Contents
470 | 1
471 |
472 |
473 |
474 |
475 | Contents\Resources
476 | 1
477 |
478 |
479 |
480 |
481 | library\lib\armeabi-v7a
482 | 1
483 |
484 |
485 | 1
486 |
487 |
488 | 1
489 |
490 |
491 | 1
492 |
493 |
494 | 1
495 |
496 |
497 | Contents\MacOS
498 | 1
499 |
500 |
501 | 0
502 |
503 |
504 |
505 |
506 | 1
507 |
508 |
509 | 1
510 |
511 |
512 |
513 |
514 | Assets
515 | 1
516 |
517 |
518 | Assets
519 | 1
520 |
521 |
522 |
523 |
524 | Assets
525 | 1
526 |
527 |
528 | Assets
529 | 1
530 |
531 |
532 |
533 |
534 |
535 |
536 |
537 |
538 |
539 |
540 |
541 |
542 | True
543 | False
544 |
545 |
546 | 12
547 |
548 |
549 |
550 |
551 |
552 |
--------------------------------------------------------------------------------
/DrawAnEgg/DrawAnEgg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/DrawAnEgg/DrawAnEgg.png
--------------------------------------------------------------------------------
/DrawAnEgg/DrawAnEgg.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/DrawAnEgg/DrawAnEgg.res
--------------------------------------------------------------------------------
/DrawAnEgg/readme.md:
--------------------------------------------------------------------------------
1 | # Draw an Egg with Delphi Tokyo
2 |
3 | 
--------------------------------------------------------------------------------
/DrawCards/DrawCards.Main.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/DrawCards/DrawCards.Main.pas
--------------------------------------------------------------------------------
/DrawCards/DrawCards.dpr:
--------------------------------------------------------------------------------
1 | program DrawCards;
2 |
3 |
4 |
5 |
6 |
7 | uses
8 | Forms,
9 | DrawCards.Main in 'DrawCards.Main.pas' {Form1};
10 |
11 | {$R *.res}
12 |
13 | begin
14 | Application.Initialize;
15 | Application.CreateForm(TForm1, Form1);
16 | Application.Run;
17 | end.
18 |
--------------------------------------------------------------------------------
/DrawCards/DrawCards.dproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {F0630255-250D-44D5-8BBF-2064D94A61CC}
4 | DrawCards.dpr
5 | True
6 | Debug
7 | 1153
8 | Application
9 | VCL
10 | 18.4
11 | Win32
12 |
13 |
14 | true
15 |
16 |
17 | true
18 | Base
19 | true
20 |
21 |
22 | true
23 | Base
24 | true
25 |
26 |
27 | true
28 | Base
29 | true
30 |
31 |
32 | true
33 | Cfg_1
34 | true
35 | true
36 |
37 |
38 | true
39 | Base
40 | true
41 |
42 |
43 | true
44 | Cfg_2
45 | true
46 | true
47 |
48 |
49 | true
50 | Cfg_2
51 | true
52 | true
53 |
54 |
55 | false
56 | false
57 | false
58 | true
59 | false
60 | 00400000
61 | 1
62 | 1
63 | dcu
64 | vcl;rtl;visualclx;corbaide;proide;vclx;dsnapcrba;dsnap;dbrtl;vcldb;bdertl;adortl;dclaxserver;vcldbx;bdecds;cds;dbexpress;dss;ibxpress;indy;dsnapcon;qrpt;vclshlctrls;VclSmp;teeui;teedb;tee;teeqr;delphiclxide;delphicorba;direct;vclie;stride;xmlide;xmlrtl;$(DCC_UsePackage)
65 | DrawCards
66 | Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)
67 | 1036
68 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=
69 |
70 |
71 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
72 | Debug
73 | true
74 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)
75 | 1033
76 | $(BDS)\bin\default_app.manifest
77 | Cartes_Icon.ico
78 | true
79 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
80 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
81 |
82 |
83 | Cartes_Icon.ico
84 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png
85 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png
86 |
87 |
88 | RELEASE;$(DCC_Define)
89 | 0
90 | false
91 | 0
92 |
93 |
94 | true
95 | true
96 |
97 |
98 | DEBUG;$(DCC_Define)
99 | false
100 | true
101 |
102 |
103 | Debug
104 |
105 |
106 | true
107 | true
108 |
109 |
110 |
111 | MainSource
112 |
113 |
114 |
115 |
116 |
117 | Cfg_2
118 | Base
119 |
120 |
121 | Base
122 |
123 |
124 | Cfg_1
125 | Base
126 |
127 |
128 |
129 | Delphi.Personality.12
130 |
131 |
132 |
133 |
134 | DrawCards.dpr
135 |
136 |
137 | C:\Users\Execute\Desktop\Import\Delphi\Cartes\
138 |
139 |
140 |
141 | True
142 | True
143 | True
144 | False
145 |
146 |
147 |
148 |
149 | DrawCards.exe
150 | true
151 |
152 |
153 |
154 |
155 | 1
156 |
157 |
158 | Contents\MacOS
159 | 1
160 |
161 |
162 | Contents\MacOS
163 | 0
164 |
165 |
166 |
167 |
168 | classes
169 | 1
170 |
171 |
172 |
173 |
174 | library\lib\armeabi-v7a
175 | 1
176 |
177 |
178 |
179 |
180 | library\lib\armeabi
181 | 1
182 |
183 |
184 |
185 |
186 | library\lib\mips
187 | 1
188 |
189 |
190 |
191 |
192 | library\lib\armeabi-v7a
193 | 1
194 |
195 |
196 |
197 |
198 | res\drawable
199 | 1
200 |
201 |
202 |
203 |
204 | res\values
205 | 1
206 |
207 |
208 |
209 |
210 | res\drawable
211 | 1
212 |
213 |
214 |
215 |
216 | res\drawable-xxhdpi
217 | 1
218 |
219 |
220 |
221 |
222 | res\drawable-ldpi
223 | 1
224 |
225 |
226 |
227 |
228 | res\drawable-mdpi
229 | 1
230 |
231 |
232 |
233 |
234 | res\drawable-hdpi
235 | 1
236 |
237 |
238 |
239 |
240 | res\drawable-xhdpi
241 | 1
242 |
243 |
244 |
245 |
246 | res\drawable-small
247 | 1
248 |
249 |
250 |
251 |
252 | res\drawable-normal
253 | 1
254 |
255 |
256 |
257 |
258 | res\drawable-large
259 | 1
260 |
261 |
262 |
263 |
264 | res\drawable-xlarge
265 | 1
266 |
267 |
268 |
269 |
270 | 1
271 |
272 |
273 | Contents\MacOS
274 | 1
275 |
276 |
277 | 0
278 |
279 |
280 |
281 |
282 | Contents\MacOS
283 | 1
284 | .framework
285 |
286 |
287 | 0
288 |
289 |
290 |
291 |
292 | 1
293 | .dylib
294 |
295 |
296 | 1
297 | .dylib
298 |
299 |
300 | 1
301 | .dylib
302 |
303 |
304 | Contents\MacOS
305 | 1
306 | .dylib
307 |
308 |
309 | 0
310 | .dll;.bpl
311 |
312 |
313 |
314 |
315 | 1
316 | .dylib
317 |
318 |
319 | 1
320 | .dylib
321 |
322 |
323 | 1
324 | .dylib
325 |
326 |
327 | Contents\MacOS
328 | 1
329 | .dylib
330 |
331 |
332 | 0
333 | .bpl
334 |
335 |
336 |
337 |
338 | 0
339 |
340 |
341 | 0
342 |
343 |
344 | 0
345 |
346 |
347 | 0
348 |
349 |
350 | Contents\Resources\StartUp\
351 | 0
352 |
353 |
354 | 0
355 |
356 |
357 |
358 |
359 | 1
360 |
361 |
362 | 1
363 |
364 |
365 | 1
366 |
367 |
368 |
369 |
370 | 1
371 |
372 |
373 | 1
374 |
375 |
376 | 1
377 |
378 |
379 |
380 |
381 | 1
382 |
383 |
384 | 1
385 |
386 |
387 | 1
388 |
389 |
390 |
391 |
392 | 1
393 |
394 |
395 | 1
396 |
397 |
398 | 1
399 |
400 |
401 |
402 |
403 | 1
404 |
405 |
406 | 1
407 |
408 |
409 | 1
410 |
411 |
412 |
413 |
414 | 1
415 |
416 |
417 | 1
418 |
419 |
420 | 1
421 |
422 |
423 |
424 |
425 | 1
426 |
427 |
428 | 1
429 |
430 |
431 | 1
432 |
433 |
434 |
435 |
436 | 1
437 |
438 |
439 |
440 |
441 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
442 | 1
443 |
444 |
445 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
446 | 1
447 |
448 |
449 |
450 |
451 | 1
452 |
453 |
454 | 1
455 |
456 |
457 |
458 |
459 | ..\
460 | 1
461 |
462 |
463 | ..\
464 | 1
465 |
466 |
467 |
468 |
469 | 1
470 |
471 |
472 | 1
473 |
474 |
475 | 1
476 |
477 |
478 |
479 |
480 | 1
481 |
482 |
483 | 1
484 |
485 |
486 | 1
487 |
488 |
489 |
490 |
491 | ..\
492 | 1
493 |
494 |
495 |
496 |
497 | Contents
498 | 1
499 |
500 |
501 |
502 |
503 | Contents\Resources
504 | 1
505 |
506 |
507 |
508 |
509 | library\lib\armeabi-v7a
510 | 1
511 |
512 |
513 | 1
514 |
515 |
516 | 1
517 |
518 |
519 | 1
520 |
521 |
522 | 1
523 |
524 |
525 | Contents\MacOS
526 | 1
527 |
528 |
529 | 0
530 |
531 |
532 |
533 |
534 | 1
535 |
536 |
537 | 1
538 |
539 |
540 |
541 |
542 | Assets
543 | 1
544 |
545 |
546 | Assets
547 | 1
548 |
549 |
550 |
551 |
552 | Assets
553 | 1
554 |
555 |
556 | Assets
557 | 1
558 |
559 |
560 |
561 |
562 |
563 |
564 |
565 |
566 |
567 |
568 |
569 |
570 | 12
571 |
572 |
573 |
574 |
575 |
576 |
--------------------------------------------------------------------------------
/DrawCards/DrawCards.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/DrawCards/DrawCards.gif
--------------------------------------------------------------------------------
/DrawCards/DrawCards.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/DrawCards/DrawCards.res
--------------------------------------------------------------------------------
/DrawCards/readme.md:
--------------------------------------------------------------------------------
1 | # Draw Cards with Delphi Tokyo
2 |
3 | 
--------------------------------------------------------------------------------
/RecordProperty/Execute.RecordProperties.Package.dpk:
--------------------------------------------------------------------------------
1 | package Execute.RecordProperties.Package;
2 |
3 | {$R *.res}
4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
5 | {$ALIGN 8}
6 | {$ASSERTIONS ON}
7 | {$BOOLEVAL OFF}
8 | {$DEBUGINFO OFF}
9 | {$EXTENDEDSYNTAX ON}
10 | {$IMPORTEDDATA ON}
11 | {$IOCHECKS ON}
12 | {$LOCALSYMBOLS ON}
13 | {$LONGSTRINGS ON}
14 | {$OPENSTRINGS ON}
15 | {$OPTIMIZATION OFF}
16 | {$OVERFLOWCHECKS OFF}
17 | {$RANGECHECKS OFF}
18 | {$REFERENCEINFO ON}
19 | {$SAFEDIVIDE OFF}
20 | {$STACKFRAMES ON}
21 | {$TYPEDADDRESS OFF}
22 | {$VARSTRINGCHECKS ON}
23 | {$WRITEABLECONST OFF}
24 | {$MINENUMSIZE 1}
25 | {$IMAGEBASE $400000}
26 | {$DEFINE DEBUG}
27 | {$ENDIF IMPLICITBUILDING}
28 | {$IMPLICITBUILD ON}
29 |
30 | requires
31 | rtl,
32 | designide;
33 |
34 | contains
35 | Execute.RecordProperty.Register in 'Execute.RecordProperty.Register.pas',
36 | Execute.RecordProperty in 'Execute.RecordProperty.pas';
37 |
38 | end.
39 |
--------------------------------------------------------------------------------
/RecordProperty/Execute.RecordProperties.Package.dproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {68DB71D4-95E0-48AF-A962-A223B34EBF1B}
4 | Execute.RecordProperties.Package.dpk
5 | 18.4
6 | None
7 | True
8 | Debug
9 | Win32
10 | 1
11 | Package
12 |
13 |
14 | true
15 |
16 |
17 | true
18 | Base
19 | true
20 |
21 |
22 | true
23 | Base
24 | true
25 |
26 |
27 | true
28 | Base
29 | true
30 |
31 |
32 | true
33 | Base
34 | true
35 |
36 |
37 | true
38 | Base
39 | true
40 |
41 |
42 | true
43 | Base
44 | true
45 |
46 |
47 | true
48 | Base
49 | true
50 |
51 |
52 | true
53 | Base
54 | true
55 |
56 |
57 | true
58 | Base
59 | true
60 |
61 |
62 | true
63 | Cfg_1
64 | true
65 | true
66 |
67 |
68 | true
69 | Base
70 | true
71 |
72 |
73 | .\$(Platform)\$(Config)
74 | .\$(Platform)\$(Config)
75 | false
76 | false
77 | false
78 | false
79 | false
80 | true
81 | true
82 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)
83 | All
84 | Execute_RecordProperties_Package
85 |
86 |
87 | None
88 | android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services-ads-7.0.0.dex.jar;google-play-services-analytics-7.0.0.dex.jar;google-play-services-base-7.0.0.dex.jar;google-play-services-gcm-7.0.0.dex.jar;google-play-services-identity-7.0.0.dex.jar;google-play-services-maps-7.0.0.dex.jar;google-play-services-panorama-7.0.0.dex.jar;google-play-services-plus-7.0.0.dex.jar;google-play-services-wallet-7.0.0.dex.jar
89 | rtl;$(DCC_UsePackage)
90 |
91 |
92 | None
93 | rtl;$(DCC_UsePackage)
94 |
95 |
96 | None
97 | rtl;$(DCC_UsePackage)
98 |
99 |
100 | None
101 | rtl;$(DCC_UsePackage)
102 |
103 |
104 | rtl;$(DCC_UsePackage)
105 |
106 |
107 | rtl;$(DCC_UsePackage)
108 |
109 |
110 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)
111 | Debug
112 | true
113 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=
114 | 1033
115 | rtl;$(DCC_UsePackage)
116 |
117 |
118 | rtl;$(DCC_UsePackage)
119 |
120 |
121 | DEBUG;$(DCC_Define)
122 | true
123 | false
124 | true
125 | true
126 | true
127 |
128 |
129 | false
130 |
131 |
132 | false
133 | RELEASE;$(DCC_Define)
134 | 0
135 | 0
136 |
137 |
138 |
139 | MainSource
140 |
141 |
142 |
143 |
144 |
145 |
146 | Cfg_2
147 | Base
148 |
149 |
150 | Base
151 |
152 |
153 | Cfg_1
154 | Base
155 |
156 |
157 |
158 | Delphi.Personality.12
159 | Package
160 |
161 |
162 |
163 | Execute.RecordProperties.Package.dpk
164 |
165 |
166 |
167 |
168 |
169 | true
170 |
171 |
172 |
173 |
174 | true
175 |
176 |
177 |
178 |
179 | true
180 |
181 |
182 |
183 |
184 | true
185 |
186 |
187 |
188 |
189 | Execute_RecordProperties_Package.bpl
190 | true
191 |
192 |
193 |
194 |
195 | 1
196 |
197 |
198 | Contents\MacOS
199 | 0
200 |
201 |
202 |
203 |
204 | classes
205 | 1
206 |
207 |
208 |
209 |
210 | library\lib\armeabi-v7a
211 | 1
212 |
213 |
214 |
215 |
216 | library\lib\armeabi
217 | 1
218 |
219 |
220 |
221 |
222 | library\lib\mips
223 | 1
224 |
225 |
226 |
227 |
228 | library\lib\armeabi-v7a
229 | 1
230 |
231 |
232 |
233 |
234 | res\drawable
235 | 1
236 |
237 |
238 |
239 |
240 | res\values
241 | 1
242 |
243 |
244 |
245 |
246 | res\drawable
247 | 1
248 |
249 |
250 |
251 |
252 | res\drawable-xxhdpi
253 | 1
254 |
255 |
256 |
257 |
258 | res\drawable-ldpi
259 | 1
260 |
261 |
262 |
263 |
264 | res\drawable-mdpi
265 | 1
266 |
267 |
268 |
269 |
270 | res\drawable-hdpi
271 | 1
272 |
273 |
274 |
275 |
276 | res\drawable-xhdpi
277 | 1
278 |
279 |
280 |
281 |
282 | res\drawable-small
283 | 1
284 |
285 |
286 |
287 |
288 | res\drawable-normal
289 | 1
290 |
291 |
292 |
293 |
294 | res\drawable-large
295 | 1
296 |
297 |
298 |
299 |
300 | res\drawable-xlarge
301 | 1
302 |
303 |
304 |
305 |
306 | 1
307 |
308 |
309 | 1
310 |
311 |
312 | 0
313 |
314 |
315 |
316 |
317 | 1
318 | .framework
319 |
320 |
321 | 0
322 |
323 |
324 |
325 |
326 | 1
327 | .dylib
328 |
329 |
330 | 0
331 | .dll;.bpl
332 |
333 |
334 |
335 |
336 | 1
337 | .dylib
338 |
339 |
340 | 1
341 | .dylib
342 |
343 |
344 | 1
345 | .dylib
346 |
347 |
348 | 1
349 | .dylib
350 |
351 |
352 | 0
353 | .bpl
354 |
355 |
356 |
357 |
358 | 0
359 |
360 |
361 | 0
362 |
363 |
364 | 0
365 |
366 |
367 | 0
368 |
369 |
370 | 0
371 |
372 |
373 | 0
374 |
375 |
376 |
377 |
378 | 1
379 |
380 |
381 | 1
382 |
383 |
384 | 1
385 |
386 |
387 |
388 |
389 | 1
390 |
391 |
392 | 1
393 |
394 |
395 | 1
396 |
397 |
398 |
399 |
400 | 1
401 |
402 |
403 | 1
404 |
405 |
406 | 1
407 |
408 |
409 |
410 |
411 | 1
412 |
413 |
414 | 1
415 |
416 |
417 | 1
418 |
419 |
420 |
421 |
422 | 1
423 |
424 |
425 | 1
426 |
427 |
428 | 1
429 |
430 |
431 |
432 |
433 | 1
434 |
435 |
436 | 1
437 |
438 |
439 | 1
440 |
441 |
442 |
443 |
444 | 1
445 |
446 |
447 | 1
448 |
449 |
450 | 1
451 |
452 |
453 |
454 |
455 | 1
456 |
457 |
458 |
459 |
460 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
461 | 1
462 |
463 |
464 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF
465 | 1
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 | 1
474 |
475 |
476 | 1
477 |
478 |
479 | 1
480 |
481 |
482 |
483 |
484 |
485 |
486 | Contents\Resources
487 | 1
488 |
489 |
490 |
491 |
492 | library\lib\armeabi-v7a
493 | 1
494 |
495 |
496 | 1
497 |
498 |
499 | 1
500 |
501 |
502 | 1
503 |
504 |
505 | 1
506 |
507 |
508 | 1
509 |
510 |
511 | 0
512 |
513 |
514 |
515 |
516 | 1
517 |
518 |
519 | 1
520 |
521 |
522 |
523 |
524 | Assets
525 | 1
526 |
527 |
528 | Assets
529 | 1
530 |
531 |
532 |
533 |
534 | Assets
535 | 1
536 |
537 |
538 | Assets
539 | 1
540 |
541 |
542 |
543 |
544 |
545 |
546 |
547 |
548 |
549 |
550 |
551 |
552 | False
553 | False
554 | False
555 | False
556 | False
557 | False
558 | True
559 | False
560 |
561 |
562 | 12
563 |
564 |
565 |
566 |
567 |
568 |
--------------------------------------------------------------------------------
/RecordProperty/Execute.RecordProperty.Register.pas:
--------------------------------------------------------------------------------
1 | unit Execute.RecordProperty.Register;
2 |
3 | interface
4 |
5 | uses
6 | DesignIntf, // need a reference to "C:\Program Files (x86)\Embarcadero\Studio\19.0\lib\win32\release\designide.dcp" !
7 | DesignEditors,
8 | System.Classes,
9 | System.TypInfo,
10 | Execute.RecordProperty;
11 |
12 | type
13 | // Delphi do not support Record properties, let's define a proxy class
14 | TRecordPropertyProxy = class(TPersistent)
15 | private
16 | FRecord: ^TRecordPropertyHelper;
17 | function GetStr: string;
18 | procedure SetStr(const Value: string);
19 | function GetInt: Integer;
20 | procedure SetInt(Value: Integer);
21 | published
22 | property Str: string read GetStr write SetStr;
23 | property Int: Integer read GetInt write SetInt;
24 | end;
25 |
26 | // Delphi do not support Record properties, let's define a property Editor for TRecordProperty(Helper)
27 | TRecordPropertyEditor = class(TPropertyEditor)
28 | private
29 | FProxy: TRecordPropertyProxy;
30 | protected
31 | procedure SetPropEntry(Index: Integer; AInstance: TPersistent;
32 | APropInfo: PPropInfo); override;
33 | public
34 | constructor Create(const ADesigner: IDesigner; APropCount: Integer); override;
35 | destructor Destroy; override;
36 | function GetValue: string; override;
37 | function GetAttributes: TPropertyAttributes; override;
38 | procedure GetProperties(Proc: TGetPropProc); override;
39 | end;
40 |
41 | procedure Register;
42 |
43 | implementation
44 |
45 | procedure Register;
46 | begin
47 | // First, we need to register the component (Values record property is not visible yet)
48 | RegisterComponents('Execute', [TRecordPropertyObject]);
49 | // Delphi do not support Record properties, let's define a property Editor for TRecordProperty(Helper)
50 | RegisterPropertyEditor(TypeInfo(TRecordPropertyHelper), nil, '', TRecordPropertyEditor);
51 | end;
52 |
53 | { TRecordPropertyEditor }
54 |
55 | constructor TRecordPropertyEditor.Create(const ADesigner: IDesigner;
56 | APropCount: Integer);
57 | begin
58 | inherited;
59 | FProxy := TRecordPropertyProxy.Create;
60 | end;
61 |
62 | destructor TRecordPropertyEditor.Destroy;
63 | begin
64 | FProxy.Free;
65 | inherited;
66 | end;
67 |
68 | function TRecordPropertyEditor.GetValue: string;
69 | begin
70 | Result := '(TRecordProperty)';
71 | end;
72 |
73 | procedure TRecordPropertyEditor.SetPropEntry(Index: Integer;
74 | AInstance: TPersistent; APropInfo: PPropInfo);
75 | begin
76 | inherited;
77 | FProxy.FRecord := Pointer(PByte(AInstance) + Cardinal(APropInfo^.GetProc) and $FFFFFF);
78 | end;
79 |
80 | function TRecordPropertyEditor.GetAttributes: TPropertyAttributes;
81 | begin
82 | Result := [
83 | // paValueList,
84 | paSubProperties, // -> GetProperties
85 | // paDialog,
86 | // paMultiSelect,
87 | // paAutoUpdate,
88 | // paSortList,
89 | paReadOnly,
90 | // paRevertable,
91 | // paFullWidthName,
92 | // paVolatileSubProperties,
93 | paVCL,
94 | // paNotNestable,
95 | paDisplayReadOnly
96 | // paCustomDropDown,
97 | // paValueEditable
98 | ];
99 | end;
100 |
101 | procedure TRecordPropertyEditor.GetProperties(Proc: TGetPropProc);
102 | var
103 | Components: IDesignerSelections;
104 | begin
105 | Components := TDesignerSelections.Create;
106 | Components.Add(FProxy);
107 | GetComponentProperties(Components, tkProperties, Designer, Proc);
108 | end;
109 |
110 |
111 |
112 | { TRecordPropertyProxy }
113 |
114 | function TRecordPropertyProxy.GetInt: Integer;
115 | begin
116 | Result := FRecord.Int;
117 | end;
118 |
119 | function TRecordPropertyProxy.GetStr: string;
120 | begin
121 | Result := FRecord.Str;
122 | end;
123 |
124 | procedure TRecordPropertyProxy.SetInt(Value: Integer);
125 | begin
126 | FRecord.Int := Value;
127 | end;
128 |
129 | procedure TRecordPropertyProxy.SetStr(const Value: string);
130 | begin
131 | FRecord.Str := Value;
132 | end;
133 |
134 | end.
135 |
--------------------------------------------------------------------------------
/RecordProperty/Execute.RecordProperty.pas:
--------------------------------------------------------------------------------
1 | unit Execute.RecordProperty;
2 |
3 | {
4 | Record property concept (c)2018 Execute SARL
5 | http://www.execute.fr
6 | https://github.com/tothpaul
7 |
8 | the goal of this code is to avoid the creation of a sub component to store
9 | published components properties (like Paddings, Margin, etc) and to allow
10 | structured properties like Color.Focus, Color.Active etc.
11 |
12 | }
13 |
14 | interface
15 |
16 | uses
17 | System.Classes;
18 |
19 | type
20 | // the structured property
21 | TRecordProperty = record
22 | Str: string;
23 | Int: Integer;
24 | end;
25 |
26 | TRecordPropertyObject = class;
27 |
28 | // properties "helper"
29 | // this record is almost empty, just a reference to the component
30 | // all the properties are "virtual" and lead to the owner
31 | TRecordPropertyHelper = record
32 | private
33 | FOwner: TRecordPropertyObject;
34 | function GetStr: string; inline;
35 | procedure SetStr(Value: string); inline;
36 | function GetInt: Integer; inline;
37 | procedure SetInt(Value: Integer); inline;
38 | public
39 | property Str: string read GetStr write SetStr;
40 | property Int: Integer read GetInt write SetInt;
41 | end;
42 |
43 | // the component
44 | TRecordPropertyObject = class(TComponent)
45 | private
46 | // it's properties
47 | FValues : TRecordProperty;
48 | // properties "helper"
49 | FValuesProp: TRecordPropertyHelper;
50 | // we need to be notified when FValues is modified
51 | FOnChange : TNotifyEvent;
52 | procedure DoChange;
53 | protected
54 | procedure DefineProperties(Filer: TFiler); override;
55 | public
56 | procedure ReadStr(Reader: TReader);
57 | procedure ReadInt(Reader: TReader);
58 | procedure WriteStr(Writer: TWriter);
59 | procedure WriteInt(Writer: TWriter);
60 | constructor Create(AOwner: TComponent); override;
61 | published
62 | property OnChange: TNotifyEvent read FOnChange write FOnChange;
63 | // Delphi (Tokyo) do not support published Record members, we have to add some property editors...
64 | property Values: TRecordPropertyHelper read FValuesProp write FValuesProp;
65 | end;
66 |
67 | implementation
68 |
69 | { TRecordPropertyHelper }
70 |
71 | function TRecordPropertyHelper.GetInt: Integer;
72 | begin
73 | Result := FOwner.FValues.Int;
74 | end;
75 |
76 | function TRecordPropertyHelper.GetStr: string;
77 | begin
78 | Result := FOwner.FValues.Str;
79 | end;
80 |
81 | procedure TRecordPropertyHelper.SetInt(Value: Integer);
82 | begin
83 | if Value <> FOwner.FValues.Int then
84 | begin
85 | FOwner.FValues.Int := Value;
86 | FOwner.DoChange;
87 | end;
88 | end;
89 |
90 | procedure TRecordPropertyHelper.SetStr(Value: string);
91 | begin
92 | if Value <> FOwner.FValues.Str then
93 | begin
94 | FOwner.FValues.Str := Value;
95 | FOwner.DoChange;
96 | end;
97 | end;
98 |
99 | { TRecordPropertyObject }
100 |
101 | constructor TRecordPropertyObject.Create(AOwner: TComponent);
102 | begin
103 | inherited;
104 | // the "helper" needs to acces the object instance
105 | FValuesProp.FOwner := Self;
106 | end;
107 |
108 | procedure TRecordPropertyObject.DefineProperties(Filer: TFiler);
109 | begin
110 | inherited;
111 | // can not use "Values.Str":
112 | // the loader will find the "Values" published property but don't know how
113 | // to handle a tkRecord property
114 | Filer.DefineProperty('FValues.Str', ReadStr, WriteStr, FValues.Str <> '');
115 | Filer.DefineProperty('FValues.Int', ReadInt, WriteInt, FValues.Int <> 0);
116 | end;
117 |
118 | procedure TRecordPropertyObject.DoChange;
119 | begin
120 | if Assigned(FOnChange) then
121 | FOnChange(Self);
122 | end;
123 |
124 | procedure TRecordPropertyObject.ReadInt(Reader: TReader);
125 | begin
126 | FValues.Int := Reader.ReadInteger;
127 | end;
128 |
129 | procedure TRecordPropertyObject.ReadStr(Reader: TReader);
130 | begin
131 | FValues.Str := Reader.ReadString;
132 | end;
133 |
134 | procedure TRecordPropertyObject.WriteInt(Writer: TWriter);
135 | begin
136 | Writer.WriteInteger(FValues.Int);
137 | end;
138 |
139 | procedure TRecordPropertyObject.WriteStr(Writer: TWriter);
140 | begin
141 | Writer.WriteString(FValues.Str);
142 | end;
143 |
144 | end.
145 |
--------------------------------------------------------------------------------
/RecordProperty/Project1.dpr:
--------------------------------------------------------------------------------
1 | program Project1;
2 |
3 | uses
4 | Vcl.Forms,
5 | Unit1 in 'Unit1.pas' {Form1},
6 | Execute.RecordProperty in 'Execute.RecordProperty.pas';
7 |
8 | {$R *.res}
9 |
10 | begin
11 | Application.Initialize;
12 | Application.MainFormOnTaskbar := True;
13 | Application.CreateForm(TForm1, Form1);
14 | Application.Run;
15 | end.
16 |
--------------------------------------------------------------------------------
/RecordProperty/Project2.dpr:
--------------------------------------------------------------------------------
1 | program Project2;
2 |
3 | uses
4 | Vcl.Forms,
5 | Unit2 in 'Unit2.pas' {Form2};
6 |
7 | {$R *.res}
8 |
9 | begin
10 | Application.Initialize;
11 | Application.MainFormOnTaskbar := True;
12 | Application.CreateForm(TForm2, Form2);
13 | Application.Run;
14 | end.
15 |
--------------------------------------------------------------------------------
/RecordProperty/RecordPropertiesGroup.groupproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {99667BFC-9749-419D-9CA6-63F95C443CC4}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | Default.Personality.12
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/RecordProperty/RecordProperty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/RecordProperty/RecordProperty.png
--------------------------------------------------------------------------------
/RecordProperty/Unit1.dfm:
--------------------------------------------------------------------------------
1 | object Form1: TForm1
2 | Left = 0
3 | Top = 0
4 | Caption = 'Form1'
5 | ClientHeight = 299
6 | ClientWidth = 635
7 | Color = clBtnFace
8 | Font.Charset = DEFAULT_CHARSET
9 | Font.Color = clWindowText
10 | Font.Height = -11
11 | Font.Name = 'Tahoma'
12 | Font.Style = []
13 | OldCreateOrder = False
14 | PixelsPerInch = 96
15 | TextHeight = 13
16 | object Button1: TButton
17 | Left = 24
18 | Top = 15
19 | Width = 75
20 | Height = 25
21 | Caption = 'let'#39's try !'
22 | TabOrder = 0
23 | OnClick = Button1Click
24 | end
25 | object Memo1: TMemo
26 | Left = 24
27 | Top = 56
28 | Width = 545
29 | Height = 225
30 | Lines.Strings = (
31 |
32 | 'Project1 uses TRecordPropertyObject, a sample Delphi Component w' +
33 | 'ith a published Record property'
34 | ''
35 |
36 | 'you can change any value of the record and be notified by the On' +
37 | 'Change event.'
38 | ''
39 |
40 | 'This code do not need the installation of Execute.RecordProperti' +
41 | 'es.Package'
42 | ''
43 |
44 | '(Demo2 is the same demo with a registered packaged and a DesignT' +
45 | 'ime instance of the component)')
46 | TabOrder = 1
47 | end
48 | end
49 |
--------------------------------------------------------------------------------
/RecordProperty/Unit1.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/RecordProperty/Unit1.pas
--------------------------------------------------------------------------------
/RecordProperty/Unit2.dfm:
--------------------------------------------------------------------------------
1 | object Form2: TForm2
2 | Left = 0
3 | Top = 0
4 | Caption = 'Form2'
5 | ClientHeight = 299
6 | ClientWidth = 635
7 | Color = clBtnFace
8 | Font.Charset = DEFAULT_CHARSET
9 | Font.Color = clWindowText
10 | Font.Height = -11
11 | Font.Name = 'Tahoma'
12 | Font.Style = []
13 | OldCreateOrder = False
14 | PixelsPerInch = 96
15 | TextHeight = 13
16 | object Button1: TButton
17 | Left = 24
18 | Top = 16
19 | Width = 75
20 | Height = 25
21 | Caption = 'let'#39's try !'
22 | TabOrder = 0
23 | OnClick = Button1Click
24 | end
25 | object Memo1: TMemo
26 | Left = 24
27 | Top = 56
28 | Width = 545
29 | Height = 225
30 | Lines.Strings = (
31 |
32 | 'Demonstration of a sample component with a Record published prop' +
33 | 'erty'
34 | ''
35 |
36 | 'You can change values of the Record and be notified of the chang' +
37 | 'es by a OnChange event !'
38 | ''
39 |
40 | 'If you have an error about TRecordPropertyObject while opening t' +
41 | 'his form'
42 | ''
43 | '- close the project "WITHOUT SAVING CHANGES"'
44 | ''
45 | '- Install "Execute.RecrodProperties.Packaged" package'
46 | ''
47 | '- reopen this project'
48 | ''
49 | '(see Demo1 for a demo without the package)')
50 | TabOrder = 1
51 | end
52 | object Memo2: TMemo
53 | Left = 408
54 | Top = 136
55 | Width = 219
56 | Height = 83
57 | Color = clInfoBk
58 | Font.Charset = ANSI_CHARSET
59 | Font.Color = clWindowText
60 | Font.Height = -11
61 | Font.Name = 'Courier New'
62 | Font.Style = []
63 | Lines.Strings = (
64 | '// the structured property'
65 | ' TRecordProperty = record'
66 | ' Str: string;'
67 | ' Int: Integer;'
68 | ' end;')
69 | ParentFont = False
70 | TabOrder = 2
71 | end
72 | object RecordPropertyObject1: TRecordPropertyObject
73 | OnChange = RecordPropertyObject1Change
74 | Left = 352
75 | Top = 224
76 | FValues.Str = 'DesignTimeValue'
77 | FValues.Int = 456
78 | end
79 | end
80 |
--------------------------------------------------------------------------------
/RecordProperty/Unit2.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/RecordProperty/Unit2.pas
--------------------------------------------------------------------------------
/RecordProperty/readme.md:
--------------------------------------------------------------------------------
1 | # Sample component with a published Record property
2 |
3 | Delphi do not supports published Record properties, if you want to create a complex property, you have to create a subcomponent.
4 |
5 | This demonstration shows how to publish a Record property under Delphi Tokyo
6 |
7 | Note that the code needs to handle the fact that Delphi do not provide RTTI Informations for Record properties.
8 | [RSP-19303](https://quality.embarcadero.com/browse/RSP-19303)
9 |
10 | 
11 |
12 | ## How does it work ?
13 |
14 | 1- create a record (TRecordProperty in my code)
15 |
16 | 2- create an helper to publish this property (TRecordPropertyHelper)
17 |
18 | it's not a "record helper", it's just a record with public properties that match the previous record properties with only a pointer to the owner's object. This allows to call FOnChange when you change a property.
19 |
20 | 3- the component need both records, one to store the values, the other to publish them.
21 |
22 | 4- the component need also to register custom properties for the record because Delphi will not handle them (this could be done with a [JSON serializer](https://github.com/tothpaul/LetsEncryptDelphi/blob/master/lib/Execute.JSON.pas) BTW)
23 |
24 | this if for runtime code when you type "Component.Values.Str := 'xxx'" for instance,
25 | now we want the properties in the object inspector; for that you'll need to register a PropertyEditor.
26 |
27 | I've created a TRecordPropertyProxy, a TPersistent class that publish the record properties so Delphi can deal with that without other hacks (see [RSP-19303](https://quality.embarcadero.com/browse/RSP-19303), and [RSP-20848](https://quality.embarcadero.com/browse/RSP-20848)).
--------------------------------------------------------------------------------
/SQLStrings/SQLStrings.dpr:
--------------------------------------------------------------------------------
1 | program SQLStrings;
2 |
3 | (*
4 | Demonstration of how to implement a feature I had in mind
5 | (c)2018 Paul TOTH
6 |
7 | for SQL I have to write things like that:
8 |
9 | Query.SQL := 'SELECT Field1, Field2... WHERE ID = :ID';
10 | Query.ParamByName('ID').AsInteger := id;
11 | Query.Open;
12 | if Query.FieldByName('Field1').AsInteger = 1 then
13 | ShowMessage(Query.FieldByName('Field2').AsString;
14 |
15 | you can also write things like that to avoid field name lookups
16 |
17 | Query.SQL := 'SELECT Field1, Field2... WHERE ID = :ID';
18 | Query.Params[0].AsInteger := id;
19 | Query.Open;
20 | if Query.Fields[0].AsInteger = 1 then
21 | ShowMessage(Query.Fields[1].AsString;
22 |
23 | but add a field in the SQL and all the index can change
24 |
25 | so I would like to write something like that
26 |
27 | s := 'SELECT {field1}, {field2} ... WHERE ID = {:ID}'
28 |
29 | having
30 |
31 | s.field1 = 0
32 | s.field2 = 1
33 | s.ID = 0
34 |
35 | the code bellow use a custom Variant to make that, but what I had in mind
36 | is a compile time resolution of the string, not a runtime info.
37 |
38 | note also that Firebird for instance do not use named parameters, but only question marks,
39 | so the syntax needs some options to change the way values are computed
40 |
41 | s := 'SELECT {field1}, {field2} ... WHERE ID = {?ID}'
42 |
43 | *)
44 |
45 | {$APPTYPE CONSOLE}
46 |
47 | uses
48 | System.SysUtils,
49 | System.Variants;
50 |
51 | type
52 | TSQLString = class(TInvokeableVariantType)
53 | private const
54 | VTYPE = $0113;
55 | private type
56 | TStringInfo = class
57 | RefCount: Integer;
58 | Value : string;
59 | Fields : TArray;
60 | Params : TArray;
61 | constructor Create(const AValue: string);
62 | function AddName(Start, Stop: Integer): Boolean;
63 | procedure Release;
64 | function IndexOf(const AName: string): Integer;
65 | end;
66 | class var
67 | instance: TSQLString;
68 | public
69 | class procedure Init(var V: Variant; const Value: string);
70 | procedure Clear(var V: TVarData); override;
71 | procedure Copy(var Dest: TVarData; const Source: TVarData;
72 | const Indirect: Boolean); override;
73 | procedure CastTo(var Dest: TVarData; const Source: TVarData;
74 | const AVarType: TVarType); override;
75 | function GetProperty(var Dest: TVarData; const V: TVarData;
76 | const Name: string): Boolean; override;
77 | end;
78 |
79 | function AddStrings(var Strings: TArray; const AValue: string): Integer;
80 | begin
81 | Result := High(Strings);
82 | while Result >= 0 do
83 | begin
84 | if Strings[Result] = AValue then
85 | Exit;
86 | Dec(Result);
87 | end;
88 | Result := Length(Strings);
89 | SetLength(Strings, Result + 1);
90 | Strings[Result] := AValue;
91 | end;
92 |
93 | function StringsIndex(const Strings: TArray; const AValue: string): Integer;
94 | begin
95 | Result := High(Strings);
96 | while Result >= 0 do
97 | begin
98 | if Strings[Result] = AValue then
99 | Exit;
100 | Dec(Result);
101 | end;
102 | end;
103 |
104 | constructor TSQLString.TStringInfo.Create(const AValue: string);
105 | var
106 | Start: Integer;
107 | Stop : Integer;
108 | Index: Integer;
109 | begin
110 | inherited Create;
111 | Value := AValue;
112 | Start := Pos('{', Value);
113 | while Start > 0 do
114 | begin
115 | Stop := Pos('}', Value, Start);
116 | if Stop < Start then
117 | Break;
118 | if not AddName(Start, Stop) then
119 | Inc(Start);
120 | Start := Pos('{', Value, Start);
121 | end;
122 | end;
123 |
124 | function TSQLString.TStringInfo.AddName(Start, Stop: Integer): Boolean;
125 | var
126 | QMark: Boolean;
127 | Param: Boolean;
128 | Index: Integer;
129 | Name : string;
130 | begin
131 | Index := Start + 1;
132 | QMark := Value[Index] = '?';
133 | Param := QMark or (Value[Index] = ':');
134 | if Param then
135 | Inc(Index);
136 | if Value[Index] in ['0'..'9'] then
137 | Exit(False);
138 | while Index < Stop do
139 | begin
140 | if not (Value[Index] in ['_', 'a'..'z', 'A'..'Z', '0'..'9']) then
141 | Break;
142 | Inc(Index);
143 | end;
144 | if Index <> Stop then
145 | Exit(False);
146 | Delete(Value, Stop, 1);
147 | Delete(Value, Start, 1);
148 | if Param then
149 | Inc(Start)
150 | else
151 | Dec(Stop);
152 | Dec(Stop, Start);
153 | Name := UpperCase(System.Copy(Value, Start, Stop));
154 | if QMark then
155 | Delete(Value, Start, Stop);
156 | if Param then
157 | AddStrings(Params, Name)
158 | else
159 | AddStrings(Fields, Name);
160 | Result := True;
161 | end;
162 |
163 | procedure TSQLString.TStringInfo.Release;
164 | begin
165 | if Self = nil then
166 | Exit;
167 | Dec(RefCount);
168 | if RefCount < 0 then
169 | Destroy;
170 | end;
171 |
172 | function TSQLString.TStringInfo.IndexOf(const AName: string): Integer;
173 | begin
174 | Result := -1;
175 | if Self = nil then
176 | Exit;
177 | Result := StringsIndex(Fields, AName);
178 | if Result < 0 then
179 | Result := StringsIndex(Params, AName);
180 | end;
181 |
182 | class procedure TSQLString.Init(var V: Variant; const Value: string);
183 | begin
184 | if Instance = nil then
185 | Instance := TSQLString.Create(VTYPE);
186 | VarClear(V);
187 | TVarData(V).VType := VTYPE;
188 | if Value <> '' then
189 | TVarData(V).VPointer := TStringInfo.Create(Value);
190 | end;
191 |
192 | procedure TSQLString.CastTo(var Dest: TVarData; const Source: TVarData;
193 | const AVarType: TVarType);
194 | begin
195 | if (Source.VType = VTYPE) and (AVarType = varUString) then
196 | begin
197 | if Source.VPointer = nil then
198 | Variant(Dest) := ''
199 | else
200 | Variant(Dest) := TStringInfo(Source.VPointer).Value;
201 | end else begin
202 | inherited;
203 | end;
204 | end;
205 |
206 | procedure TSQLString.Clear(var V: TVarData);
207 | begin
208 | if V.VType = VTYPE then
209 | TStringInfo(V.VPointer).Release;
210 | end;
211 |
212 | procedure TSQLString.Copy(var Dest: TVarData; const Source: TVarData;
213 | const Indirect: Boolean);
214 | begin
215 | Init(Variant(Dest), '');
216 | if Source.VType = VTYPE then
217 | begin
218 | if Source.VPointer <> nil then
219 | begin
220 | Dest.VPointer := Source.VPointer;
221 | if not Indirect then
222 | begin
223 | Inc(TStringInfo(Source.VPointer).RefCount);
224 | end;
225 | end;
226 | end;
227 | end;
228 |
229 | function TSQLString.GetProperty(var Dest: TVarData; const V: TVarData;
230 | const Name: string): Boolean;
231 | var
232 | Index: Integer;
233 | begin
234 | Result := V.VType = VTYPE;
235 | if Result then
236 | begin
237 | Variant(Dest) := TStringInfo(V.VPointer).IndexOf(Name);
238 | end;
239 | end;
240 |
241 | var
242 | s: string;
243 | v: Variant;
244 | begin
245 | WriteLn('SQLStrings demo:');
246 | WriteLn;
247 | s := 'SELECT {name}, {age} FROM customers WHERE id = {:id}';
248 | TSQLString.Init(v, s);
249 | WriteLn(s);
250 | WriteLn(v); // SELECT name, age FROM customers WHERE id = :id
251 | WriteLn('name = ', v.name); // 0
252 | WriteLn('age = ', v.age); // 1
253 | WriteLn('id = ', v.id); // 0
254 | WriteLn('unknow = ', v.unknow); // -1
255 |
256 | WriteLn;
257 | s := 'SELECT {name}, {age} FROM customers WHERE id = {?id}';
258 | TSQLString.Init(v, s);
259 | WriteLn(s);
260 | WriteLn(v); // SELECT name, age FROM customers WHERE id = ?
261 | WriteLn('name = ', v.name); // 0
262 | WriteLn('age = ', v.age); // 1
263 | WriteLn('id = ', v.id); // 0
264 | WriteLn('unknow = ', v.unknow); // -1
265 |
266 | ReadLn;
267 | end.
268 |
--------------------------------------------------------------------------------
/SQLStrings/readme.md:
--------------------------------------------------------------------------------
1 | # SQLStrings
2 |
3 | Demonstration of how to implement a feature I had in mind
4 |
5 | (c)2018 Paul TOTH
6 |
7 | for SQL I have to write things like that:
8 | ```
9 | Query.SQL := 'SELECT Field1, Field2... WHERE ID = :ID';
10 | Query.ParamByName('ID').AsInteger := id;
11 | Query.Open;
12 | if Query.FieldByName('Field1').AsInteger = 1 then
13 | ShowMessage(Query.FieldByName('Field2').AsString;
14 | ```
15 | you can also write things like that to avoid field name lookups
16 | ```
17 | Query.SQL := 'SELECT Field1, Field2... WHERE ID = :ID';
18 | Query.Params[0].AsInteger := id;
19 | Query.Open;
20 | if Query.Fields[0].AsInteger = 1 then
21 | ShowMessage(Query.Fields[1].AsString;
22 | ```
23 | but add a field in the SQL and all the index can change
24 |
25 | so I would like to write something like that
26 | ```
27 | s := 'SELECT {field1}, {field2} ... WHERE ID = {:ID}'
28 | ```
29 | having
30 | ```
31 | s.field1 = 0
32 | s.field2 = 1
33 | s.ID = 0
34 | ```
35 | the code bellow use a custom Variant to make that, but what I had in mind
36 | is a compile time resolution of the string, not a runtime info.
37 |
38 | note also that Firebird for instance do not use named parameters, but only question marks,
39 | so the syntax needs some options to change the way values are computed
40 | ```
41 | s := 'SELECT {field1}, {field2} ... WHERE ID = {?ID}'
42 | ```
--------------------------------------------------------------------------------
/SplashTest/Project1.dpr:
--------------------------------------------------------------------------------
1 | program Project1;
2 |
3 | uses
4 | Vcl.Forms,
5 | Unit1 in 'Unit1.pas' {Form1},
6 | Unit2 in 'Unit2.pas' {Frame2: TFrame},
7 | Unit3 in 'Unit3.pas' {Frame3: TFrame};
8 |
9 | {$R *.res}
10 |
11 | begin
12 | Application.Initialize;
13 | Application.MainFormOnTaskbar := True;
14 | Application.CreateForm(TForm1, Form1);
15 | Application.Run;
16 | end.
17 |
--------------------------------------------------------------------------------
/SplashTest/Project1.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/SplashTest/Project1.res
--------------------------------------------------------------------------------
/SplashTest/Unit1.dfm:
--------------------------------------------------------------------------------
1 | object Form1: TForm1
2 | Left = 0
3 | Top = 0
4 | Caption = 'Form1'
5 | ClientHeight = 299
6 | ClientWidth = 635
7 | Color = clBtnFace
8 | Font.Charset = DEFAULT_CHARSET
9 | Font.Color = clWindowText
10 | Font.Height = -11
11 | Font.Name = 'Tahoma'
12 | Font.Style = []
13 | OldCreateOrder = False
14 | OnCreate = FormCreate
15 | PixelsPerInch = 96
16 | TextHeight = 13
17 | end
18 |
--------------------------------------------------------------------------------
/SplashTest/Unit1.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/SplashTest/Unit1.pas
--------------------------------------------------------------------------------
/SplashTest/Unit2.dfm:
--------------------------------------------------------------------------------
1 | object Frame2: TFrame2
2 | Left = 0
3 | Top = 0
4 | Width = 320
5 | Height = 240
6 | TabOrder = 0
7 | DesignSize = (
8 | 320
9 | 240)
10 | object Label1: TLabel
11 | Left = 120
12 | Top = 113
13 | Width = 75
14 | Height = 13
15 | Anchors = []
16 | Caption = 'Chargement....'
17 | end
18 | object ProgressBar1: TProgressBar
19 | Left = 16
20 | Top = 208
21 | Width = 281
22 | Height = 17
23 | Anchors = [akLeft, akRight, akBottom]
24 | Max = 50
25 | Step = 1
26 | TabOrder = 0
27 | end
28 | object Timer1: TTimer
29 | Interval = 100
30 | OnTimer = Timer1Timer
31 | Left = 152
32 | Top = 32
33 | end
34 | end
35 |
--------------------------------------------------------------------------------
/SplashTest/Unit2.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/SplashTest/Unit2.pas
--------------------------------------------------------------------------------
/SplashTest/Unit3.dfm:
--------------------------------------------------------------------------------
1 | object Frame3: TFrame3
2 | Left = 0
3 | Top = 0
4 | Width = 320
5 | Height = 240
6 | TabOrder = 0
7 | object Label1: TLabel
8 | Left = 128
9 | Top = 112
10 | Width = 57
11 | Height = 13
12 | Caption = 'Bienvenue !'
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/SplashTest/Unit3.pas:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tothpaul/DelphiTips/2060b5a24fb9cf73ff2ad7301467ff506aeba7a6/SplashTest/Unit3.pas
--------------------------------------------------------------------------------
/SplashTest/readme.md:
--------------------------------------------------------------------------------
1 | ## SplahsTest
2 |
3 | How to use Frames with an empty MainForm to handle a SplashScreen
4 |
5 | - Unit1 is an empty Form
6 | - Unit2 is the SplashScreen
7 | - Unit3 is the main Frame of the application
--------------------------------------------------------------------------------
/Tuple/Execute.Tuple.pas:
--------------------------------------------------------------------------------
1 | unit Execute.Tuple;
2 |
3 | { Variant Tuple for Delphi Tokyo (c)2018 Execute SARL }
4 |
5 | {
6 | procedure AfficheMonTuple(const ATuple: Variant);
7 | begin
8 | ShowMessage(string(ATuple.Prenom) + ' ' + string(ATuple.Nom) + ' ' + string(ATuple.Age) + ' ' + string(ATuple.Taille));
9 | end;
10 |
11 | var
12 | v: Variant;
13 | begin
14 | TTuple.Init(v);
15 | v.Nom := 'Durand';
16 | v.Prenom := 'Pierre';
17 | v.Age := 45;
18 | v.Taille := 1.80;
19 | AfficheMonTuple(v);
20 | end;
21 |
22 | }
23 |
24 | interface
25 |
26 | uses
27 | System.SysUtils,
28 | System.Variants;
29 |
30 | type
31 | TTuple = class(TInvokeableVariantType)
32 | private const
33 | VTYPE = $0112;
34 | public
35 | // basic functions
36 | procedure Clear(var V: TVarData); override;
37 | procedure Copy(var Dest: TVarData; const Source: TVarData;
38 | const Indirect: Boolean); override;
39 | // properties
40 | function SetProperty(const V: TVarData; const Name: string;
41 | const Value: TVarData): Boolean; override;
42 | function GetProperty(var Dest: TVarData; const V: TVarData;
43 | const Name: string): Boolean; override;
44 | // initialization
45 | class procedure Init(var V: Variant);
46 | end;
47 |
48 | implementation
49 |
50 | var
51 | Instance: TTuple;
52 |
53 | type
54 | TProperty = record
55 | Name : string;
56 | Value: Variant;
57 | end;
58 | TProperties = TArray;
59 |
60 | function GetPropIndex(var Props: TProperties; const Name: string): Integer;
61 | begin
62 | Result := Length(Props) - 1;
63 | while Result >= 0 do
64 | begin
65 | if Props[Result].Name = Name then
66 | Exit;
67 | Dec(Result);
68 | end;
69 | end;
70 |
71 | procedure SetTupleProperty(var Props: TProperties; const Name: string; const Value: TVarData);
72 | var
73 | Index: Integer;
74 | begin
75 | Index := GetPropIndex(Props, Name);
76 | if Index < 0 then
77 | begin
78 | Index := Length(Props);
79 | SetLength(Props, Index + 1);
80 | Props[Index].Name := Name;
81 | end;
82 | Props[Index].Value := Variant(Value);
83 | end;
84 |
85 | function GetTupleProperty(var Props: TProperties; const Name: string; var Dest: TVarData): Boolean;
86 | var
87 | Index: Integer;
88 | begin
89 | Index := GetPropIndex(Props, Name);
90 | if Index < 0 then
91 | Result := False
92 | else begin
93 | Result := True;
94 | Variant(Dest) := Props[Index].Value;
95 | end;
96 | end;
97 |
98 | class procedure TTuple.Init(var V: Variant);
99 | begin
100 | if Instance = nil then
101 | Instance := TTuple.Create(VTYPE);
102 | VarClear(V);
103 | TVarData(V).VType := VTYPE;
104 | end;
105 |
106 | procedure TTuple.Clear(var V: TVarData);
107 | begin
108 | if V.VType = VType then
109 | TProperties(V.VPointer) := nil;
110 | end;
111 |
112 | procedure TTuple.Copy(var Dest: TVarData; const Source: TVarData;
113 | const Indirect: Boolean);
114 | begin
115 | init(Variant(Dest));
116 | if Source.VType = VTYPE then
117 | begin
118 | if Source.VPointer <> nil then
119 | begin
120 | if Indirect then
121 | begin
122 | Dest.VPointer := Source.VPointer;
123 | end else begin
124 | TProperties(Dest.VPointer) := System.Copy(TProperties(Source.VPointer));
125 | end;
126 | end;
127 | end;
128 | end;
129 |
130 | function TTuple.SetProperty(const V: TVarData; const Name: string;
131 | const Value: TVarData): Boolean;
132 | var
133 | P: PPointer;
134 | begin
135 | if V.VType = VTYPE then
136 | begin
137 | P := @V.VPointer;
138 | SetTupleProperty(TProperties(P^), Name, Value);
139 | Result := True;
140 | end else begin
141 | Result := False;
142 | end;
143 | end;
144 |
145 | function TTuple.GetProperty(var Dest: TVarData; const V: TVarData;
146 | const Name: string): Boolean;
147 | var
148 | P: PPointer;
149 | begin
150 | if V.VType = VTYPE then
151 | begin
152 | P := @V.VPointer;
153 | Result := GetTupleProperty(TProperties(P^), Name, Dest)
154 | end else begin
155 | Result := False;
156 | end;
157 | end;
158 |
159 |
160 | end.
161 |
--------------------------------------------------------------------------------
/Tuple/readme.md:
--------------------------------------------------------------------------------
1 | Quick unit to use Tuple under Delphi Tokyo
2 |
3 | ```
4 | procedure ShowMyTuple(const ATuple: Variant);
5 | begin
6 | ShowMessage(string(ATuple.FirstName) + ' ' + string(ATuple.LastName) + ' ' + string(ATuple.Age) + ' ' + string(ATuple.Size));
7 | end;
8 |
9 | var
10 | v: Variant;
11 | begin
12 | TTuple.Init(v);
13 | v.LastName := 'Durand';
14 | v.FirstName := 'Pierre';
15 | v.Age := 45;
16 | v.Size := 1.80;
17 | ShowMyTuple(v);
18 | end;
19 | ```
20 |
21 | based on an article by Vicente Romero Zaldivar
22 | https://community.embarcadero.com/article/technical-articles/162-programming/6064-programming-in-delphi-7-in-a-script-like-way
23 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # Delphi tips
2 |
3 | small piece of code for small things made with Delphi :)
--------------------------------------------------------------------------------