Changeset 77 for trunk/Forms/UFormContact.pas
- Timestamp:
- Dec 15, 2021, 9:03:17 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContact.pas
r71 r77 206 206 private 207 207 FContact: TContact; 208 FOn Next: TNotifyEvent;209 FOn Previous: TNotifyEvent;208 FOnGetNext: TGetContactEvent; 209 FOnGetPrevious: TGetContactEvent; 210 210 FormProperties: TFormProperties; 211 211 procedure SetContact(AValue: TContact); … … 216 216 procedure UpdateInterface; 217 217 property Contact: TContact read FContact write SetContact; 218 property On Previous: TNotifyEvent read FOnPrevious write FOnPrevious;219 property On Next: TNotifyEvent read FOnNext write FOnNext;218 property OnGetPrevious: TGetContactEvent read FOnGetPrevious write FOnGetPrevious; 219 property OnGetNext: TGetContactEvent read FOnGetNext write FOnGetNext; 220 220 end; 221 221 … … 654 654 procedure TFormContact.ButtonNextClick(Sender: TObject); 655 655 begin 656 if Assigned(FOnNext) then FOnNext(Self); 656 if Assigned(FOnGetNext) then 657 Contact := FOnGetNext(Contact); 657 658 end; 658 659 … … 679 680 procedure TFormContact.ButtonPreviousClick(Sender: TObject); 680 681 begin 681 if Assigned(FOnPrevious) then FOnPrevious(Self); 682 if Assigned(FOnGetPrevious) then 683 Contact := FOnGetPrevious(Contact); 682 684 end; 683 685 … … 699 701 APhotoSave.Enabled := ProfilePhotoActive; 700 702 APhotoClear.Enabled := ProfilePhotoActive; 703 //ButtonNext.Enabled := Assigned(FOnGetNext) and Assigned(FOnGetNext(Contact)); 704 //ButtonPrevious.Enabled := Assigned(FOnGetPrevious) and Assigned(FOnGetPrevious(Contact)); 701 705 end; 702 706
Note:
See TracChangeset
for help on using the changeset viewer.