Changeset 76 for trunk/UCore.pas
- Timestamp:
- Dec 15, 2021, 8:56:06 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r73 r76 17 17 AAbout: TAction; 18 18 AboutDialog1: TAboutDialog; 19 AFind: TAction; 19 20 AFileSplit: TAction; 20 21 AGenerate: TAction; … … 52 53 procedure AFileSplitExecute(Sender: TObject); 53 54 procedure AFindDuplicateExecute(Sender: TObject); 55 procedure AFindExecute(Sender: TObject); 54 56 procedure AGenerateExecute(Sender: TObject); 55 57 procedure AHomePageExecute(Sender: TObject); … … 99 101 uses 100 102 UFormMain, UFormSettings, UContact, UFormContacts, UFormFindDuplicity, 101 UFormGenerate, UFormError ;103 UFormGenerate, UFormError, UFormFind; 102 104 103 105 resourcestring … … 202 204 procedure TCore.AFindDuplicateExecute(Sender: TObject); 203 205 begin 204 FormFindDuplicity := TFormFindDuplicity.Create(nil);205 with FormFindDuplicity do begin206 with TFormFindDuplicity.Create(nil) do 207 try 206 208 Contacts := TContactsFile(DataFile).Contacts; 207 209 ShowModal; 208 210 FormContacts.ReloadList; 209 211 FormMain.UpdateInterface; 212 finally 210 213 Free; 211 214 end; 212 215 end; 213 216 217 procedure TCore.AFindExecute(Sender: TObject); 218 begin 219 with TFormFind.Create(nil) do 220 try 221 Contacts := TContactsFile(DataFile).Contacts; 222 ShowModal; 223 FormContacts.ReloadList; 224 FormMain.UpdateInterface; 225 finally 226 Free; 227 end; 228 end; 229 214 230 procedure TCore.AGenerateExecute(Sender: TObject); 215 231 begin 216 FormGenerate := TFormGenerate.Create(nil);217 with FormGenerate do begin232 with TFormGenerate.Create(nil) do 233 try 218 234 Contacts := TContactsFile(DataFile).Contacts; 219 235 ShowModal; … … 222 238 DataFile.Modified := True; 223 239 FormMain.UpdateInterface; 240 finally 224 241 Free; 225 242 end; … … 233 250 procedure TCore.ASettingsExecute(Sender: TObject); 234 251 begin 235 FormSettings := TFormSettings.Create(nil);236 try 237 FormSettings.LoadData;238 if FormSettings.ShowModal = mrOK then begin239 FormSettings.SaveData;252 with TFormSettings.Create(nil) do 253 try 254 LoadData; 255 if ShowModal = mrOK then begin 256 SaveData; 240 257 ThemeManager1.UseTheme(FormMain); 241 258 ThemeManager1.UseTheme(FormContacts); 242 259 end; 243 260 finally 244 F ormSettings.Free;261 Free; 245 262 end; 246 263 end;
Note:
See TracChangeset
for help on using the changeset viewer.