Changeset 120 for trunk


Ignore:
Timestamp:
Feb 19, 2022, 12:09:21 AM (3 years ago)
Author:
chronos
Message:
  • Added: Partially implemented contacts compare.
Location:
trunk
Files:
6 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r115 r120  
    8383      Height = 34
    8484      Top = 5
    85       Width = 109
     85      Width = 145
    8686      Align = alNone
    8787      AutoSize = True
     
    9797      Transparent = True
    9898      object ToolButton5: TToolButton
    99         Left = 73
     99        Left = 109
    100100        Top = 0
    101101        Action = Core.ASettings
     
    110110        Top = 0
    111111        Action = Core.AFind
     112      end
     113      object ToolButton8: TToolButton
     114        Left = 73
     115        Top = 0
     116        Action = Core.AFileCompare
    112117      end
    113118    end
     
    146151        Action = Core.AFileSplit
    147152      end
     153      object MenuItem12: TMenuItem
     154        Action = Core.AFileCompare
     155      end
    148156      object MenuItem2: TMenuItem
    149157        Caption = '-'
  • trunk/Forms/UFormMain.pas

    r115 r120  
    1919    MenuItem10: TMenuItem;
    2020    MenuItem11: TMenuItem;
     21    MenuItem12: TMenuItem;
    2122    MenuItem3: TMenuItem;
    2223    MenuItem4: TMenuItem;
     
    5253    ToolButton6: TToolButton;
    5354    ToolButton7: TToolButton;
     55    ToolButton8: TToolButton;
    5456    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    5557    procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
  • trunk/Languages/vCardStudio.cs.po

    r116 r120  
    2828msgstr "Sloučit..."
    2929
     30#: tcore.afilecompare.caption
     31msgid "Compare..."
     32msgstr "Porovnat..."
     33
    3034#: tcore.afilenew.caption
    3135msgid "New"
     
    103107msgid "Select directory"
    104108msgstr "Vybrat adresář"
     109
     110#: tformcompare.caption
     111msgid "Compare"
     112msgstr "Porovnání"
    105113
    106114#: tformcontact.aphotoclear.caption
  • trunk/Languages/vCardStudio.pot

    r116 r120  
    1616#: tcore.afilecombine.caption
    1717msgid "Combine..."
     18msgstr ""
     19
     20#: tcore.afilecompare.caption
     21msgid "Compare..."
    1822msgstr ""
    1923
     
    9498msgstr ""
    9599
     100#: tformcompare.caption
     101msgid "Compare"
     102msgstr ""
     103
    96104#: tformcontact.aphotoclear.caption
    97105msgctxt "tformcontact.aphotoclear.caption"
  • trunk/UContact.pas

    r119 r120  
    229229    procedure SaveToFile(FileName: string); override;
    230230    procedure LoadFromFile(FileName: string); override;
     231    procedure Sort;
     232    procedure Assign(Source: TContactsFile);
    231233    constructor Create; override;
    232234    destructor Destroy; override;
     
    18701872end;
    18711873
     1874function CompareContactFullName(const Item1, Item2: TContact): Integer;
     1875begin
     1876  Result := CompareStr(Item1.Fields[cfFullName], Item2.Fields[cfFullName]);
     1877end;
     1878
     1879function ComparePropertyName(const Item1, Item2: TContactProperty): Integer;
     1880begin
     1881  Result := CompareStr(Item1.Name + ';' + Item1.Attributes.Text,
     1882    Item2.Name + ';' + Item2.Attributes.Text);
     1883end;
     1884
     1885procedure TContactsFile.Sort;
     1886var
     1887  I: Integer;
     1888begin
     1889  Contacts.Sort(CompareContactFullName);
     1890  for I := 0 to Contacts.Count - 1 do
     1891    Contacts[I].Properties.Sort(ComparePropertyName);
     1892end;
     1893
     1894procedure TContactsFile.Assign(Source: TContactsFile);
     1895begin
     1896  inherited Assign(Source);
     1897  Contacts.Assign(Source.Contacts);
     1898end;
     1899
    18721900constructor TContactsFile.Create;
    18731901begin
  • trunk/UCore.lfm

    r115 r120  
    1212    Top = 208
    1313    Bitmap = {
    14       4C7A120000001000000010000000801200000000000078DADD9A095855D5DAC7
    15       0F9969DDAFC16B659A9939809246696A9A58396BC8E58AA29228A0A0A8209302
    16       A2A28242379C70489C1071C032074C734045C5D4524B031C0225152115E1C87C
    17       18FEDF7AD7DEFBB039EC733807EAABFB2D9EFFB3F75EEBFDADF75DEF5E7B589B
    18       A352FD79256D8D2B245D899A584BE1637AA02EBEA8A848AF8CE1351A0D909B59
    19       5BACD4C53F4E39C9ED32534FE2DE8D33B898305F9137669C2879023CBA252AA3
    20       165FD73825FFA989E1C8485E518BAF6B9C28CE0372AE554BC6A7AC72E6C7096B
    21       26E2588C87E2380DF9FF79C5047E5C3DBEDAE334E4FFE2D2F1B5FCEBFA512A12
    22       7F6AB1835021EF5FC7CF4F897BF8565772DE907F43F3C418FF46F17A4A5DBCD2
    23       B894C6F9772EAFBD960452525212EA63DBB6ED79C8A5AF1F43EDE6E6972197AE
    24       8DBE7ADDD2B9F31548926CE5FBC6942E5D52A02B53782A5656D720C954B65BB7
    25       9BD095B17DF4E891014912A37BACAF7CF0412624E9DAEAAB974A9F3E7720C990
    26       4D437863FA3035D7F529FF577E8C2CA84346F14AC5683E2C4CB10F253EAC769D
    27       C02BF4A1CB136B90D7E943CE4BAC5CC6F24AAC297C43FD1B3D7E9D736972FEEB
    28       F0AF77EEE9F0F5988FBA7CFDAE8386F12A13AE99BAFAF84BCAD9B081381DDA1F
    29       D7377A226DED54A4AC9EC4B709417DB13FF0431866FB237D6B000A6E9E434589
    30       1AA8AAE2AA28CC853A2D09E7563961C7CCEE8A7D24870D40D691686E5B7EF514
    31       34F1E1A80C1F83CAB05128DDBE0825978F43A3CEC6D59D731037CD1235D941DC
    32       2FB19A933B80390380639BD93B6B01F75F959B054DB4370A0E6D4469FE7D1CFB
    33       C201EB269B6BFB480EFD04F937CF4073250908FA1858E725C47E2101952B2743
    34       F3FD5E5415A95114608DDCB309B8F7E301AC707A4BCB5F09B5E1E3D5B038E1D7
    35       0708B305F6FC075533BAA2648A05D45153797FBF878EC2B5C5CE28553FC2C2D1
    36       6F6AF94B644F795A680378BF074CEF824A8F4E28756B8FC228375432DF852967
    37       F1BDDD6B383ACE829956227478EB6A7EE110CE97CE198CB2A99D51ECD6116AE7
    38       B6502FB1E7F5F927E371D6B1030ED9BC82EFC674E07CC8D056D57CC8209EBB47
    39       5FFA22C7F92D643ABE815FC7B644EE579F73FEBCED3F71C4A6190ED834C7B960
    40       7B14E73F62296EA9E5BF0DEA83BCB4533C37198EAD90EAD00257ED9BE3FABC11
    41       B8BB63098E113BFC9F3834FC25DC3AB203E9170EC3A1EFF35AFE50C0FB488B9E
    42       8EB2FC6C646C8BC039BBE648B26D86F41D11DCFFC161CD389BBA79110A1E6563
    43       BDDF480C7BFFF91A7320C1FB6DFCFAF50294E665E3CEB11DB838DF01A7C6B647
    44       D29876B810E2805B4777E2C9C36C1C58351B43DF6BAA3807633DBA2029622C32
    45       2F7C8B12768EAA2A2BB88AD87829E6CD816330440F2B9595933B6331CB7584DD
    46       2B5834FC0DCC1FD21241035B606CDF176AC5FC4796D28B7178BCF663BD2ABD1C
    47       6F78ADCC6C907E1E2C494085A6FA01AA2941D9DEA9283D178DDCE4CD30C83FBC
    48       0DDCFA912DB82F0377AE00777F01B252395FF138139AABDFE8ED83F3456C8DF9
    49       DB4F5A0EF7AFB335D84DCE57B1F56745DE1D94FDB885CDB31828F22C568165EB
    50       B6EC9BC0EF193CA6870973791F92F2E3C622373717B57876AE919526B00F68FD
    51       FB1BF0F81ED437CEE1C98DF382EEA4227FF774DCB871A3364F25FB0663334436
    52       0B50E7B09C3E009BB882988F82EF82F5F339E92CE64CEE176AC6B1EB12C56AE1
    53       FB43490137293C11519BFFF21381A7B839FBBB904F62CA8A85DC9058293ABDBC
    54       36BF8EDD33D97D01B9778498C92FF924B6A24CC84D65B9C8AF548E9FE64DDE7D
    55       610E91EFD242A0BC54CBA1B252E093962AF3141FC55DF858F45DC4F83281A7D8
    56       2806763F283C16AACC539E28C7F271135F512EF4C1C750898203FECA3C9D278A
    57       99C6C17D556A9F61C2BE10837AD7A45A7CF1F975DA6B2D3FE6DF50C73BE3C99E
    58       192848F047C1B7B3D9D68F1D4F877AE744DC4F5C558BA7F2F0E1435E6F8CC8F6
    59       2F5A1F34F45D067FC03B8E6E2C26AF556AC421BDAB56BFAF9AF4DE29B106B786
    60       DE5BEB62EBE0F5D81A2F5D56FE2EAE4FB2FC3580D58EBF9EACF2FAC178566562
    61       AEFE76252E7828485BE70CC1D6A0C1880D1C842D0103B165F600C4CCEA8FCDFE
    62       9F60B3DFC7D8E4FB1136FAF4C3466F6B6C98D917EBBD3EC47ACF3E9C3DB13504
    63       2762E7E378EC3C1CDF3217C763E622312698BD42CFC1B14DA4201CDD1888231B
    64       98D607E0F0FAD9381C3D0BD1337A73BF52A9A2776DA64A768FAD64F7C90A76DF
    65       AD282F4779B906E59A32684865A5282B63EF14A5255837BD176259CCFC1B6978
    66       389C9C9CB065CB16768B35C032AE9454528C2FA7F564E31DC87D4E9C3811AB57
    67       AF86BDBD3D678383831114148459B366C1D7D7175E5E5E9836CD03EEEEEE7075
    68       7545494911D67AF4E079AA62F146464662E4C891D8B66D9BE093A93A5EC96F31
    69       F74B6C497121D64E799FE75818AB10B310AF01B658608B8B0AB1C6BD3B3F3FC4
    70       1E3C7810616C8E9E387EBC569E04B648C61670AD767B0F9BD8B9A53C2D5CB810
    71       C9C9C958BE7C39678383E788E3F787AF8F0F3C3D3DE1E141E37763E3774151E1
    72       13AC9AFC2E9B17FD78CC31319B111212823D7BBEA991E312D16FB1E8B7A8B080
    73       B385056A44B95AF1F924C45B261BAB0E5B549B2D2CC84794CB3B7C2E52BC274E
    74       1C4754541412138FD5C87135FBA49A7D928F02A695CE5DF93C26BF73E7CEE5E3
    75       A779443EE7CC9983C0C040F8FBFBC3C7C79B8D7F061BFF54B8B9B9C1C5C5054F
    76       D4795831F16D44B36B80625EB366356737AC5F5F23C7D5F1AAB9CF8227799C7D
    77       A27E8CE5132CD935F0018FB754374F86D8FCC750E7E7629953677E0DD03CA6B9
    78       48F389E6C46AB76EFCDCD2F9A11C539E68AC2B9CBBF098973B5962D9F8CE58FA
    79       5927FC09CFF7FADC0FF57EBF53FA9EA7F03C34896FA87FC567D0FF07DE986F67
    80       FA9EC1C63C3F0D3DC38DFF76572FBEA1E3FF93795503AF9F3FBCC4AE89C0C615
    81       A15CB46F0C23D9D37EF4D205DA31D3BE6EBB6E895E1E8A8B674FB025D863AC08
    82       0DE0CACDCEE4928EA98D6C766D595BA38F294E76B8F4FD49DE5E5A52C845A582
    83       3D972BC435A3544F3664EBE16CAFED83F6A9FED8EE4DB87DFD173CCECBC3C3EC
    84       3BB87BE30A17ED531DB5910DD9CA79A98FDBB76F715D493E8A652CDE81BDDFE1
    85       A27DAA93DAE5ECB2D0407C3ECF17614133703DF5175C387D04BB36AEC0B87F0D
    86       D2BE163B3B8CE075D44636644B0CB1E1C1DEDA3C9F4C3C8CB44B67E131C15ECB
    87       4AA23A6A231BEDFF9519FBF97C7FE4645EE3DAB73B1E397733F4F2D4C66D447B
    88       62077F68857EDD3BC1C5C1067BE3B7E154E221BE95F741FBF236B2258658290F
    89       54F71BCBF5EEB80DB8F75BBAB60F89A53A6A231BB295E7FEA3F73BF17A3A4FB4
    90       DDB3730BEE64DCC477FBBFE6A27DAA93DB1023E70FEDDBC5EBCF9FF856BBCDCD
    91       CAE092D7D1966CE5BCD447F83C3FDE3E66447FCC9E3149CBD33ED5511BD9E8B2
    92       F23EA4B6004F7764FD7A958BF675DBEB2A92AD298C54BC7779433599DD5F5C55
    93       F0DEE16DFA7D86B18FD85F6455249BBC2AA4A4A4C0549EB3392C86092A242424
    94       98C6BB8A7C16E3C7D7837716F94CC63B1AE6B5B912F345AC96CF60FB63991C98
    95       4631D933D9B19C6E94E554962BB954B798ED0DA614A69F992E329D674A661A2E
    96       CBA934D607ACFE3ED31D95C0DED4C39E661A5A3D267E7E270879A2B16AE34D13
    97       5916AFCA96C946F04BB29D6D5B2327140B1D4BE263BDCA745960E56D920CCE09
    98       7B91FD41F06BF2F9B313D9EF85784DE66D65F91A6A3AEFBDC15BC8D5D0DAB932
    99       B6C8736AF2F5F31794C8C8632CC608085B7DEDB314DB25D66503BD1F2D61EBCE
    100       9AFF6B9058A1DDAB56BB961DC3348A6C16696D6AB07D987A50FB54A4A7A7A366
    101       FF4B047624932DD9CC15FBD065A7B0F5EFCA5AE754B05D24B09F320D81A25F89
    102       95FBAFD9C75C81EDCFD4CF78B6661FB3EAC52AE6EA5DA6B7A90F1785BCD7C1B2
    103       5CA9BAB0AD05537B3A1EA7D8873E966226BF9C7D93E975AA1FA5D087AFDE7324
    104       D88E13D8D7985EA1763B85F3EFA53757421FA3B4ACFEF33F456F9E85763B83E7
    105       81EA0C9DA3BADAFF8B4B43D73786D6F9F5E64DF9FD91DCA7B45FC76F760CFAA7
    106       12A650AFEFF7370ADF36F4F2D2D658FFF271E9FBFD90B1FE75FB37C5BFEE7A3A
    107       ACE6FF821AE25FB198E0DF20DF10FF75A9C1179ECE3AEF8F90981FBDC7FF0DBC
    108       C4C8F7EB13437D58B9DFFAF20DF14D5A20FA5E50CF3E246E81D887B1FDE8DACB
    109       B9BAFA50B2FDAB79F9984C19FF9F715D2AEA4FF8AB75AF34D15EFB3F5D7DF75E
    110       5D362C8CFFEF4BFB5D55CE49CF62B13D4CFA4E2EE3C314EA956294FB50F45FC7
    111       F7DA3003FEE563A86BABD7BF7C6BF89951A7FF3003CFE43023FD1B7AA64B7DD4
    112       E55FE999AB3B1653FC2B3C7F8DF6AF148BBEF96BAC7F7DF3CD98677F9811D796
    113       11D79E54CC985A31F9339D62CA60BAC57492C993A90DD3537A5E2388ED493FA3
    114       64FA996915D34C915BC7749969BF68A3543A88ED27987A313591B53565EACF94
    115       28B63FAFC336669A4E9F4C98ACF5F44F71F715C7E3A6D3D6528C7B31D37375BC
    116       2EAD643AC3F48CACAE3DD305FA846DC4EB9613532AD3EB0DE0D3985A3720FEB3
    117       3AF19B92BFDB4C53F59CBF3D469CBF32A6DE7AE64F37A6BD06E64F2E5325D341
    118       262B3D714AF3F7345316530E539238BE814C3F3095D34F8E993AD7E375B939FD
    119       DC9BA982E93CD3FBF5E8E31DA6A34C1AA623F5E0E95C7467DA2E4A55CF3E5E15
    120       55F362B0B168D4366CF0E821F3FB6DF798DAF587B90E6D7F7076ECB8D3EA3373
    121       C716BD5F6D6CA8D3F60B867469BBCAEE9751CB86615DE427D81FDA1BF1BE56D8
    122       E0F4166C5D2DD16C7CBBEB2F8F78BDBB12DB76B6B595F9D24FF362B73BE0DA71
    123       17A41C76C2A56F1C702A7A281216F644C8E4B7D1D2D30AAF39B42DEC36A4452F
    124       39DBC6C6A2F1A0907ED7966D1D85EB5703F128F30B3CC85882CC4BFEB87A603C
    125       CEC50EC3E855367821A8179AF874C533C35EC97CB1E74BDA6B659AABA5D3B028
    126       1B5C3C3315E76EAF82A6E42C8AD5BB70FF5A20AE254E46F2E6E198B16A385E9C
    127       DF074DD978CC46B6C23F06369F2EF1CB9DDA7FB377AB1DECBF0F81E36F71D85F
    128       7C1977F3F7202BD58FF1AE38B36918F68574C7C099EFA1F3F88E6834B60D1A0F
    129       7E3951E2574F6C9FBA7BC3A7B04A9A870FAF44624CD62EB8DC8BC3D29F4390B4
    130       EF331C59FA11BE9A698935C35E4180456374FCB4151A8F6A99A5E5C7BD793D21
    131       D21A567B3DD0EBDCE7B0BEFA25BA5F8A80E5513F2CFC6210760776C33A8737B0
    132       B8F70BF07EEB297C30B0059A4E6B9723F19F0F6F7168875767848659A343DC44
    133       74391284CE077D61B5C111F17EEF62233B7FCB063547D0DB4DE0D346858EC35F
    134       47B3E85E67B5EBD4012FCF881CFA2A62277540CF106BB488B285F96A3BCC73B3
    135       44341B6BD4D097B1F0BDE730BD8D1966B656A1F50C4B7CB4F7932089FF97E5F3
    136       CFFFA7DF4BF7233F6E867E2EE67821A027EC1DDB23BC7F73445ABF88B95D9B6A
    137       599F764F63C017DD1E8D1FD1B2B9ECE6D1C8B279E3F1A1EF3E5B3EB2CF8BB0F8
    138       776B04757D167E16CFC0BB5D23B8BDAE827B4B15E7E7BDFB6CE5076D9ABA3732
    139       5335D2B90776336FF6F47A4F8B26A503FBBE044F66EBC698A94CD35AA9E0F966
    140       2384F4F89FB2EEAD9AC488F7AAC63AD713DD7B6C9F6B6CB6B477FB7F5CF96870
    141       ABFC09235A5738BB58547CEA6AAEB6357FEEEA0B4D9E5ACEFFBB20D8EA3E4B9F
    142       667A59BC3F0C139F073345B98875EF88364F1B780E3F2D3E075E12EF57CDC5FD
    143       E7C436B3BFD387BFD1E347232E3E8E691BB6B2EDD69D5B11BB23966BCBF658C4
    144       6CDF82986D317CBB996D37C76DC626A68D5B3761ECC471709F3905E14B23F86F
    145       F84C296B377C09374F77F804F962FF91042C895C62741FC47E7D603767491753
    146       2E61DFE1FD46F521B1C4C87963FA90B34A3C69EF77FB14FBD065F5F149E74FC1
    147       73B617167F51DD07B13E737C799B21FED485D398EE3703C917CF62CF777B312F
    148       741E42168760F7B7DFF03A6A231B25FEF40F6730CD6F3AB793FB908BDAC8866C
    149       E5FC991F93E1E13B4D5B6F486443B6C410EB39CB0B1E3EC6B135FA600CB17D06
    150       7C08EF201FCC0E093049C4F41D640DB55ADD2035F4FA3333BBCB748F69B74A7C
    151       779B485B3A3633CB12A5D4764F6439BF888919ADB998969606DAD2B15C0A6D8B
    152       04368394101A0A585BA762FFFEFD7C3B7F3E6A48DE46B6C4086C2AE948404025
    153       ACAC4EA159B308BEF5F22AAF21791BD91243AC4AF523E9B4A7A7066969E5888D
    154       7D84F878359293733079729156E3C7E7C1D6F61EDF922D31024BCB813317264D
    155       2AC5E0C1B7606797CD45FB8E8EF98A225B6204B613C957FC05B491A27569275F
    156       81B520CDAAAAA2DF0F6B588EB661DDBA706CDFBE961F57D72DD11E932D31026B
    157       4E0AACA8A0DF0B1769B56CD93CBDC7644B8CC89282359A421415E5E1FAF59FB0
    158       68910F1213F7F163495427ED932D3102DB9114525A9AC7E6738E56FEFE93F41E
    159       932D31024B4B8F0E8B8A8B1F2237F70ED7EDDBBFC0DD7DB4F698F625D131D912
    160       23B0B4FC6ABFA4A8281BE9E997E1E3E3CC633D7468271E3C485714D91243AC99
    161       592BA6764BCBCA1EA0A0E09E51225B6288A5770133B337D747477F0553448CF8
    162       1ED1DDCCECD50833B337B69BA6572388FD5F9659580A
     14      4C7A1300000010000000100000008B1500000000000078DADD9B075854C7DAC7
     15      E11A6F7273BF14AF498CC624468D2D26249AA65193187B9070C560B91241C588
     16      0A5254C0860A2A89288A6068D2416C741069A2808222369A0A8805410561E9FD
     17      FFCDCCD9B31C96DD6517922FB9DFF0FC9F73CECCFB9BF79DF7CC29B3BBA8A9FD
     18      7125D76519785D775ADA457B167C86EEF8BABA3AB952866F6E6E062A8ABB8A94
     19      EEF867D967995D71CE593CBC9582CC886D327965C689866AA0BC48ACC22E7C77
     20      E3E4FDE724EC4161EA812E7C77E3447D255096D721019F7D489F1D47B82C45BC
     21      B791CC712AF27FEDC04FECB8637C5DC7A9C87FE6BE255DFC4BFB915578FEDC2E
     22      5DAE42D8BF949FAB09216C2B2D21AFC8BFA279A28C7FA57839A53B5ED6B8648D
     23      F3AF5CDE7C331954C9C9C9E889ED9021E9104A5E3F8ADA478CC88250D236F2EA
     24      A5CBE8D1D7C18BB715EE2B53C68ECD86B454E169D1D0C8032F55D971E36E435A
     25      CAF6F1D96785E0C533D2C7F2CA975F168397B4ADBC7ABE4C9C781FBC14D9F486
     26      57A60F5573DD93F27FE547C9826EA4142FAB28CDDBD9C9EC43166FD7B58EE365
     27      F421CD5356212FD58790E759A194E565B1AAF0BDF5AFF4F8A5CEA5CAF9EFC6BF
     28      DCB927C5F7603E4AF33DBB0E7AC7ABA970CD74D7C79F52D2ECA6E1BCED54E47B
     29      1A23F7F02A643B2F67DB08EB4908B7FA0A8AD9A928F0B344CDED8B686D1001ED
     30      ED4CADB51510E526E3E2213D04AD1B2FB38F54BBEF5072C68DD9B6DC3887E6E0
     31      3D68DBB3006D76F3D118B8130D5989681695E2C6D14DF05F3D069DD9E9CC2F65
     32      9BCF06019BBE03E2BDC83B6B0DF3DF5E5182663753D4C478A2B1EA11E2F7EAC2
     33      75C508491FA9B6DFA2EA760A9AAF2703D6DF00AE265CEC1911683BB802CD1742
     34      D15E27429DE56454A445E0E1E5481CD07B4FC25FB7D564E36D2671C2622260A7
     35      0584FC8AF6B51FA2E1E7911039AD62FD3DB69D8FBC5DFA68149563C78FEF4AF8
     36      2BD49EE669872660FA09B0662CDA8C46A1D170186A9D0CD1467CD766A7E182F6
     37      9B885B349298B6C176CEE00E7EC74CC6376E9A81A655A3516FF83E44FA4320DA
     38      ADC3EAABCE06236DF170C468BE8ED30B8633DE66D6A00EDE663ACB5DF96FE628
     39      D37F0FC58BDFC69D85035171FC17C6A76BFD0B6734FB2152B33F2E6ED6417D55
     40      3949F140091F653D1195B9E7586E0A170F428EEE00DCD0E98FFCAD73F1206837
     41      E2293BE75F8899F32A8ACE04A1202316BA935E92F031969F22D76D0D9AAA4A51
     42      18608F8BDAFD91ACD50F0541F6CC7FF4EC7E8CCDF1DA899AF252B85BCCC3EC4F
     43      5FEA3407224C3FC09D13DBD158598AFBF141C8DCA68B730B872179C15064D8E8
     44      A228EE28AA9F9622F2D046CCFAE4059973D0D7682C92ED17A238230A0DE41CB5
     45      B7B532D591F1D298BDAC1660A61C962F07578CC62E926B7BEDD7B173CEDBD836
     46      7320ACA70DC0C2492F7789F9F72C8D99FE7876F81BB96ACC0A56BC5626362848
     47      074912D0DADCF1006D6E4053E82A345E744345AA1714F24FEF024597C9823B0B
     48      B87F1D78701328C9617CEBB36234DF3825B70FC6D79135E6BDAB120E8FF2C91A
     49      EC36E3DBC9FAB3B5F23E9A2EFB9079E60D993C899563C9BAADF436F0B890C5F4
     50      34620BEB835795FF42545454A00B4FCE354A7239F6095DFFDE039E3D84E8D645
     51      54DF4AE7743F075527D7E0D6AD5B5D795A4A6F11B650CC9600A23292D3272013
     52      9713F151737AB37CBEAC80C45CCCFC424438725DA25EC47DFED050C34C6A93EC
     53      BBF2BF7DCBF1346EC63EE6F24999A67A2E3754A4D49D77ECCABB927B26B92FA0
     54      E23E1733F54B7D52B6B589CB4D5B8B983F283B7E3A6F2A1F717388FA6EAC055A
     55      1A251CDADA383E799F6C9EC647E3AE7D26F65D47F8268EA7B1D118C8FDA036DE
     56      56364FF344732C1C37E55B5BB83ED818DA5013B95E364FCF138D998E83F96A93
     57      3CC3B87D2E06D1B1E55DF8FA7457C9B556E5FD6F8882F5511DB2163511EB5113
     58      B5916C2DC8F11A888E2EC5A384435D785A9E3E7DCAEA9511B5FD93D607BD7D97
     59      C1EFF08E231D8BCA6B954E71F0EFAA1DEFAB2ABD77F2ACC2ADA2F7D6EED86E78
     60      39B6CA4B9A15BE8BCB93207FBD6025E3EF212B7BFDA03CABA662AEFE72C57FF3
     61      2C50F96D9A093FEB19F0B59A0E1FCB69F0D9F81DBC374C85D7FA6FE165F10D8E
     62      987F0D4FB329F0349D0C8F7593E06EF215DC8D273236C9CF0649BEDB90E8BB15
     63      893E5B90E8BD0509DE9BC92BF426C41FA1B2469CA715CE7810B95B22D67D2362
     64      DD36C06DED04E6972FEDF45D9BA88DDC63DBC87DB295DC775B5B5AD0D2D28C96
     65      E62634533535A2A989BC533436C075CD17F02531B3CF48F7EC819E9E1E7C7C7C
     66      C82D56014BB846AA867AFCB6FA7332DE69CCE7D2A54BE1ECEC0C1D1D1DC66EDE
     67      BC19D6D6D6D8B06103CCCDCD61626282D5AB8DB072E54A2C5BB60C0D0D75386C
     68      F419CB533B89D7C1C101F3E6CD43404000E793A8235EDE6F3DF34BD986FA5A1C
     69      FEF95396636EAC5CCC5CBC0AD87A8EADAFAB85CBCAF1ECFC50363A3A1A76648E
     70      26252676C913C7D609D81A2667C34F70849C5B9AA71D3B76203535158E8E8E8C
     71      DDBC799378FCEB616E66066363631819D1F11B92F11BA0AEB61A87567C4CE6C5
     72      1416B3B7B7176C6C6C101272AA538E1BC47EEBC57EEB6A6B185B5B2382D3320D
     73      369FB8789B04639562EBBAB2B535557032F888CD451A6F5252229C9C9C909010
     74      DF29C71D6C75075B5D851AA283FA1FB2794CFD6ED9B2858D9FCE23EA73D3A64D
     75      B0B2B2C2FAF5EB6166664AC6BF968C7F150C0D0D616060806A51250E2CFD006E
     76      E41AA031BBB83833D6C3DDBD538E3BE215319F35D5958CAD163D83E34F63C835
     77      F0258BB7513A4F8AD8AA6710555560BFDE68760DD0794CE7229D4F744E381B8E
     78      63E7969E1F9A639A273AD603FA6359CC8E7A63B07FC968ECFBCF28FC01CFF79E
     79      DC0FE57E7E27EBF33C19CF4395F8DEFA97F90CFAFFC02BF3D999BC67B032CF4F
     80      45CF70E53FBBEB11DFDBF1FFC1BC5A2FAF9FDFBDF8BAD8C3F3802D13DD5786E1
     81      EDE9BEDBBEED9231D37DE976E9E2E6688BCCB424B2047B8603B6964C15A5C54C
     82      FC316DA336C77C0E77EAE3673D6D5CB97096B53736D432D1D24A9ECBADE23523
     83      5F4F6DA8AD91BE8EA40FBA4FEBE34F1EC1DDFC9B78565989A7A5F7F1E0D67526
     84      BA4FEB681BB5A1B6429EEFE3EEDD22A6EBA971D84FE29D36E12326BA4FEBF876
     85      21BBDFD60ABF6C35879DF55AE4E7DC44C6F93338E679008B7E982E792DD6D79D
     86      CBEA681BB5A1B694A1EC9ECDA6923C9F4D8845EE953418FDA4236179D13ADA46
     87      6D24DF2B13F6976DEB51569CC714763218650F0AE5F2B48DD988ED293BE32B0D
     88      4C193F0A06BA9A080D0EC0B98418B615F641F7856DD4963294E5F340EBEE915C
     89      9FF4F7C0C37B05923E7896D6D1366A436D85B9FFFAD351AC9E9E27BA0D39EA83
     90      FB85B7713AFC0413DDA775421BCA08F998B063AC3E3D294AB2AD28296412D6D1
     91      2DB515F27C1F7BB65AB0F60573A762E3DAE5129EEED33ADA466DA459611F7C9B
     92      A5F14A94DCB9C144F7A5DBBB2BBCAD2A0C5F4C8F99426D05B9BF2C53836990A9
     93      EAF719C296933F8776073279D5909D9D0D5579C69691187E52434444846AFC32
     94      315F42F8253DE0F5C57C31E1172BE625B912E78BB212BE90EC2F24D2259A4FA4
     95      43A44D72EA29C8A9205742A91511DB5B44D944D7883289D2895289E60872CA8F
     96      F509A97F44745F8D636FCB61CF13CDEA18133BBF3F7179A26395C49B2B6649BC
     97      6A5A449A9C5F2AAD8D5A9D724263A1C7BCD8586F106571ACB08D97C239A12366
     98      2F717E553E7FDA62F60217AFCABC96205FB354E74D3D4CB95CCDEA9A2B658B30
     99      A72A5F3F7F427170882731DA83DBCA6BDF20B39D670D3CE8FBD16EB2EEECFC5D
     100      03CF72ED265DDA25EC02A2F9D466A7C4A6133B91E833DABE0A050505E8DCFF6E
     101      8E9D47A4456DB688FB90667F26EBDF835DCE2967BB9363BF279A09997E7956E8
     102      BF731F5B38762AD114E5D9CE7D6CE8112B33571F137D40FB309091F76E58922B
     103      B5B1643B9268183D5E24B30F792C8D99FA65ECBB446FD1FAF932FA30977B8E38
     104      DB451CFB26D1EBB45D5BC6F937919B2BAE8FF91256FEF9FF596E9EB9766D85E7
     105      81D6293A47DDB5FF1797DEAE6F14ADF37BCCABF2FB23A14F7EBF9BDFEC28F44F
     106      8B9D8C7A79BFBF91F1D9865C9EDF2AEB5F382E79BF1F52D6BF74FFAAF8975E4F
     107      DB75FE2EA837FE651615FC2BE47BE3BF3BF5FAC2935AE7FD1E12E747EEF17F03
     108      CF33C2FD9EC4D01356E8B7A77C6F7C536D17FBDEDEC33E786EBBB80F65FB91B6
     109      1772DDF521CBF6CFE685635265FC7FC47529537FC05F977BA58AF692EF74E5DD
     110      7BA5593B3BF6DD97E4735521C73F8BC5ED76FCE7E402DE4E46BDAC18853E64FA
     111      EFE6F35A3B05FE8563E86E2BD7BF70ABF899D1AD7F3B05CF643B25FD2B7AA6F3
     112      7D74E75FD633577A2CAAF897F1FC55DABFAC58E4CD5F65FDCB9B6FCA3CFBED94
     113      B8B694B8F6F8A24E3488683DD139A242A222A2B344C644EF10FD4DCE6B04653F
     114      A73FA324BA467488689D987325CA220A17DBC82AC3C5ED49445F103D2F687B81
     115      682A5182B8FD2529B62FD11AFA9109D16439FDD3B82789C76328D536501CF72E
     116      A217BB795D3A489442F47741DD30A20CFA11B612AF5B7A4439446FF582CF251A
     117      DC8BF8D3A4E257257F778956C9397F214A9CBF26A20972E6CF38A25005F3A782
     118      A88D289A48434E9CFCFC3D4F54425446942C1EDF34A24B442DF427C744A37BF0
     119      BADC9FFEDC9BA895289DE8D31EF4F111511C5133D1991EF0F45C8C270A144BAD
     120      877DBC2156E78B4173649F2176337E9CB96D4AA0D1AA0F2F6DD11D72497FF1FB
     121      4735FE3362F180096FF455D4E9B0ED33C70E39A47D73FEFED97075F816E1B613
     122      106CAE010FBDF7A0B56C0CFA2D199AFFDADCB7C6CB62876C9CAC3162DFF795BE
     123      81BAC84B344076AC1EAE9CD2C539B75988D8F1396C567C8081C61A78537748ED
     124      B89903BE10B2EF688EEC3BDD664ADE7EBFF9C8BF6185F2E2BD7852B81BC557D6
     125      E346E4125CF49D8D1F0F69E265EB2FF0BCD987F8FBECD78B5FF9FC55C9B5B27A
     126      D918BDD94E9AC84C59858B770FA1B9210DF5A26378946785BC841548F59A83B5
     127      87E6E0956D13F102198FFABC41F8E7B4FE6B78DE516FD8A9503F6DE85CB0C1E2
     128      7BFE08AFCFC283AA1094E458107E19528ECC4698CD784C5BF709462F791F7D16
     129      BE83BE335E4BE079E7A5C3724E7A7C0F8DE4ADF8EABA0316941C83C1437FECBB
     130      6683E4B0FFE0CCBEAF717CDD18B8CC7E1D9623FBE2FDEF07A1EFFC8125127ED1
     131      BBF9110E93A1116A842F2EFE82C9377EC3F82BF6181367811D7BA7E3A4D538B8
     132      EABE8D5D135E86E97B7FC397D306E085D543CB78FE97390362824C46C3D66E32
     133      86FB2FC5D833D6181D6D0E0D8FC508B6F8189EE4FCED9FDE1FD61F3C0FB377D4
     134      F0FE9CB7D0CFED8B34C93AF5BBD7D63ACC7A03BECB87E3739BC918E0A48511CE
     135      DAD86A38066E64AC4EB35EC38E4F5EC49A77D4B16EB01A06AF1D83AF43BFB5E6
     136      F91FC6BCF4D2AF535E7DE4F04D3F4C311881972D3F87CEE261D833B53F1C26BF
     137      822D1FBE2061CD863E87EFF68E2B5F3277607FC1CDA3CF98FE7D97D87EFC8F96
     138      79135FC1C87F0F86F587FF80C5C8BFC374681F18BEA5869503D518BFF5E37FB4
     139      7DF9CE0B2BFBA8ABF591BA078E1BD1EF3977E391CF374E9BF42A8C89AD216156
     140      11AD1EA406E377FBC0E6B3FF691A3FE8796FF1BDAAAFD4F544EF3D5A2FF655DF
     141      3761D83FAF7F3D6350D54F7307B7EA1B8C6CFD7ED90891D688176FBCFCFCDF1C
     142      D9B70B9CADF4B3F439A2D7C4F787D9E2E7C13AB10CC4751F896D9E53F01C7E4E
     143      FC1C78557CBFEA2FDE7F51DCA6FE57FAE0EFC7253FC23FD89F28007E64EB77D4
     144      0FBE41BE4C3E81BEF00EF481778037DB7A91AD97BF178E1079FA1DC1C2A58BB0
     145      72DDCFD8B3CF9EFD864F9572D8E337181AAF8499B539C2CF4460B7C36EA5FBA0
     146      EC89C8938CA5CACCBE82B0D870A5FAE059CA087965FA10B2B278AAD0D36132FB
     147      9066E5F1C9E9E760BCD104BBF676F44159B34DE6AC4D117F2EE33CD658AC456A
     148      661A424E8762ABED56D8ECB2C1C9A853AC8EB6511B59FCF94B29586DB186D909
     149      7D0845DBA80DB515F22997536164BE5A52AF48D486DA5286B2C61B4C6064A61C
     150      DBA90FC25076E2775FC1D4DA0C1B6D2C551265264D9F0C9148D42BF5F6FA5357
     151      7F40F490E8A49AF8DD6D29DDD26375F512B164B53D14B38CDF49448C5C327373
     152      7341B7F45828196D3B39B6902AC2D616983C3907E1E1E16CBB6D1B3A49D8466D
     153      29C3B13954672C2DDBA0A1710EFDFAD9B3AD89494B2709DBA82D6528ABA67699
     154      EABCB1713372735BE0EB5B8EE060115253CBB062459D444B9654424BEB21DB52
     155      5BCA702C5D0EA4642C5FDE8819338AA0AD5DCA44F7172FAE92296A4B198E1D45
     156      652EFE05B492A2EBD251E61C3B926A437B3BFDFD7033C951005C5DF72030F030
     157      3BEEA8DB2D39A6B694E1D8115456ADADF4F7C27512EDDFBF55EE31B5A58C98A5
     158      DADCDC5C8BBABA4AE4E75FC5CE9D6648480863C7BC681DBF4F6D29C3B1EF53D9
     159      34365692F95C26D1FAF5CBE51E535BCA702C5D7A0CDF595FFF141515F799EEDE
     160      BD89952B7F941CD37D5EF498DA528663E9F26BD8EEBABA52141464C1CC4C9FC5
     161      1A1373144F9E14C814B5A50C65D5D507110DDDD7D4F40435350F9512B5A50C65
     162      E9BB80BAFABBEE6E6EC7A18A28237E8F18AFAEFE86BDBAFADB81AAE90D7BF13A
     163      8295E8E8E8C1FEFEFEB73C3C3CC0CBDDDD9DCC1B57041D0D722A4291CCB53FB9
     164      26DF727171F9DED1D1F1D7C8C8485CBE7C992927271B0F1EDEC7D9B3493876FC
     165      580379C65BA6E6A5F691E6838383B3AF5DBBD69E9F9FCFFE2F292F2F8FFDDE21
     166      2E2E0E691752C97598823B77EE20323AB231E844D0C6B2674F3BAD4148CCA8AE
     167      AE466D6D2D13DD2F2F2F4756561632323210111E868B69A9C8BC948EE3C7831B
     168      0B0B6F6B0A793F3F3FC9BDB4AAAA8A89FE6F546666260A8AEEC2F7740A2C7D62
     169      611F9A0207FF134848495B21ED9F67F97EAA896E1716C13B261166873DF0C36E
     170      5BCC23B9FC76AF27743D93AFEE8ABE2959BFD2FF17A0FF4BF8E4C913894A9F94
     171      23E74E3E4E450620392D0407629DE15B40DE0D4EFE0A932301D03E1C7FD5FE58
     172      D470DEFFE3C78FD977C2344F37C93DD627360181A7DC71253B1EB7EF5D8073B2
     173      2BFC1F46C129F13062CF46C1C42F1A9A4E51BB843C658B0A0B11929A050B376F
     174      24A51CC71DC2E61625C129D905EE45A7601BB31F918927E0753A0AF39DC38B03
     175      4E858FA23C8DF9DEBD7B2821E7FB50FC4D981F7645566E34F28A1371B3200E8E
     176      670E62FFCD206C3A618B93A703111C1F091DE7A87627BF8039942F2B2B4321F1
     177      5D54781B87E23261E4E286CB37C29053184F9EB7B1D81EBC0776173C6116B005
     178      FEA1E41D302A148B5CC3DB9CFD7C243CFBBF363287225233B1E8801FA2CF06E2
     179      CACDD3484C3B0A6BEFCD300BDB05C3FD26F03BEE0D8FA8D3D8111C5D75FCC4B1
     180      4981818178F4E8114A4A4AF0E0C1031417176353501CACFC03712E3D04213187
     181      61E960821DBF6DC721CF033893148BD84B3770E45468729CBB43DFD0D0D08D64
     182      AE3E8B8F8F436C6C6C7BECE9D3EDBEC1C7DB17FF72A45D6F9F2BD6396C87838F
     183      338E9077A0C31191F0894FC3D5C2FB389D7AB134E3EAA525F41C9039392933F3
     184      E2BFD3D3D37E387FFEFC0F6929293FB87AF9CE9D61EB6FABED78BC78A14B64BB
     185      BE7B589B955F78EB37168E6D9B7C639055F8106732B25ABA7BBEFB9C3A39CAD1
     186      EFE81C173FBFD91161A13366AFDBBB6EE8D29D8D8E61E7F1B8AA16FF0B3DC6FA
     187      AB
    163188    }
    164189  end
     
    261286      OnExecute = AViewSourceExecute
    262287      ShortCut = 114
     288    end
     289    object AFileCompare: TAction
     290      Category = 'File'
     291      Caption = 'Compare...'
     292      ImageIndex = 18
     293      OnExecute = AFileCompareExecute
    263294    end
    264295  end
  • trunk/UCore.lrj

    r115 r120  
    1717{"hash":371876,"name":"tcore.atest.caption","sourcebytes":[84,101,115,116],"value":"Test"},
    1818{"hash":131740677,"name":"tcore.aviewsource.caption","sourcebytes":[86,105,101,119,32,115,111,117,114,99,101],"value":"View source"},
     19{"hash":109897550,"name":"tcore.afilecompare.caption","sourcebytes":[67,111,109,112,97,114,101,46,46,46],"value":"Compare..."},
    1920{"hash":218146437,"name":"tcore.opendialog1.title","sourcebytes":[79,112,101,110,32,101,120,105,115,116,105,110,103,32,102,105,108,101],"value":"Open existing file"},
    2021{"hash":159035875,"name":"tcore.savedialog1.title","sourcebytes":[83,97,118,101,32,102,105,108,101,32,97,115],"value":"Save file as"},
  • trunk/UCore.pas

    r117 r120  
    1717    AAbout: TAction;
    1818    AboutDialog1: TAboutDialog;
     19    AFileCompare: TAction;
    1920    AViewSource: TAction;
    2021    ATest: TAction;
     
    4748    procedure AExitExecute(Sender: TObject);
    4849    procedure AFileCombineExecute(Sender: TObject);
     50    procedure AFileCompareExecute(Sender: TObject);
    4951    procedure AFileNewExecute(Sender: TObject);
    5052    procedure AFileOpenExecute(Sender: TObject);
     
    110112uses
    111113  UFormMain, UFormSettings, UContact, UFormContacts, UFormFindDuplicity,
    112   UFormGenerate, UFormError, UFormFind, UFormTest, UFormSource;
     114  UFormGenerate, UFormError, UFormFind, UFormTest, UFormSource, UFormCompare;
    113115
    114116resourcestring
     
    163165    ShowMessage(Format(SCombinedContacts, [LoadedFiles]));
    164166    UpdateFile;
     167  end;
     168end;
     169
     170procedure TCore.AFileCompareExecute(Sender: TObject);
     171var
     172  TempFile: TDataFile;
     173  LeftContacts: TContactsFile;
     174  RightContacts: TContactsFile;
     175begin
     176  TempFile := DefaultDataFileClass.Create;
     177  try
     178    OpenDialog1.Filter := TempFile.GetFileFilter;
     179  finally
     180    TempFile.Free;
     181  end;
     182  OpenDialog1.DefaultExt := '';
     183  if Assigned(DataFile) then begin
     184    OpenDialog1.InitialDir := ExtractFileDir(DataFile.FileName);
     185    OpenDialog1.FileName := ExtractFileName(DataFile.FileName);
     186  end;
     187  OpenDialog1.Options := OpenDialog1.Options - [ofAllowMultiSelect];
     188  if OpenDialog1.Execute then begin
     189    with TFormCompare.Create(nil) do
     190    try
     191      LeftContacts := TContactsFile(DefaultDataFileClass.Create);
     192      RightContacts := TContactsFile(DefaultDataFileClass.Create);
     193      try
     194        LeftContacts.Assign(TContactsFile(DataFile));
     195        LeftSide := LeftContacts;
     196        RightContacts.LoadFromFile(OpenDialog1.FileName);
     197        RightSide := RightContacts;
     198        ShowModal;
     199      finally
     200        LeftContacts.Free;
     201        RightContacts.Free;
     202      end;
     203    finally
     204      Free;
     205    end;
    165206  end;
    166207end;
     
    553594  AFileSplit.Enabled := Assigned(DataFile);
    554595  AFileCombine.Enabled := Assigned(DataFile);
     596  AFileCompare.Enabled := Assigned(DataFile);
    555597  AFind.Enabled := Assigned(DataFile);
    556598  AFindDuplicate.Enabled := Assigned(DataFile);
  • trunk/UDataFile.pas

    r29 r120  
    2323    function GetFileName: string; virtual;
    2424    function GetFileFilter: string; virtual;
     25    procedure Assign(Source: TDataFile);
    2526    procedure LoadFromFile(FileName: string); virtual;
    2627    procedure SaveToFile(FileName: string); virtual;
     
    7273end;
    7374
     75procedure TDataFile.Assign(Source: TDataFile);
     76begin
     77  FFileName := Source.FFileName;
     78  FModified := Source.FModified;
     79end;
     80
    7481procedure TDataFile.LoadFromFile(FileName: string);
    7582begin
  • trunk/vCardStudio.lpi

    r115 r120  
    107107      </Item3>
    108108    </RequiredPackages>
    109     <Units Count="23">
     109    <Units Count="25">
    110110      <Unit0>
    111111        <Filename Value="vCardStudio.lpr"/>
     
    248248        <IsPartOfProject Value="True"/>
    249249      </Unit22>
     250      <Unit23>
     251        <Filename Value="Forms\UFormCompare.pas"/>
     252        <IsPartOfProject Value="True"/>
     253        <ComponentName Value="FormCompare"/>
     254        <HasResources Value="True"/>
     255        <ResourceBaseClass Value="Form"/>
     256      </Unit23>
     257      <Unit24>
     258        <Filename Value="Diff.pas"/>
     259        <IsPartOfProject Value="True"/>
     260      </Unit24>
    250261    </Units>
    251262  </ProjectOptions>
  • trunk/vCardStudio.lpr

    r115 r120  
    88  {$ENDIF}
    99  Interfaces, // this includes the LCL widgetset
    10   Forms, UFormMain, UCore, Common, SysUtils;
     10  Forms, UFormMain, UCore, Diff, Common, SysUtils, UFormCompare;
    1111
    1212{$R *.res}
Note: See TracChangeset for help on using the changeset viewer.