Changeset 95 for trunk/Forms/UFormMain.pas
- Timestamp:
- Aug 17, 2016, 11:20:37 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r91 r95 207 207 procedure TFormMain.AExportExecute(Sender: TObject); 208 208 begin 209 FormExport.ShowModal; 209 FormExport := TFormExport.Create(Self); 210 try 211 FormExport.ShowModal; 212 finally 213 FreeAndNil(FormExport); 214 end; 210 215 end; 211 216 … … 281 286 procedure TFormMain.AImportExecute(Sender: TObject); 282 287 begin 283 FormImport.ShowModal; 284 UpdateAcronymsList; 285 UpdateInterface; 288 FormImport := TFormImport.Create(Self); 289 try 290 FormImport.ShowModal; 291 UpdateAcronymsList; 292 UpdateInterface; 293 finally 294 FreeAndNil(FormImport); 295 end; 286 296 end; 287 297 … … 314 324 procedure TFormMain.ASettingsExecute(Sender: TObject); 315 325 begin 316 FormSettings.Load; 317 if FormSettings.ShowModal = mrOk then begin 326 FormSettings := TFormSettings.Create(Self); 327 try 328 FormSettings.Load; 329 if FormSettings.ShowModal = mrOk then begin 318 330 FormSettings.Save; 319 Core.SaveConfig; 331 Core.SaveConfig; 332 end; 333 finally 334 FreeAndNil(FormSettings); 320 335 end; 321 336 end; … … 323 338 procedure TFormMain.AShowAboutExecute(Sender: TObject); 324 339 begin 325 FormAbout.ShowModal; 340 FormAbout := TFormAbout.Create(Self); 341 try 342 FormAbout.ShowModal; 343 finally 344 FreeAndNil(FormAbout); 345 end; 326 346 end; 327 347 328 348 procedure TFormMain.AShowAcronymsExecute(Sender: TObject); 329 349 begin 330 FormAcronyms.ShowModal; 331 UpdateAcronymsList; 332 UpdateInterface; 350 FormAcronyms := TFormAcronyms.Create(Self); 351 try 352 FormAcronyms.ShowModal; 353 UpdateAcronymsList; 354 UpdateInterface; 355 finally 356 FreeAndNil(FormAcronyms); 357 end; 333 358 end; 334 359 335 360 procedure TFormMain.AShowCategoriesExecute(Sender: TObject); 336 361 begin 337 FormCategories.Categories := Core.AcronymDb.Categories; 338 FormCategories.ShowModal; 339 UpdateAcronymsList; 340 UpdateInterface; 362 FormCategories := TFormCategories.Create(Self); 363 try 364 FormCategories.Categories := Core.AcronymDb.Categories; 365 FormCategories.ShowModal; 366 UpdateAcronymsList; 367 UpdateInterface; 368 finally 369 FreeAndNil(FormCategories); 370 end; 341 371 end; 342 372 … … 349 379 procedure TFormMain.AShowImportFormatsExecute(Sender: TObject); 350 380 begin 351 FormImportFormats.ImportFormats := Core.AcronymDb.ImportFormats; 352 FormImportFormats.ShowModal; 353 UpdateInterface; 381 FormImportFormats := TFormImportFormats.Create(Self); 382 try 383 FormImportFormats.ImportFormats := Core.AcronymDb.ImportFormats; 384 FormImportFormats.ShowModal; 385 UpdateInterface; 386 finally 387 FreeAndNil(FormImportFormats); 388 end; 354 389 end; 355 390 356 391 procedure TFormMain.AShowImportSourcesExecute(Sender: TObject); 357 392 begin 358 FormImportSources.ImportSources := Core.AcronymDb.ImportSources; 359 FormImportSources.ShowModal; 360 UpdateAcronymsList; 361 UpdateInterface; 393 FormImportSources := TFormImportSources.Create(Self); 394 try 395 FormImportSources.ImportSources := Core.AcronymDb.ImportSources; 396 FormImportSources.ShowModal; 397 UpdateAcronymsList; 398 UpdateInterface; 399 finally 400 FreeAndNil(FormImportSources); 401 end; 362 402 end; 363 403
Note:
See TracChangeset
for help on using the changeset viewer.