Ignore:
Timestamp:
Feb 1, 2018, 1:41:56 PM (7 years ago)
Author:
chronos
Message:
  • Added: More editable contact fields.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContact.pas

    r8 r9  
    1616    ButtonCancel: TButton;
    1717    ButtonOk: TButton;
     18    EditWebPage: TEdit;
     19    EditWebPageHome: TEdit;
     20    EditWebPageWork: TEdit;
     21    EditEmailHome: TEdit;
     22    EditEmailWork: TEdit;
     23    EditBirthday: TEdit;
     24    EditTitle: TEdit;
     25    EditAddress: TEdit;
     26    EditOrganization: TEdit;
     27    EditPhoneHome: TEdit;
     28    EditPhoneWork: TEdit;
     29    EditCellPhoneHome: TEdit;
     30    EditCellPhoneWork: TEdit;
     31    EditFax: TEdit;
     32    EditFaxHome: TEdit;
     33    EditFaxWork: TEdit;
     34    EditPager: TEdit;
    1835    EditSurname: TEdit;
    1936    EditEmail: TEdit;
     
    2239    EditCellPhone: TEdit;
    2340    Label1: TLabel;
     41    Label10: TLabel;
     42    Label11: TLabel;
     43    Label12: TLabel;
     44    Label13: TLabel;
     45    Label14: TLabel;
     46    Label15: TLabel;
     47    Label16: TLabel;
     48    Label17: TLabel;
     49    Label18: TLabel;
     50    Label19: TLabel;
    2451    Label2: TLabel;
     52    Label20: TLabel;
     53    Label21: TLabel;
     54    Label22: TLabel;
     55    LabelOrganization: TLabel;
    2556    Label3: TLabel;
    2657    Label4: TLabel;
    2758    Label5: TLabel;
    2859    Label6: TLabel;
     60    Label7: TLabel;
     61    Label8: TLabel;
     62    Label9: TLabel;
    2963    ListView1: TListView;
    3064    MemoNotes: TMemo;
     
    3771    procedure FormShow(Sender: TObject);
    3872    procedure ListView1Data(Sender: TObject; Item: TListItem);
     73    procedure TabSheetAllShow(Sender: TObject);
    3974  private
    4075    Contact: TContact;
     
    6196  Core.PersistentForm1.Load(Self);
    6297  PageControlContact.TabIndex := 0;
    63   ReloadFields;
    6498end;
    6599
     
    71105    Item.SubItems.Add(Contact.Fields[Index]);
    72106  end;
     107end;
     108
     109procedure TFormContact.TabSheetAllShow(Sender: TObject);
     110begin
     111  ReloadFields;
    73112end;
    74113
     
    96135begin
    97136  Self.Contact := Contact;
    98   ReloadFields;
    99137  EditName.Text := Contact.FirstName;
    100138  EditSurname.Text := Contact.LastName;
    101139  EditCellPhone.Text := Contact.TelCell;
    102   EditPhone.Text := Contact.TelHome;
     140  EditPhoneHome.Text := Contact.TelHome;
     141  EditPhoneWork.Text := Contact.TelWork;
    103142  EditEmail.Text := Contact.EmailHome;
    104143  MemoNotes.Lines.Text := Contact.Note;
     144  EditTitle.Text := Contact.Title;
     145  EditOrganization.Text := Contact.Organization;
     146  EditAddress.Text := Contact.AdrHome;
     147  EditEmailHome.Text := Contact.EmailHome;
    105148end;
    106149
     
    110153  Contact.LastName := EditSurname.Text;
    111154  Contact.TelCell := EditCellPhone.Text;
    112   Contact.TelHome := EditPhone.Text;
     155  Contact.TelHome := EditPhoneHome.Text;
     156  Contact.TelWork := EditPhoneWork.Text;
    113157  Contact.EmailHome := EditEmail.Text;
    114158  Contact.Note := MemoNotes.Lines.Text;
     159  Contact.Title := EditTitle.Text;
     160  Contact.Organization := EditOrganization.Text;
     161  Contact.AdrHome := EditAddress.Text;
     162  Contact.EmailHome := EditEmailHome.Text;
    115163end;
    116164
Note: See TracChangeset for help on using the changeset viewer.