Ignore:
Timestamp:
Feb 27, 2018, 6:11:44 PM (7 years ago)
Author:
chronos
Message:
  • Added: Partial support for color theming.
  • Added: Allow to edit contact properties in the list of all.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContact.pas

    r9 r15  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, UContact;
     9  ComCtrls, ActnList, Menus, UContact;
    1010
    1111type
     
    1414
    1515  TFormContact = class(TForm)
     16    AEditField: TAction;
     17    ActionList1: TActionList;
    1618    ButtonCancel: TButton;
    1719    ButtonOk: TButton;
     
    6365    ListView1: TListView;
    6466    MemoNotes: TMemo;
     67    MenuItem1: TMenuItem;
    6568    PageControlContact: TPageControl;
     69    PopupMenu1: TPopupMenu;
    6670    TabSheetGeneral: TTabSheet;
    6771    TabSheetDetails: TTabSheet;
    6872    TabSheetAll: TTabSheet;
     73    procedure AEditFieldExecute(Sender: TObject);
    6974    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    7075    procedure FormCreate(Sender: TObject);
     
    8994uses
    9095  UCore;
     96
     97resourcestring
     98  SFieldEdit = 'Field edit';
     99  SEditFieldValue = 'Edit field value';
    91100
    92101{ TFormContact }
     
    126135end;
    127136
     137procedure TFormContact.AEditFieldExecute(Sender: TObject);
     138begin
     139  if Assigned(ListView1.Selected) then begin
     140    Contact.Fields[TContactFieldIndex(ListView1.Selected.Index)] :=
     141      InputBox(SFieldEdit, SEditFieldValue, Contact.Fields[TContactFieldIndex(ListView1.Selected.Index)]);
     142  end;
     143end;
     144
    128145procedure TFormContact.FormCreate(Sender: TObject);
    129146begin
    130147  Core.CoolTranslator1.TranslateComponentRecursive(Self);
     148  Core.ThemeManager1.UseTheme(Self);
    131149  Contact := nil;
    132150end;
Note: See TracChangeset for help on using the changeset viewer.