Changeset 110 for trunk


Ignore:
Timestamp:
Feb 14, 2022, 6:06:33 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Edit name details in separate window.
Location:
trunk
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContact.lfm

    r109 r110  
    1313  OnShow = FormShow
    1414  LCLVersion = '2.2.0.4'
     15  object ButtonCancel: TButton
     16    Left = 900
     17    Height = 39
     18    Top = 720
     19    Width = 120
     20    Anchors = [akRight, akBottom]
     21    Caption = 'Cancel'
     22    ModalResult = 2
     23    ParentFont = False
     24    TabOrder = 0
     25  end
     26  object ButtonOk: TButton
     27    Left = 759
     28    Height = 39
     29    Top = 720
     30    Width = 124
     31    Anchors = [akRight, akBottom]
     32    Caption = 'OK'
     33    ModalResult = 1
     34    ParentFont = False
     35    TabOrder = 1
     36  end
     37  object ButtonPrevious: TButton
     38    Left = 8
     39    Height = 39
     40    Top = 720
     41    Width = 124
     42    Anchors = [akLeft, akBottom]
     43    Caption = 'Previous'
     44    OnClick = ButtonPreviousClick
     45    ParentFont = False
     46    TabOrder = 2
     47    Visible = False
     48  end
     49  object ButtonNext: TButton
     50    Left = 150
     51    Height = 39
     52    Top = 720
     53    Width = 120
     54    Anchors = [akLeft, akBottom]
     55    Caption = 'Next'
     56    OnClick = ButtonNextClick
     57    ParentFont = False
     58    TabOrder = 3
     59    Visible = False
     60  end
    1561  object PageControlContact: TPageControl
    1662    Left = 8
     
    1864    Top = 8
    1965    Width = 1009
    20     ActivePage = TabSheetHome
     66    ActivePage = TabSheetGeneral
    2167    Anchors = [akTop, akLeft, akRight, akBottom]
    2268    ParentFont = False
    23     TabIndex = 1
    24     TabOrder = 0
     69    TabIndex = 0
     70    TabOrder = 4
    2571    object TabSheetGeneral: TTabSheet
    2672      Caption = 'General'
     
    3076      OnShow = TabSheetGeneralShow
    3177      ParentFont = False
    32       object Label1: TLabel
    33         Left = 250
    34         Height = 27
    35         Top = 83
    36         Width = 101
    37         Caption = 'First name:'
    38         ParentFont = False
    39       end
    40       object EditFirstName: TEdit
    41         Left = 375
    42         Height = 43
    43         Top = 75
    44         Width = 161
    45         OnChange = NamePartChange
    46         ParentFont = False
    47         TabOrder = 1
    48       end
    4978      object Label2: TLabel
    5079        Left = 17
     
    6190        Width = 265
    6291        ParentFont = False
    63         TabOrder = 7
     92        TabOrder = 2
    6493      end
    6594      object EditPhone: TEdit
     
    6998        Width = 265
    7099        ParentFont = False
    71         TabOrder = 9
     100        TabOrder = 4
    72101      end
    73102      object Label3: TLabel
     
    85114        Width = 216
    86115        ParentFont = False
    87         TabOrder = 11
     116        TabOrder = 6
    88117      end
    89118      object Label4: TLabel
     
    95124        ParentFont = False
    96125      end
    97       object EditLastName: TEdit
    98         Left = 700
    99         Height = 43
    100         Top = 75
    101         Width = 161
    102         OnChange = NamePartChange
    103         ParentFont = False
    104         TabOrder = 2
    105       end
    106       object Label5: TLabel
    107         Left = 558
    108         Height = 27
    109         Top = 83
    110         Width = 94
    111         Caption = 'Last name'
    112         ParentFont = False
    113       end
    114126      object EditBirthday: TEdit
    115127        Left = 150
     
    118130        Width = 216
    119131        ParentFont = False
    120         TabOrder = 14
     132        TabOrder = 9
    121133      end
    122134      object Label22: TLabel
     
    151163        Height = 43
    152164        Top = 25
    153         Width = 486
     165        Width = 354
    154166        OnChange = EditFullNameChange
    155167        ParentFont = False
    156168        TabOrder = 0
    157       end
    158       object Label25: TLabel
    159         Left = 558
    160         Height = 27
    161         Top = 133
    162         Width = 124
    163         Caption = 'Middle name:'
    164         ParentFont = False
    165       end
    166       object EditMiddleName: TEdit
    167         Left = 699
    168         Height = 43
    169         Top = 125
    170         Width = 161
    171         OnChange = NamePartChange
    172         ParentFont = False
    173         TabOrder = 4
    174       end
    175       object Label26: TLabel
    176         Left = 250
    177         Height = 27
    178         Top = 183
    179         Width = 106
    180         Caption = 'Title before:'
    181         ParentFont = False
    182       end
    183       object EditTitleBefore: TEdit
    184         Left = 376
    185         Height = 43
    186         Top = 175
    187         Width = 161
    188         OnChange = NamePartChange
    189         ParentFont = False
    190         TabOrder = 5
    191       end
    192       object Label27: TLabel
    193         Left = 558
    194         Height = 27
    195         Top = 183
    196         Width = 91
    197         Caption = 'Title after:'
    198         ParentFont = False
    199       end
    200       object EditTitleAfter: TEdit
    201         Left = 699
    202         Height = 43
    203         Top = 175
    204         Width = 161
    205         OnChange = NamePartChange
    206         ParentFont = False
    207         TabOrder = 6
    208169      end
    209170      object Label44: TLabel
    210171        Left = 250
    211172        Height = 27
    212         Top = 133
     173        Top = 88
    213174        Width = 95
    214175        Caption = 'Nickname:'
     
    216177      end
    217178      object EditNickName: TEdit
    218         Left = 375
    219         Height = 43
    220         Top = 125
    221         Width = 161
    222         ParentFont = False
    223         TabOrder = 3
     179        Left = 376
     180        Height = 43
     181        Top = 80
     182        Width = 224
     183        ParentFont = False
     184        TabOrder = 1
    224185      end
    225186      object Label45: TLabel
     
    237198        Width = 217
    238199        ParentFont = False
    239         TabOrder = 15
     200        TabOrder = 10
    240201      end
    241202      object Label9: TLabel
     
    253214        Width = 265
    254215        ParentFont = False
    255         TabOrder = 8
     216        TabOrder = 3
    256217      end
    257218      object EditPager: TEdit
     
    261222        Width = 265
    262223        ParentFont = False
    263         TabOrder = 10
     224        TabOrder = 5
    264225      end
    265226      object Label10: TLabel
     
    285246        Width = 666
    286247        ParentFont = False
    287         TabOrder = 13
     248        TabOrder = 8
    288249      end
    289250      object Label49: TLabel
     
    301262        Width = 265
    302263        ParentFont = False
    303         TabOrder = 12
     264        TabOrder = 7
    304265      end
    305266      object Label56: TLabel
     
    317278        Width = 265
    318279        ParentFont = False
    319         TabOrder = 16
     280        TabOrder = 11
    320281      end
    321282      object SpeedButtonWeb: TSpeedButton
     
    366327        ShowHint = True
    367328        ParentShowHint = False
     329      end
     330      object ButtonNameDetails: TButton
     331        Left = 735
     332        Height = 43
     333        Top = 25
     334        Width = 125
     335        Caption = 'Details'
     336        OnClick = ButtonNameDetailsClick
     337        TabOrder = 12
    368338      end
    369339    end
     
    704674        Width = 920
    705675        Caption = 'Address'
    706         ClientHeight = 281
     676        ClientHeight = 255
    707677        ClientWidth = 918
    708678        TabOrder = 9
     
    13471317      ParentFont = False
    13481318    end
    1349   end
    1350   object ButtonCancel: TButton
    1351     Left = 900
    1352     Height = 39
    1353     Top = 720
    1354     Width = 120
    1355     Anchors = [akRight, akBottom]
    1356     Caption = 'Cancel'
    1357     ModalResult = 2
    1358     ParentFont = False
    1359     TabOrder = 1
    1360   end
    1361   object ButtonOk: TButton
    1362     Left = 759
    1363     Height = 39
    1364     Top = 720
    1365     Width = 124
    1366     Anchors = [akRight, akBottom]
    1367     Caption = 'OK'
    1368     ModalResult = 1
    1369     ParentFont = False
    1370     TabOrder = 2
    1371   end
    1372   object ButtonPrevious: TButton
    1373     Left = 8
    1374     Height = 39
    1375     Top = 720
    1376     Width = 124
    1377     Anchors = [akLeft, akBottom]
    1378     Caption = 'Previous'
    1379     OnClick = ButtonPreviousClick
    1380     ParentFont = False
    1381     TabOrder = 3
    1382     Visible = False
    1383   end
    1384   object ButtonNext: TButton
    1385     Left = 150
    1386     Height = 39
    1387     Top = 720
    1388     Width = 120
    1389     Anchors = [akLeft, akBottom]
    1390     Caption = 'Next'
    1391     OnClick = ButtonNextClick
    1392     ParentFont = False
    1393     TabOrder = 4
    1394     Visible = False
    13951319  end
    13961320  object ActionList1: TActionList
  • trunk/Forms/UFormContact.lrj

    r103 r110  
    11{"version":1,"strings":[
    22{"hash":174434276,"name":"tformcontact.caption","sourcebytes":[67,111,110,116,97,99,116],"value":"Contact"},
     3{"hash":77089212,"name":"tformcontact.buttoncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"},
     4{"hash":1339,"name":"tformcontact.buttonok.caption","sourcebytes":[79,75],"value":"OK"},
     5{"hash":147653555,"name":"tformcontact.buttonprevious.caption","sourcebytes":[80,114,101,118,105,111,117,115],"value":"Previous"},
     6{"hash":347380,"name":"tformcontact.buttonnext.caption","sourcebytes":[78,101,120,116],"value":"Next"},
    37{"hash":231000124,"name":"tformcontact.tabsheetgeneral.caption","sourcebytes":[71,101,110,101,114,97,108],"value":"General"},
    4 {"hash":104434218,"name":"tformcontact.label1.caption","sourcebytes":[70,105,114,115,116,32,110,97,109,101,58],"value":"First name:"},
    58{"hash":72942298,"name":"tformcontact.label2.caption","sourcebytes":[77,111,98,105,108,101,58],"value":"Mobile:"},
    69{"hash":91186314,"name":"tformcontact.label3.caption","sourcebytes":[80,104,111,110,101,58],"value":"Phone:"},
    710{"hash":138641338,"name":"tformcontact.label4.caption","sourcebytes":[69,45,109,97,105,108,58],"value":"E-mail:"},
    8 {"hash":174528181,"name":"tformcontact.label5.caption","sourcebytes":[76,97,115,116,32,110,97,109,101],"value":"Last name"},
    911{"hash":162456010,"name":"tformcontact.label22.caption","sourcebytes":[66,105,114,116,104,100,97,121,58],"value":"Birthday:"},
    1012{"hash":242270122,"name":"tformcontact.label24.caption","sourcebytes":[70,117,108,108,32,110,97,109,101,58],"value":"Full name:"},
    11 {"hash":40626346,"name":"tformcontact.label25.caption","sourcebytes":[77,105,100,100,108,101,32,110,97,109,101,58],"value":"Middle name:"},
    12 {"hash":62410682,"name":"tformcontact.label26.caption","sourcebytes":[84,105,116,108,101,32,98,101,102,111,114,101,58],"value":"Title before:"},
    13 {"hash":63774250,"name":"tformcontact.label27.caption","sourcebytes":[84,105,116,108,101,32,97,102,116,101,114,58],"value":"Title after:"},
    1413{"hash":170145658,"name":"tformcontact.label44.caption","sourcebytes":[78,105,99,107,110,97,109,101,58],"value":"Nickname:"},
    1514{"hash":136108298,"name":"tformcontact.label45.caption","sourcebytes":[65,110,110,105,118,101,114,115,97,114,121,58],"value":"Anniversary:"},
     
    2322{"hash":171928085,"name":"tformcontact.speedbuttonbirthday.hint","sourcebytes":[83,101,108,101,99,116,32,100,97,116,101],"value":"Select date"},
    2423{"hash":171928085,"name":"tformcontact.speedbuttonaniversary.hint","sourcebytes":[83,101,108,101,99,116,32,100,97,116,101],"value":"Select date"},
     24{"hash":181043315,"name":"tformcontact.buttonnamedetails.caption","sourcebytes":[68,101,116,97,105,108,115],"value":"Details"},
    2525{"hash":325173,"name":"tformcontact.tabsheethome.caption","sourcebytes":[72,111,109,101],"value":"Home"},
    2626{"hash":138641338,"name":"tformcontact.label7.caption","sourcebytes":[69,45,109,97,105,108,58],"value":"E-mail:"},
     
    9090{"hash":89566314,"name":"tformcontact.label6.caption","sourcebytes":[78,111,116,101,115,58],"value":"Notes:"},
    9191{"hash":113983571,"name":"tformcontact.tabsheetall.caption","sourcebytes":[65,108,108,32,102,105,101,108,100,115],"value":"All fields"},
    92 {"hash":77089212,"name":"tformcontact.buttoncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"},
    93 {"hash":1339,"name":"tformcontact.buttonok.caption","sourcebytes":[79,75],"value":"OK"},
    94 {"hash":147653555,"name":"tformcontact.buttonprevious.caption","sourcebytes":[80,114,101,118,105,111,117,115],"value":"Previous"},
    95 {"hash":347380,"name":"tformcontact.buttonnext.caption","sourcebytes":[78,101,120,116],"value":"Next"},
    9692{"hash":8431845,"name":"tformcontact.aphotoload.caption","sourcebytes":[76,111,97,100,32,102,114,111,109,32,102,105,108,101],"value":"Load from file"},
    9793{"hash":9308581,"name":"tformcontact.aphotosave.caption","sourcebytes":[83,97,118,101,32,116,111,32,102,105,108,101],"value":"Save to file"},
  • trunk/Forms/UFormContact.pas

    r109 r110  
    2121    APhotoLoad: TAction;
    2222    ActionList1: TActionList;
     23    ButtonCancel: TButton;
    2324    ButtonHomeAddressShow: TButton;
    24     ButtonCancel: TButton;
    25     ButtonWorkAddressShow: TButton;
     25    ButtonNameDetails: TButton;
    2626    ButtonNext: TButton;
    2727    ButtonOk: TButton;
    2828    ButtonPrevious: TButton;
     29    ButtonWorkAddressShow: TButton;
    2930    CalendarDialog1: TCalendarDialog;
    3031    EditAim: TEdit;
     32    EditAniversary: TEdit;
     33    EditBirthday: TEdit;
    3134    EditCategories: TEdit;
    32     EditMatrix: TEdit;
     35    EditDepartment: TEdit;
     36    EditEmail: TEdit;
     37    EditFacebook: TEdit;
     38    EditFax: TEdit;
     39    EditFullName: TEdit;
    3340    EditGaduGadu: TEdit;
     41    EditGender: TEdit;
     42    EditGoogleTalk: TEdit;
    3443    EditGroupWise: TEdit;
    35     EditYouTube: TEdit;
    36     EditGender: TEdit;
    37     EditLinkedIn: TEdit;
    38     EditFacebook: TEdit;
    39     EditInstagram: TEdit;
    40     EditMySpace: TEdit;
    41     EditTwitter: TEdit;
    42     EditReddit: TEdit;
    43     EditMastodon: TEdit;
    44     EditWindowsLive: TEdit;
    45     EditSnapchat: TEdit;
    46     EditYahoo: TEdit;
    47     EditGoogleTalk: TEdit;
    48     EditMsn: TEdit;
    49     EditIrc: TEdit;
    50     EditSkype: TEdit;
    5144    EditHomeAddressCity: TEdit;
    5245    EditHomeAddressCountry: TEdit;
     
    5649    EditHomeAddressStreet: TEdit;
    5750    EditHomeAddressStreetExtended: TEdit;
     51    EditHomeEmail: TEdit;
     52    EditHomeFax: TEdit;
     53    EditHomeMobile: TEdit;
     54    EditHomePager: TEdit;
     55    EditHomePhone: TEdit;
     56    EditHomeWeb: TEdit;
     57    EditIcq: TEdit;
     58    EditInstagram: TEdit;
     59    EditIrc: TEdit;
     60    EditJabber: TEdit;
     61    EditLinkedIn: TEdit;
     62    EditMastodon: TEdit;
     63    EditMatrix: TEdit;
     64    EditMobile: TEdit;
     65    EditMsn: TEdit;
     66    EditMySpace: TEdit;
     67    EditNickName: TEdit;
     68    EditOrganization: TEdit;
     69    EditPager: TEdit;
     70    EditPeerTube: TEdit;
     71    EditPhone: TEdit;
     72    EditQq: TEdit;
     73    EditReddit: TEdit;
     74    EditSkype: TEdit;
     75    EditSnapchat: TEdit;
     76    EditTitle: TEdit;
     77    EditTwitter: TEdit;
     78    EditWeb: TEdit;
     79    EditWindowsLive: TEdit;
    5880    EditWorkAddressCity: TEdit;
    5981    EditWorkAddressCountry: TEdit;
     
    6385    EditWorkAddressStreet: TEdit;
    6486    EditWorkAddressStreetExtended: TEdit;
    65     EditAniversary: TEdit;
    66     EditJabber: TEdit;
    67     EditIcq: TEdit;
    6887    EditWorkEmail: TEdit;
    69     EditPager: TEdit;
    70     EditFax: TEdit;
    71     EditWeb: TEdit;
    72     EditHomeFax: TEdit;
    7388    EditWorkFax: TEdit;
    74     EditHomeMobile: TEdit;
    7589    EditWorkMobile: TEdit;
    7690    EditWorkPager: TEdit;
    77     EditHomePhone: TEdit;
    78     EditNickName: TEdit;
    79     EditHomePager: TEdit;
    80     EditHomeEmail: TEdit;
    81     EditHomeWeb: TEdit;
     91    EditWorkPhone: TEdit;
    8292    EditWorkWeb: TEdit;
    83     EditDepartment: TEdit;
    84     EditFullName: TEdit;
    85     EditOrganization: TEdit;
    86     EditTitle: TEdit;
    87     EditTitleBefore: TEdit;
    88     EditMiddleName: TEdit;
    89     EditTitleAfter: TEdit;
    90     EditBirthday: TEdit;
    91     EditLastName: TEdit;
    92     EditEmail: TEdit;
    93     EditPhone: TEdit;
    94     EditFirstName: TEdit;
    95     EditMobile: TEdit;
    96     EditWorkPhone: TEdit;
    97     EditQq: TEdit;
    98     EditPeerTube: TEdit;
     93    EditYahoo: TEdit;
     94    EditYouTube: TEdit;
    9995    GroupBox1: TGroupBox;
    10096    GroupBox2: TGroupBox;
    10197    ImagePhoto: TImage;
    102     Label1: TLabel;
    10398    Label10: TLabel;
    10499    Label11: TLabel;
     
    117112    Label23: TLabel;
    118113    Label24: TLabel;
    119     Label25: TLabel;
    120     Label26: TLabel;
    121     Label27: TLabel;
    122114    Label28: TLabel;
    123115    Label29: TLabel;
     
    144136    Label48: TLabel;
    145137    Label49: TLabel;
    146     Label5: TLabel;
    147138    Label50: TLabel;
    148139    Label51: TLabel;
     
    180171    PopupMenuPhoto: TPopupMenu;
    181172    SavePictureDialog1: TSavePictureDialog;
     173    SpeedButtonAniversary: TSpeedButton;
    182174    SpeedButtonBirthDay: TSpeedButton;
    183     SpeedButtonAniversary: TSpeedButton;
     175    SpeedButtonEmail: TSpeedButton;
    184176    SpeedButtonHomeEmail: TSpeedButton;
    185     SpeedButtonEmail: TSpeedButton;
     177    SpeedButtonHomeWeb: TSpeedButton;
     178    SpeedButtonWeb: TSpeedButton;
    186179    SpeedButtonWorkEmail: TSpeedButton;
    187180    SpeedButtonWorkWeb: TSpeedButton;
    188     SpeedButtonWeb: TSpeedButton;
    189     SpeedButtonHomeWeb: TSpeedButton;
     181    TabSheetAll: TTabSheet;
     182    TabSheetChat: TTabSheet;
     183    TabSheetGeneral: TTabSheet;
     184    TabSheetHome: TTabSheet;
     185    TabSheetOthers: TTabSheet;
    190186    TabSheetSocial: TTabSheet;
    191     TabSheetChat: TTabSheet;
    192     TabSheetOthers: TTabSheet;
    193     TabSheetHome: TTabSheet;
    194187    TabSheetWork: TTabSheet;
    195     TabSheetGeneral: TTabSheet;
    196     TabSheetAll: TTabSheet;
    197188    procedure APhotoClearExecute(Sender: TObject);
    198189    procedure APhotoLoadExecute(Sender: TObject);
     
    201192    procedure APhotoShowExecute(Sender: TObject);
    202193    procedure ButtonHomeAddressShowClick(Sender: TObject);
     194    procedure ButtonNameDetailsClick(Sender: TObject);
    203195    procedure ButtonNextClick(Sender: TObject);
    204196    procedure ButtonPreviousClick(Sender: TObject);
    205197    procedure ButtonWorkAddressShowClick(Sender: TObject);
    206198    procedure EditFullNameChange(Sender: TObject);
    207     procedure NamePartChange(Sender: TObject);
    208199    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    209200    procedure FormCreate(Sender: TObject);
     
    258249
    259250uses
    260   UCore, UCommon, UFormImage;
     251  UCore, UCommon, UFormImage, UFormNameDetails;
    261252
    262253resourcestring
     
    280271    else
    281272      Result := Result + Text[I];
     273  end;
     274end;
     275
     276procedure UpdateEditNoOnChange(Edit: TEdit; Text: string);
     277var
     278  LastHandler: TNotifyEvent;
     279begin
     280  LastHandler := Edit.OnChange;
     281  Edit.OnChange := nil;
     282  try
     283    Edit.Text := Text;
     284  finally
     285    Edit.OnChange := LastHandler;
    282286  end;
    283287end;
     
    441445begin
    442446  Contact.Fields[cfFullName] := EditFullName.Text;
    443   Contact.Fields[cfMiddleName] := EditMiddleName.Text;
    444   Contact.Fields[cfFirstName] := EditFirstName.Text;
    445   Contact.Fields[cfLastName] := EditLastName.Text;
    446   Contact.Fields[cfTitleAfter] := EditTitleAfter.Text;
    447   Contact.Fields[cfTitleBefore] := EditTitleBefore.Text;
    448447  Contact.Fields[cfNickName] := EditNickName.Text;
    449448  Contact.Fields[cfEmail] := EditEmail.Text;
     
    467466begin
    468467  EditFullName.Text := Contact.Fields[cfFullName];
    469   EditFirstName.Text := Contact.Fields[cfFirstName];
    470   EditLastName.Text := Contact.Fields[cfLastName];
    471   EditMiddleName.Text := Contact.Fields[cfMiddleName];
    472   EditTitleAfter.Text := Contact.Fields[cfTitleAfter];
    473   EditTitleBefore.Text := Contact.Fields[cfTitleBefore];
    474468  EditNickName.Text := Contact.Fields[cfNickName];
    475469  EditEmail.Text := Contact.Fields[cfEmail];
     
    701695end;
    702696
     697procedure TFormContact.ButtonNameDetailsClick(Sender: TObject);
     698begin
     699  with TFormNameDetails.Create(nil) do
     700  try
     701    EditFirstName.Text := Contact.Fields[cfFirstName];
     702    EditLastName.Text := Contact.Fields[cfLastName];
     703    EditMiddleName.Text := Contact.Fields[cfMiddleName];
     704    EditTitleAfter.Text := Contact.Fields[cfTitleAfter];
     705    EditTitleBefore.Text := Contact.Fields[cfTitleBefore];
     706    if ShowModal = mrOk then begin
     707      Contact.Fields[cfMiddleName] := EditMiddleName.Text;
     708      Contact.Fields[cfFirstName] := EditFirstName.Text;
     709      Contact.Fields[cfLastName] := EditLastName.Text;
     710      Contact.Fields[cfTitleAfter] := EditTitleAfter.Text;
     711      Contact.Fields[cfTitleBefore] := EditTitleBefore.Text;
     712      with TNameDetails.Create do
     713      try
     714        Prefix := EditTitleBefore.Text;
     715        First := EditFirstName.Text;
     716        Middle := EditMiddleName.Text;
     717        Last := EditLastName.Text;
     718        Suffix := EditTitleAfter.Text;
     719        UpdateEditNoOnChange(EditFullName, GetCombined);
     720      finally
     721        Free;
     722      end;
     723    end;
     724  finally
     725    Free;
     726  end;
     727end;
     728
    703729procedure TFormContact.ButtonPreviousClick(Sender: TObject);
    704730begin
     
    721747end;
    722748
    723 procedure UpdateEditNoOnChange(Edit: TEdit; Text: string);
    724 var
    725   LastHandler: TNotifyEvent;
    726 begin
    727   LastHandler := Edit.OnChange;
    728   Edit.OnChange := nil;
    729   try
    730     Edit.Text := Text;
    731   finally
    732     Edit.OnChange := LastHandler;
    733   end;
    734 end;
    735 
    736749procedure TFormContact.EditFullNameChange(Sender: TObject);
    737750begin
    738751  with TNameDetails.Create do
    739752  try
    740     Prefix := EditTitleBefore.Text;
    741     First := EditFirstName.Text;
    742     Middle := EditMiddleName.Text;
    743     Last := EditLastName.Text;
    744     Suffix := EditTitleAfter.Text;
     753    Prefix := Contact.Fields[cfTitleBefore];
     754    First := Contact.Fields[cfFirstName];
     755    Middle := Contact.Fields[cfMiddleName];
     756    Last := Contact.Fields[cfLastName];
     757    Suffix := Contact.Fields[cfTitleAfter];
    745758    Split(EditFullName.Text);
    746     UpdateEditNoOnChange(EditTitleBefore, Prefix);
    747     UpdateEditNoOnChange(EditFirstName, First);
    748     UpdateEditNoOnChange(EditMiddleName, Middle);
    749     UpdateEditNoOnChange(EditLastName, Last);
    750     UpdateEditNoOnChange(EditTitleAfter, Suffix);
     759    Contact.Fields[cfTitleBefore] := Prefix;
     760    Contact.Fields[cfFirstName] := First;
     761    Contact.Fields[cfMiddleName] := Middle;
     762    Contact.Fields[cfLastName] := Last;
     763    Contact.Fields[cfTitleAfter] := Suffix;
    751764    UpdateInterface;
    752   finally
    753     Free;
    754   end;
    755 end;
    756 
    757 procedure TFormContact.NamePartChange(Sender: TObject);
    758 begin
    759   with TNameDetails.Create do
    760   try
    761     Prefix := EditTitleBefore.Text;
    762     First := EditFirstName.Text;
    763     Middle := EditMiddleName.Text;
    764     Last := EditLastName.Text;
    765     Suffix := EditTitleAfter.Text;
    766     UpdateEditNoOnChange(EditFullName, GetCombined);
    767765  finally
    768766    Free;
  • trunk/Languages/vCardStudio.cs.po

    r109 r110  
    133133msgstr "Ukázat na mapě"
    134134
     135#: tformcontact.buttonnamedetails.caption
     136msgid "Details"
     137msgstr "Podrobnosti"
     138
    135139#: tformcontact.buttonnext.caption
    136140msgid "Next"
     
    180184msgstr "Adresa"
    181185
    182 #: tformcontact.label1.caption
    183 msgid "First name:"
    184 msgstr "První jméno:"
    185 
    186186#: tformcontact.label10.caption
    187187msgctxt "tformcontact.label10.caption"
     
    225225
    226226#: tformcontact.label18.caption
     227msgctxt "tformcontact.label18.caption"
    227228msgid "Title:"
    228229msgstr "Titul:"
     
    258259msgstr "Celé jméno:"
    259260
    260 #: tformcontact.label25.caption
    261 msgid "Middle name:"
    262 msgstr "Prostřední jméno:"
    263 
    264 #: tformcontact.label26.caption
    265 msgid "Title before:"
    266 msgstr "Titul před:"
    267 
    268 #: tformcontact.label27.caption
    269 msgid "Title after:"
    270 msgstr "Titul za:"
    271 
    272261#: tformcontact.label28.caption
    273262msgctxt "tformcontact.label28.caption"
     
    385374msgstr "Pohlaví:"
    386375
    387 #: tformcontact.label5.caption
    388 msgid "Last name"
    389 msgstr "Poslední jméno"
    390 
    391376#: tformcontact.label50.caption
    392377msgid "Myspace:"
     
    800785msgid "View"
    801786msgstr "Zobrazení"
     787
     788#: tformnamedetails.buttoncancel.caption
     789msgctxt "tformnamedetails.buttoncancel.caption"
     790msgid "Cancel"
     791msgstr "Zrušit"
     792
     793#: tformnamedetails.buttonok.caption
     794msgctxt "tformnamedetails.buttonok.caption"
     795msgid "OK"
     796msgstr "OK"
     797
     798#: tformnamedetails.caption
     799msgid "Name details"
     800msgstr "Jméno podrobně"
     801
     802#: tformnamedetails.label1.caption
     803msgid "First:"
     804msgstr "První:"
     805
     806#: tformnamedetails.label25.caption
     807msgid "Middle:"
     808msgstr "Prostřední:"
     809
     810#: tformnamedetails.label26.caption
     811msgctxt "tformnamedetails.label26.caption"
     812msgid "Title:"
     813msgstr "Titul:"
     814
     815#: tformnamedetails.label27.caption
     816msgid "Suffix:"
     817msgstr "Přípona:"
     818
     819#: tformnamedetails.label5.caption
     820msgid "Last:"
     821msgstr "Poslední:"
    802822
    803823#: tformproperties.aadd.caption
  • trunk/Languages/vCardStudio.pot

    r108 r110  
    123123msgstr ""
    124124
     125#: tformcontact.buttonnamedetails.caption
     126msgid "Details"
     127msgstr ""
     128
    125129#: tformcontact.buttonnext.caption
    126130msgid "Next"
     
    170174msgstr ""
    171175
    172 #: tformcontact.label1.caption
    173 msgid "First name:"
    174 msgstr ""
    175 
    176176#: tformcontact.label10.caption
    177177msgctxt "tformcontact.label10.caption"
     
    215215
    216216#: tformcontact.label18.caption
     217msgctxt "tformcontact.label18.caption"
    217218msgid "Title:"
    218219msgstr ""
     
    248249msgstr ""
    249250
    250 #: tformcontact.label25.caption
    251 msgid "Middle name:"
    252 msgstr ""
    253 
    254 #: tformcontact.label26.caption
    255 msgid "Title before:"
    256 msgstr ""
    257 
    258 #: tformcontact.label27.caption
    259 msgid "Title after:"
    260 msgstr ""
    261 
    262251#: tformcontact.label28.caption
    263252msgctxt "tformcontact.label28.caption"
     
    375364msgstr ""
    376365
    377 #: tformcontact.label5.caption
    378 msgid "Last name"
    379 msgstr ""
    380 
    381366#: tformcontact.label50.caption
    382367msgid "Myspace:"
     
    780765msgstr ""
    781766
     767#: tformnamedetails.buttoncancel.caption
     768msgctxt "tformnamedetails.buttoncancel.caption"
     769msgid "Cancel"
     770msgstr ""
     771
     772#: tformnamedetails.buttonok.caption
     773msgctxt "tformnamedetails.buttonok.caption"
     774msgid "OK"
     775msgstr ""
     776
     777#: tformnamedetails.caption
     778msgid "Name details"
     779msgstr ""
     780
     781#: tformnamedetails.label1.caption
     782msgid "First:"
     783msgstr ""
     784
     785#: tformnamedetails.label25.caption
     786msgid "Middle:"
     787msgstr ""
     788
     789#: tformnamedetails.label26.caption
     790msgctxt "tformnamedetails.label26.caption"
     791msgid "Title:"
     792msgstr ""
     793
     794#: tformnamedetails.label27.caption
     795msgid "Suffix:"
     796msgstr ""
     797
     798#: tformnamedetails.label5.caption
     799msgid "Last:"
     800msgstr ""
     801
    782802#: tformproperties.aadd.caption
    783803msgctxt "tformproperties.aadd.caption"
  • trunk/UCore.lfm

    r100 r110  
    282282    AppName = 'vCard Studio'
    283283    Description = 'vCard files management tool'
    284     ReleaseDate = 44595
     284    ReleaseDate = 44606
    285285    RegistryKey = '\Software\Chronosoft\vCard Studio'
    286286    RegistryRoot = rrKeyCurrentUser
  • trunk/vCardStudio.lpi

    r103 r110  
    104104      </Item2>
    105105    </RequiredPackages>
    106     <Units Count="20">
     106    <Units Count="21">
    107107      <Unit0>
    108108        <Filename Value="vCardStudio.lpr"/>
     
    227227        <IsPartOfProject Value="True"/>
    228228      </Unit19>
     229      <Unit20>
     230        <Filename Value="Forms\UFormNameDetails.pas"/>
     231        <IsPartOfProject Value="True"/>
     232        <ComponentName Value="FormNameDetails"/>
     233        <ResourceBaseClass Value="Form"/>
     234      </Unit20>
    229235    </Units>
    230236  </ProjectOptions>
  • trunk/vCardStudio.lpr

    r103 r110  
    88  {$ENDIF}
    99  Interfaces, // this includes the LCL widgetset
    10   Forms, UFormMain, UCore, Common, SysUtils, UFormImage, UContactImage;
     10  Forms, UFormMain, UCore, Common, SysUtils, UFormImage, UContactImage,
     11UFormNameDetails;
    1112
    1213{$R *.res}
Note: See TracChangeset for help on using the changeset viewer.