Procedure

TfrmLabTestGroups.cmdAddClick

Module

fLabTestGroups

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public/Published

Owner

TfrmLabTestGroups

Declaration

procedure cmdAddClick(Sender: TObject);

Calls Hierarchy


TfrmLabTestGroups.cmdAddClick
 ├UTGAdd
 └TfrmLabTestGroups.cboUsersClick
   ├TestGroups
   └TfrmLabTestGroups.TestGroupEnable

Calls

Name Declaration Comments
TfrmLabTestGroups.cboUsersClick procedure cboUsersClick(Sender: TObject); -
UTGAdd procedure UTGAdd(tests: TStrings); -


Source

337   procedure TfrmLabTestGroups.cmdAddClick(Sender: TObject);
338   var
339     text: string;
340     i: integer;
341   begin
342     text := 'Do you wish to create a NEW test group with these tests: ' + #13 + '  ';
343     for i := 0 to lstList.Items.Count -1 do
344       text := text + lstList.DisplayText[i] + #13 + '  ';
345     if InfoBox(text,'Confirmation', MB_YESNO or MB_ICONQUESTION) = IDYES then
346     begin
347       UTGAdd(lstList.Items);
348       if ScreenReaderSystemActive then
349         GetScreenReader.Speak('New test group created');
350       cboUsers.InitLongList(User.Name);
351       for i := 0 to cboUsers.Items.Count - 1 do
352         if StrToInt64Def(Piece(cboUsers.Items[i], '^', 1), 0) = User.DUZ then
353         begin
354           cboUsers.ItemIndex := i;
355           break;
356         end;
357     end;
358     if cboUsers.ItemIndex > -1 then cboUsersClick(self);
359     lstTestGroups.SetFocus;  
360   end;