Changeset 2 for trunk/UFormMain.pas


Ignore:
Timestamp:
Apr 20, 2016, 6:29:54 PM (9 years ago)
Author:
chronos
Message:
  • Added: Support for loading mediawiki acronyms placed on one line.
  • Fixed: Do not try open non existent file.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore set to
      lib
      AcronymDecoder.exe
      AcronymDecoder.lps
  • trunk/UFormMain.pas

    r1 r2  
    5353  UFormImport;
    5454
     55const
     56  DefaultFileName = 'Acronyms.csv';
     57
    5558{ TFormMain }
    5659
     
    6972procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    7073begin
    71   AcronymDB.SaveToFile('Abbreviations.txt');
     74  AcronymDB.SaveToFile(DefaultFileName);
    7275end;
    7376
     
    101104procedure TFormMain.FormShow(Sender: TObject);
    102105begin
    103   AcronymDB.LoadFromFile('Abbreviations.txt');
     106  if FileExists(DefaultFileName) then
     107    AcronymDB.LoadFromFile(DefaultFileName);
    104108  AcronymDb.FilterList(EditSearch.Text, FoundAcronyms);
    105109  UpdateAcronymsList;
Note: See TracChangeset for help on using the changeset viewer.