- Timestamp:
- Apr 10, 2022, 1:54:34 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 1 deleted
- 12 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormCompare.pas
r129 r134 334 334 Ext := ExtractFileExt(AFileName); 335 335 if Ext = VCardFileExt then begin 336 with TVCardFile.Create do336 with TVCardFile.Create(nil) do 337 337 try 338 338 LoadFromFile(AFileName); -
trunk/Forms/UFormContacts.pas
r133 r134 439 439 begin 440 440 if Assigned(ListView1.Selected) then begin 441 TempFile := TVCardFile.Create ;441 TempFile := TVCardFile.Create(nil); 442 442 try 443 443 OpenDialog1.Filter := TempFile.GetFileFilter; … … 490 490 Lines: TStringList; 491 491 begin 492 PasteContacts := TVCardFile.Create ;492 PasteContacts := TVCardFile.Create(nil); 493 493 Lines := TStringList.Create; 494 494 try … … 532 532 begin 533 533 if Assigned(ListView1.Selected) then begin 534 TempFile := TVCardFile.Create ;534 TempFile := TVCardFile.Create(nil); 535 535 try 536 536 SaveDialog1.Filter := TempFile.GetFileFilter; -
trunk/Forms/UFormFindDuplicity.pas
r129 r134 224 224 I: Integer; 225 225 begin 226 TempContacts := TVCardFile.Create ;226 TempContacts := TVCardFile.Create(nil); 227 227 try 228 228 for I := 0 to Contacts.Count - 1 do -
trunk/Languages/vCardStudio.cs.po
r133 r134 1119 1119 msgstr "Odstraněno %d duplikátů." 1120 1120 1121 #: udatafile.sallfiles1122 msgctxt "udatafile.sallfiles"1123 msgid "All files"1124 msgstr "Všechny soubory"1125 1126 #: udatafile.sdatafilename1127 msgctxt "udatafile.sdatafilename"1128 msgid "Data file"1129 msgstr "Datový soubor"1130 1131 1121 #: uformcontact.scontact 1132 1122 msgctxt "uformcontact.scontact" … … 1244 1234 msgid "vCard file" 1245 1235 msgstr "Soubor vCard" 1236 -
trunk/Languages/vCardStudio.pot
r133 r134 1092 1092 msgstr "" 1093 1093 1094 #: udatafile.sallfiles1095 msgctxt "udatafile.sallfiles"1096 msgid "All files"1097 msgstr ""1098 1099 #: udatafile.sdatafilename1100 msgctxt "udatafile.sdatafilename"1101 msgid "Data file"1102 msgstr ""1103 1104 1094 #: uformcontact.scontact 1105 1095 msgctxt "uformcontact.scontact" -
trunk/Languages/vCardStudio.sv.po
r133 r134 1129 1129 msgstr "" 1130 1130 1131 #: udatafile.sallfiles1132 msgctxt "udatafile.sallfiles"1133 msgid "All files"1134 msgstr "Alla filer"1135 1136 #: udatafile.sdatafilename1137 #, fuzzy1138 #| msgid "File"1139 msgctxt "udatafile.sdatafilename"1140 msgid "Data file"1141 msgstr "Fil"1142 1143 1131 #: uformcontact.scontact 1144 1132 msgctxt "uformcontact.scontact" -
trunk/Packages/Common/Common.lpk
r128 r134 42 42 <License Value="Copy left."/> 43 43 <Version Minor="9"/> 44 <Files Count=" 29">44 <Files Count="30"> 45 45 <Item1> 46 46 <Filename Value="StopWatch.pas"/> … … 171 171 <UnitName Value="UPixelPointer"/> 172 172 </Item29> 173 <Item30> 174 <Filename Value="UDataFile.pas"/> 175 <UnitName Value="UDataFile"/> 176 </Item30> 173 177 </Files> 174 178 <CompatibilityMode Value="True"/> -
trunk/Packages/Common/UDataFile.pas
r133 r134 9 9 { TDataFile } 10 10 11 TDataFile = class 11 TDataFile = class(TComponent) 12 12 private 13 13 FFileName: string; … … 21 21 function GetFileName: string; virtual; 22 22 function GetFileFilter: string; virtual; 23 procedure Assign(Source: T DataFile);23 procedure Assign(Source: TPersistent); override; 24 24 procedure LoadFromFile(FileName: string); virtual; 25 25 procedure SaveToFile(FileName: string); virtual; 26 constructor Create ; virtual;26 constructor Create(AOwner: TComponent); override; 27 27 property FileName: string read FFileName write SetFileName; 28 28 property Modified: Boolean read FModified write SetModified; 29 published 29 30 property OnModify: TNotifyEvent read FOnModify write FOnModify; 30 31 end; … … 38 39 SDataFileName = 'Data file'; 39 40 SAllFiles = 'All files'; 41 42 const 43 AnyFileExt = '.*'; 40 44 41 45 … … 68 72 function TDataFile.GetFileFilter: string; 69 73 begin 70 Result := SAllFiles + '|* .*';74 Result := SAllFiles + '|*' + AnyFileExt; 71 75 end; 72 76 73 procedure TDataFile.Assign(Source: T DataFile);77 procedure TDataFile.Assign(Source: TPersistent); 74 78 begin 75 FFileName := Source.FFileName; 76 FModified := Source.FModified; 79 inherited; 80 if Source is TDataFile then begin 81 FFileName := TDataFile(Source).FFileName; 82 FModified := TDataFile(Source).FModified; 83 end; 77 84 end; 78 85 … … 85 92 procedure TDataFile.SaveToFile(FileName: string); 86 93 begin 94 FModified := False; 87 95 Self.FileName := FileName; 88 FModified := False;89 96 end; 90 97 91 constructor TDataFile.Create ;98 constructor TDataFile.Create(AOwner: TComponent); 92 99 begin 100 inherited; 93 101 FileName := GetFileName + GetFileExt; 94 102 end; … … 100 108 end; 101 109 102 103 110 end. 104 111 -
trunk/UCore.pas
r133 r134 142 142 LoadedFiles: Integer; 143 143 begin 144 TempFile := DefaultDataFileClass.Create ;144 TempFile := DefaultDataFileClass.Create(nil); 145 145 try 146 146 OpenDialog1.Filter := TempFile.GetFileFilter; … … 158 158 for I := 0 to OpenDialog1.Files.Count - 1 do begin 159 159 if FileExists(OpenDialog1.Files[I]) then begin 160 TempFile := TVCardFile.Create ;160 TempFile := TVCardFile.Create(nil); 161 161 try 162 162 TempFile.LoadFromFile(OpenDialog1.Files[I]); … … 179 179 TempFileName: string; 180 180 begin 181 TempFile := DefaultDataFileClass.Create ;181 TempFile := DefaultDataFileClass.Create(nil); 182 182 try 183 183 OpenDialog1.Filter := TempFile.GetFileFilter; … … 364 364 TempFile: TDataFile; 365 365 begin 366 TempFile := DefaultDataFileClass.Create ;366 TempFile := DefaultDataFileClass.Create(nil); 367 367 try 368 368 OpenDialog1.Filter := TempFile.GetFileFilter; … … 510 510 FileClose; 511 511 if FileClosed then begin 512 DataFile := DefaultDataFileClass.Create ;512 DataFile := DefaultDataFileClass.Create(nil); 513 513 DataFile.OnModify := FileModified; 514 514 TVCardFile(DataFile).VCard.OnError := DoError; -
trunk/UTest.pas
r129 r134 87 87 Lines := TStringList.Create; 88 88 try 89 with TVCardFile.Create do89 with TVCardFile.Create(nil) do 90 90 try 91 91 Lines.Text := Input; … … 115 115 Lines := TStringList.Create; 116 116 try 117 with TVCardFile.Create do117 with TVCardFile.Create(nil) do 118 118 try 119 119 Lines.Text := Input; -
trunk/UVCardFile.pas
r129 r134 19 19 procedure SaveToFile(FileName: string); override; 20 20 procedure LoadFromFile(FileName: string); override; 21 procedure Assign(Source: T VCardFile);22 constructor Create ; override;21 procedure Assign(Source: TPersistent); override; 22 constructor Create(AOwner: TComponent); override; 23 23 destructor Destroy; override; 24 24 end; … … 64 64 end; 65 65 66 procedure TVCardFile.Assign(Source: T VCardFile);66 procedure TVCardFile.Assign(Source: TPersistent); 67 67 begin 68 inherited Assign(Source); 69 VCard.Assign(Source.VCard); 68 inherited; 69 if Source is TVCardFile then 70 VCard.Assign(TVCardFile(Source).VCard); 70 71 end; 71 72 72 constructor TVCardFile.Create ;73 constructor TVCardFile.Create(AOwner: TComponent); 73 74 begin 74 75 inherited; -
trunk/vCardStudio.lpi
r131 r134 123 123 </Item7> 124 124 </RequiredPackages> 125 <Units Count="2 4">125 <Units Count="23"> 126 126 <Unit0> 127 127 <Filename Value="vCardStudio.lpr"/> … … 143 143 </Unit2> 144 144 <Unit3> 145 <Filename Value="UDataFile.pas"/> 146 <IsPartOfProject Value="True"/> 145 <Filename Value="Forms\UFormSettings.pas"/> 146 <IsPartOfProject Value="True"/> 147 <ComponentName Value="FormSettings"/> 148 <HasResources Value="True"/> 149 <ResourceBaseClass Value="Form"/> 147 150 </Unit3> 148 151 <Unit4> 149 <Filename Value="Forms\UForm Settings.pas"/>150 <IsPartOfProject Value="True"/> 151 <ComponentName Value="Form Settings"/>152 <Filename Value="Forms\UFormContacts.pas"/> 153 <IsPartOfProject Value="True"/> 154 <ComponentName Value="FormContacts"/> 152 155 <HasResources Value="True"/> 153 156 <ResourceBaseClass Value="Form"/> 154 157 </Unit4> 155 158 <Unit5> 156 <Filename Value="Forms\UFormContact s.pas"/>157 <IsPartOfProject Value="True"/> 158 <ComponentName Value="FormContact s"/>159 <Filename Value="Forms\UFormContact.pas"/> 160 <IsPartOfProject Value="True"/> 161 <ComponentName Value="FormContact"/> 159 162 <HasResources Value="True"/> 160 163 <ResourceBaseClass Value="Form"/> 161 164 </Unit5> 162 165 <Unit6> 163 <Filename Value="Forms\UForm Contact.pas"/>164 <IsPartOfProject Value="True"/> 165 <ComponentName Value="Form Contact"/>166 <Filename Value="Forms\UFormFindDuplicity.pas"/> 167 <IsPartOfProject Value="True"/> 168 <ComponentName Value="FormFindDuplicity"/> 166 169 <HasResources Value="True"/> 167 170 <ResourceBaseClass Value="Form"/> 168 171 </Unit6> 169 172 <Unit7> 170 <Filename Value="Forms\UForm FindDuplicity.pas"/>171 <IsPartOfProject Value="True"/> 172 <ComponentName Value="Form FindDuplicity"/>173 <Filename Value="Forms\UFormGenerate.pas"/> 174 <IsPartOfProject Value="True"/> 175 <ComponentName Value="FormGenerate"/> 173 176 <HasResources Value="True"/> 174 177 <ResourceBaseClass Value="Form"/> 175 178 </Unit7> 176 179 <Unit8> 177 <Filename Value="Forms\UForm Generate.pas"/>178 <IsPartOfProject Value="True"/> 179 <ComponentName Value="Form Generate"/>180 <Filename Value="Forms\UFormError.pas"/> 181 <IsPartOfProject Value="True"/> 182 <ComponentName Value="FormError"/> 180 183 <HasResources Value="True"/> 181 184 <ResourceBaseClass Value="Form"/> 182 185 </Unit8> 183 186 <Unit9> 184 <Filename Value="Forms\UForm Error.pas"/>185 <IsPartOfProject Value="True"/> 186 <ComponentName Value="Form Error"/>187 <Filename Value="Forms\UFormProperty.pas"/> 188 <IsPartOfProject Value="True"/> 189 <ComponentName Value="FormProperty"/> 187 190 <HasResources Value="True"/> 188 191 <ResourceBaseClass Value="Form"/> 189 192 </Unit9> 190 193 <Unit10> 191 <Filename Value="Forms\UFormPropert y.pas"/>192 <IsPartOfProject Value="True"/> 193 <ComponentName Value="FormPropert y"/>194 <Filename Value="Forms\UFormProperties.pas"/> 195 <IsPartOfProject Value="True"/> 196 <ComponentName Value="FormProperties"/> 194 197 <HasResources Value="True"/> 195 198 <ResourceBaseClass Value="Form"/> 196 199 </Unit10> 197 200 <Unit11> 198 <Filename Value="Forms\UForm Properties.pas"/>199 <IsPartOfProject Value="True"/> 200 <ComponentName Value="Form Properties"/>201 <Filename Value="Forms\UFormFind.pas"/> 202 <IsPartOfProject Value="True"/> 203 <ComponentName Value="FormFind"/> 201 204 <HasResources Value="True"/> 202 205 <ResourceBaseClass Value="Form"/> 203 206 </Unit11> 204 207 <Unit12> 205 <Filename Value="Forms\UForm Find.pas"/>206 <IsPartOfProject Value="True"/> 207 <ComponentName Value="Form Find"/>208 <Filename Value="Forms\UFormTest.pas"/> 209 <IsPartOfProject Value="True"/> 210 <ComponentName Value="FormTest"/> 208 211 <HasResources Value="True"/> 209 212 <ResourceBaseClass Value="Form"/> 210 213 </Unit12> 211 214 <Unit13> 212 <Filename Value="Forms\UFormTest.pas"/> 213 <IsPartOfProject Value="True"/> 214 <ComponentName Value="FormTest"/> 215 <HasResources Value="True"/> 216 <ResourceBaseClass Value="Form"/> 215 <Filename Value="UTest.pas"/> 216 <IsPartOfProject Value="True"/> 217 217 </Unit13> 218 218 <Unit14> 219 <Filename Value="UTest.pas"/> 220 <IsPartOfProject Value="True"/> 219 <Filename Value="Forms\UFormTestCase.pas"/> 220 <IsPartOfProject Value="True"/> 221 <ComponentName Value="FormTestCase"/> 222 <HasResources Value="True"/> 223 <ResourceBaseClass Value="Form"/> 221 224 </Unit14> 222 225 <Unit15> 223 <Filename Value="Forms\UForm TestCase.pas"/>224 <IsPartOfProject Value="True"/> 225 <ComponentName Value="Form TestCase"/>226 <Filename Value="Forms\UFormImage.pas"/> 227 <IsPartOfProject Value="True"/> 228 <ComponentName Value="FormImage"/> 226 229 <HasResources Value="True"/> 227 230 <ResourceBaseClass Value="Form"/> 228 231 </Unit15> 229 232 <Unit16> 230 <Filename Value="Forms\UForm Image.pas"/>231 <IsPartOfProject Value="True"/> 232 <ComponentName Value="Form Image"/>233 <Filename Value="Forms\UFormNameDetails.pas"/> 234 <IsPartOfProject Value="True"/> 235 <ComponentName Value="FormNameDetails"/> 233 236 <HasResources Value="True"/> 234 237 <ResourceBaseClass Value="Form"/> 235 238 </Unit16> 236 239 <Unit17> 237 <Filename Value="Forms\UForm NameDetails.pas"/>238 <IsPartOfProject Value="True"/> 239 <ComponentName Value="Form NameDetails"/>240 <Filename Value="Forms\UFormSource.pas"/> 241 <IsPartOfProject Value="True"/> 242 <ComponentName Value="FormSource"/> 240 243 <HasResources Value="True"/> 241 244 <ResourceBaseClass Value="Form"/> 242 245 </Unit17> 243 246 <Unit18> 244 <Filename Value="Forms\UFormSource.pas"/> 245 <IsPartOfProject Value="True"/> 246 <ComponentName Value="FormSource"/> 247 <HasResources Value="True"/> 248 <ResourceBaseClass Value="Form"/> 247 <Filename Value="UVCardHighlighter.pas"/> 248 <IsPartOfProject Value="True"/> 249 249 </Unit18> 250 250 <Unit19> 251 <Filename Value="UVCardHighlighter.pas"/> 252 <IsPartOfProject Value="True"/> 251 <Filename Value="Forms\UFormCompare.pas"/> 252 <IsPartOfProject Value="True"/> 253 <ComponentName Value="FormCompare"/> 254 <HasResources Value="True"/> 255 <ResourceBaseClass Value="Form"/> 253 256 </Unit19> 254 257 <Unit20> 255 <Filename Value="Forms\UFormCompare.pas"/> 256 <IsPartOfProject Value="True"/> 257 <ComponentName Value="FormCompare"/> 258 <HasResources Value="True"/> 259 <ResourceBaseClass Value="Form"/> 258 <Filename Value="Diff.pas"/> 259 <IsPartOfProject Value="True"/> 260 260 </Unit20> 261 261 <Unit21> 262 <Filename Value=" Diff.pas"/>262 <Filename Value="UTestCases.pas"/> 263 263 <IsPartOfProject Value="True"/> 264 264 </Unit21> 265 265 <Unit22> 266 <Filename Value="U TestCases.pas"/>266 <Filename Value="UVCardFile.pas"/> 267 267 <IsPartOfProject Value="True"/> 268 268 </Unit22> 269 <Unit23>270 <Filename Value="UVCardFile.pas"/>271 <IsPartOfProject Value="True"/>272 </Unit23>273 269 </Units> 274 270 </ProjectOptions> -
trunk/vCardStudio.lpr
r129 r134 6 6 {$ENDIF} 7 7 Interfaces, // this includes the LCL widgetset 8 Forms, UFormMain, UCore, Diff, Common,SysUtils, UFormCompare, UTestCases,8 Forms, UFormMain, UCore, Diff, SysUtils, UFormCompare, UTestCases, 9 9 UVCardFile; 10 10
Note:
See TracChangeset
for help on using the changeset viewer.