Changeset 152 for MicroThreading/Demo/UMainForm.pas
- Timestamp:
- Jan 27, 2011, 10:30:55 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MicroThreading/Demo/UMainForm.pas
r151 r152 21 21 ButtonSchedulerStartStop: TButton; 22 22 ButtonShowThreadId: TButton; 23 CheckBoxUseMainThread: TCheckBox; 23 24 GroupBox1: TGroupBox; 24 25 GroupBox2: TGroupBox; … … 53 54 procedure ButtonShowThreadIdClick(Sender: TObject); 54 55 procedure ButtonClearMicroThreadsClick(Sender: TObject); 56 procedure CheckBoxUseMainThreadChange(Sender: TObject); 55 57 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 56 58 procedure FormCreate(Sender: TObject); … … 165 167 begin 166 168 //Scheduler.FMicroThreads.Clear; 167 for I := 0 to SpinEdit1.Value do169 for I := 0 to SpinEdit1.Value - 1 do 168 170 Scheduler.AddMethod(Worker); 169 171 end; … … 199 201 Scheduler.MicroThreadsLock.Release; 200 202 end; 203 end; 204 205 procedure TMainForm.CheckBoxUseMainThreadChange(Sender: TObject); 206 begin 207 Scheduler.UseMainThread := CheckBoxUseMainThread.Checked; 201 208 end; 202 209
Note:
See TracChangeset
for help on using the changeset viewer.