Ignore:
Timestamp:
Dec 2, 2021, 2:13:03 PM (3 years ago)
Author:
chronos
Message:
  • Fixed: List of contacts may not be reloaded on file open.
  • Modified: Preparation for previous/next contact actions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContact.pas

    r42 r43  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, ActnList, Menus, ExtCtrls, UContact, base64, UFormProperties;
     9  ComCtrls, ActnList, Menus, ExtCtrls, UContact, UFormProperties;
    1010
    1111type
     
    1717    ActionList1: TActionList;
    1818    ButtonCancel: TButton;
     19    ButtonNext: TButton;
    1920    ButtonOk: TButton;
     21    ButtonPrevious: TButton;
    2022    EditHomeAddressCity: TEdit;
    2123    EditHomeAddressCountry: TEdit;
     
    7880    Label2: TLabel;
    7981    Label22: TLabel;
    80     Label23: TLabel;
    8182    Label24: TLabel;
    8283    Label25: TLabel;
     
    120121    TabSheetGeneral: TTabSheet;
    121122    TabSheetAll: TTabSheet;
     123    procedure ButtonNextClick(Sender: TObject);
    122124    procedure ButtonOkClick(Sender: TObject);
     125    procedure ButtonPreviousClick(Sender: TObject);
    123126    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    124127    procedure FormCreate(Sender: TObject);
     
    130133  private
    131134    FContact: TContact;
     135    FOnNext: TNotifyEvent;
     136    FOnPrevious: TNotifyEvent;
    132137    FormProperties: TFormProperties;
    133138    procedure SetContact(AValue: TContact);
     
    136141    procedure SaveData;
    137142    property Contact: TContact read FContact write SetContact;
     143    property OnPrevious: TNotifyEvent read FOnPrevious write FOnPrevious;
     144    property OnNext: TNotifyEvent read FOnNext write FOnNext;
    138145  end;
    139146
     
    148155uses
    149156  UCore;
    150 
    151 resourcestring
    152   SFieldEdit = 'Field edit';
    153   SEditFieldValue = 'Edit field value';
    154157
    155158{ TFormContact }
     
    204207begin
    205208  SaveData;
     209end;
     210
     211procedure TFormContact.ButtonNextClick(Sender: TObject);
     212begin
     213  if Assigned(FOnNext) then FOnNext(Self);
     214end;
     215
     216procedure TFormContact.ButtonPreviousClick(Sender: TObject);
     217begin
     218  if Assigned(FOnPrevious) then FOnPrevious(Self);
    206219end;
    207220
Note: See TracChangeset for help on using the changeset viewer.