Changeset 157 for trunk/Forms


Ignore:
Timestamp:
Jun 7, 2023, 12:17:48 AM (19 months ago)
Author:
chronos
Message:
  • Modified: Improved new contact neme generation.
  • Fixed: Width of not all contacts columns was remembered.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormContacts.pas

    r149 r157  
    383383procedure TFormContacts.FormShow(Sender: TObject);
    384384begin
     385  LoadFromRegistry(Context);
     386  UpdateColumns;
    385387  Core.Core.Translator.TranslateComponentRecursive(Self);
    386388  Core.Core.ThemeManager1.UseTheme(Self);
    387389  Core.Core.PersistentForm1.Load(Self);
    388   LoadFromRegistry(Context);
    389390  ReloadList;
    390391  UpdateInterface;
  • trunk/Forms/FormGenerate.lfm

    r155 r157  
    1414  object Label1: TLabel
    1515    Left = 19
    16     Height = 25
     16    Height = 26
    1717    Top = 19
    18     Width = 52
     18    Width = 55
    1919    Caption = 'Count:'
    2020    ParentColor = False
     
    2323  object SpinEditCount: TSpinEdit
    2424    Left = 155
    25     Height = 33
     25    Height = 43
    2626    Top = 18
    2727    Width = 152
  • trunk/Forms/FormGenerate.pas

    r149 r157  
    3232  Core;
    3333
     34const
     35  Names: array[0..100] of string = ('Peter', 'Susan', 'Luis', 'Jane', 'Bill', 'Jeniffer',
     36    'Leo', 'Veronica', 'Stephan', 'Adele', 'Elvis', 'Caroline', 'John', 'Elisabeth',
     37    'Joseph', 'Michaele', 'Bruce', 'Eva', 'Samuel', 'Olivie', 'Fred', 'Maria',
     38    'Jose', 'David', 'Michael', 'Anna', 'Mary', 'Juan', 'Robert', 'Daniel', 'James',
     39    'Richard', 'Paul', 'Olga', 'William', 'Sergey', 'Anita', 'Victor', 'Sarah',
     40    'Mark', 'Rita', 'Martin', 'Patrick', 'Andrea', 'Vladimir', 'Barbara', 'Angela',
     41    'Ivan', 'Jesus', 'Marian', 'Eric', 'Diana', 'Claudia', 'Gloria', 'Teresa',
     42    'Francis', 'Andrew', 'Eduardo', 'Steven', 'Karen', 'Brian', 'Monica', 'Sonia',
     43    'Alberto', 'Alex', 'Julio', 'Juana', 'Adam', 'Kevin', 'Edward', 'Roland',
     44    'Cheng', 'Roman', 'Silvia', 'Marta', 'Lisa', 'Alice', 'Felix', 'Jan', 'Lucia',
     45    'Janet', 'Sharon', 'Paula', 'Helen', 'Anton', 'Henry', 'Antonia', 'Adriana',
     46    'Brenda', 'Nicole', 'Tatina', 'Gary', 'Dennis', 'Isaac', 'Luiz', 'Erika',
     47    'Amanda', 'Donald', 'Edgar', 'Ruben', 'Jason');
     48
     49  LastNames: array[0..80] of string = ('Gates', 'Simmons', 'Eliott', 'Onion',
     50    'Presleys', 'Clinton', 'Dell', 'Ford', 'Miles', 'Young', 'Newton', 'Smith',
     51    'Williams', 'Johnson', 'Brown', 'Jones', 'Garcia', 'Miller', 'Davis',
     52    'Lopez', 'Wilson', 'Taylor', 'Moore', 'Jackson', 'Lee', 'White', 'Lewis',
     53    'Robinson', 'Walker', 'King', 'Wright', 'Scott', 'Torres', 'Green',
     54    'Adams', 'Nelson', 'Baker', 'Hall', 'Rivera', 'Carter', 'Evans', 'Diaz',
     55    'Collins', 'Edwards', 'Stewart', 'Murphy', 'Cook', 'Ortiz', 'Morgan', 'Cooper',
     56    'Peterson', 'Reed', 'Kim', 'Watson', 'Brooks', 'Wood', 'James', 'Gray',
     57    'Hughes', 'Long', 'Powell', 'Jenkins', 'Perry', 'Bell', 'Butler', 'Romero',
     58    'Jordan', 'Hamilton', 'Moreno', 'West', 'Cole', 'Hayes', 'Gibson', 'Medina',
     59    'Owens', 'Harrison', 'Woods', 'Wells', 'Chen', 'Webb', 'Tucker');
     60
    3461{ TFormGenerate }
    3562
     
    4370    with Contact do begin
    4471      Fields[cfVersion] := Core.Core.DefaultVcardVersion;
    45       Fields[cfFirstName] := 'First ' + IntToStr(Random(10000));
    46       Fields[cfLastName] := 'Last ' + IntToStr(Random(10000));
    47       Fields[cfFullName] := 'FullName ' + IntToStr(Random(100));
     72      Fields[cfFirstName] := Names[Random(Length(Names))];
     73      Fields[cfLastName] := LastNames[Random(Length(LastNames))];
     74      Fields[cfFullName] := Fields[cfFirstName] + ' ' +Fields[cfLastName];
    4875      Fields[cfTelCell] := IntToStr(Random(1000000000));
    4976      Fields[cfTelHome] := IntToStr(Random(1000000000));
    5077      Fields[cfTelWork] := IntToStr(Random(1000000000));
    5178      Fields[cfNote] := 'Some contact notes';
    52       Fields[cfEmail] := 'user@email.com';
    53       Fields[cfEmailHome] := 'home@email.com';
    54       Fields[cfEmailWork] := 'home@email.com';
     79      Fields[cfEmail] := LowerCase(Fields[cfFirstName] + '.' + Fields[cfLastName]) + '@email.com';
     80      Fields[cfEmailHome] := Fields[cfEmail];
     81      Fields[cfEmailWork] := Fields[cfEmail];
    5582      Fields[cfUrl] := 'https://url.com';
    5683      Fields[cfUrlWork] := 'https://work.com';
Note: See TracChangeset for help on using the changeset viewer.