Skip to Main Content
Mastering Delphi Programming: A Complete Reference Guide
book

Mastering Delphi Programming: A Complete Reference Guide

by Primož Gabrijelčič
November 2019
Beginner to intermediate content levelBeginner to intermediate
674 pages
15h
English
Packt Publishing
Content preview from Mastering Delphi Programming: A Complete Reference Guide

Creating the pipeline

Let's look at the code now. The user interface has one button that can both start and stop the parallel operation. It's OnClick event is shown as follows. When starting the process, it calls the CreatePipeline method. To stop the process, it just calls the pipeline's Cancel method. The pipeline object will be destroyed later, through a termination event. I'll return to that part later.

procedure TfrmPipeline.btnStartClick(Sender: TObject);begin  if btnStart.Tag = 0 then begin    ListBox1.Items.Add(inpStartFolder.Text);    CreatePipeline;    btnStart.Caption := 'Stop';    btnStart.Tag := 1;    TimerUpdateProcessing.Enabled := true;  end  else    if assigned(FPipeline) then      FPipeline.Cancel;end;

The CreatePipeline method (shown as follows) ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Delphi GUI Programming with FireMonkey

Delphi GUI Programming with FireMonkey

Andrea Magni
Delphi Cookbook - Third Edition

Delphi Cookbook - Third Edition

Daniele Spinetti, Daniele Teti

Publisher Resources

ISBN: 9781838989118Other