Changeset 109 for trunk/Forms


Ignore:
Timestamp:
Feb 14, 2022, 5:43:30 PM (3 years ago)
Author:
chronos
Message:
  • Added: Synced edit of full name and name parts.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormContact.lfm

    r108 r109  
    1818    Top = 8
    1919    Width = 1009
    20     ActivePage = TabSheetGeneral
     20    ActivePage = TabSheetHome
    2121    Anchors = [akTop, akLeft, akRight, akBottom]
    2222    ParentFont = False
    23     TabIndex = 0
     23    TabIndex = 1
    2424    TabOrder = 0
    2525    object TabSheetGeneral: TTabSheet
     
    462462        Anchors = [akTop, akLeft, akRight]
    463463        Caption = 'Address'
    464         ClientHeight = 285
     464        ClientHeight = 259
    465465        ClientWidth = 895
    466466        TabOrder = 6
  • trunk/Forms/UFormContact.pas

    r108 r109  
    735735
    736736procedure TFormContact.EditFullNameChange(Sender: TObject);
    737 var
    738 
    739   Before, First, Middle, Last, After: string;
    740 begin
    741   Contact.FullNameToNameParts(EditFullName.Text, Before, First, Middle, Last, After);
    742   UpdateEditNoOnChange(EditTitleBefore, Before);
    743   UpdateEditNoOnChange(EditFirstName, First);
    744   UpdateEditNoOnChange(EditMiddleName, Middle);
    745   UpdateEditNoOnChange(EditLastName, Last);
    746   UpdateEditNoOnChange(EditTitleAfter, After);
    747   UpdateInterface;
     737begin
     738  with TNameDetails.Create do
     739  try
     740    Prefix := EditTitleBefore.Text;
     741    First := EditFirstName.Text;
     742    Middle := EditMiddleName.Text;
     743    Last := EditLastName.Text;
     744    Suffix := EditTitleAfter.Text;
     745    Split(EditFullName.Text);
     746    UpdateEditNoOnChange(EditTitleBefore, Prefix);
     747    UpdateEditNoOnChange(EditFirstName, First);
     748    UpdateEditNoOnChange(EditMiddleName, Middle);
     749    UpdateEditNoOnChange(EditLastName, Last);
     750    UpdateEditNoOnChange(EditTitleAfter, Suffix);
     751    UpdateInterface;
     752  finally
     753    Free;
     754  end;
    748755end;
    749756
    750757procedure TFormContact.NamePartChange(Sender: TObject);
    751758begin
    752   UpdateEditNoOnChange(EditFullName, Contact.NamePartsToFullName(EditTitleBefore.Text,
    753     EditFirstName.Text, EditMiddleName.Text, EditLastName.Text, EditTitleAfter.Text));
     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);
     767  finally
     768    Free;
     769  end;
    754770end;
    755771
  • trunk/Forms/UFormProperty.pas

    r103 r109  
    124124    Groups.StrictDelimiter := True;
    125125    Groups.DelimitedText := EditAttributes.Text;
     126    GroupsArray := Default(TStringArray);
    126127    SetLength(GroupsArray, Groups.Count);
    127128    for I := 0 to Groups.Count - 1 do
Note: See TracChangeset for help on using the changeset viewer.