Ignore:
Timestamp:
Jun 7, 2023, 12:17:48 AM (18 months ago)
Author:
chronos
Message:
  • Modified: Improved new contact neme generation.
  • Fixed: Width of not all contacts columns was remembered.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.