Ignore:
Timestamp:
Aug 8, 2016, 1:41:25 PM (8 years ago)
Author:
chronos
Message:
  • Modified: Non-visual code moved from FormMain to Core data module.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormImport.pas

    r23 r86  
    3737
    3838uses
    39   UFormMain;
     39  UCore;
    4040
    4141resourcestring
     
    7979      AcronymMeaning := Trim(Copy(Line, 2, Length(Line)));
    8080      if (AcronymName <> '') and (AcronymMeaning <> '') then begin
    81         Acronym := FormMain.AcronymDb.Acronyms.SearchByName(AcronymName);
     81        Acronym := Core.AcronymDb.Acronyms.SearchByName(AcronymName);
    8282        if not Assigned(Acronym) then begin
    8383          Acronym := TAcronym.Create;
    8484          Acronym.Name := AcronymName;
    85           FormMain.AcronymDb.Acronyms.Add(Acronym);
     85          Core.AcronymDb.Acronyms.Add(Acronym);
    8686        end;
    8787        Meaning := Acronym.Meanings.SearchByName(AcronymMeaning);
     
    9696    end;
    9797  end;
    98   if AddedCount > 0 then FormMain.AcronymDb.Modified := True;
     98  if AddedCount > 0 then Core.AcronymDb.Modified := True;
    9999  ShowMessage(Format(SImportedNewAcronyms, [AddedCount]));
    100100end;
     
    125125      else AcronymDescription := '';
    126126    if (AcronymName <> '') and (AcronymDescription <> '') then begin
    127       Acronym := FormMain.AcronymDb.Acronyms.SearchByName(AcronymName);
     127      Acronym := Core.AcronymDb.Acronyms.SearchByName(AcronymName);
    128128      if not Assigned(Acronym) then begin
    129129        Acronym := TAcronym.Create;
    130130        Acronym.Name := AcronymName;
    131         FormMain.AcronymDb.Acronyms.Add(Acronym);
     131        Core.AcronymDb.Acronyms.Add(Acronym);
    132132      end;
    133133      Meaning := Acronym.Meanings.SearchByName(AcronymDescription);
     
    143143  end;
    144144  Columns.Free;
    145   if AddedCount > 0 then FormMain.AcronymDb.Modified := True;
     145  if AddedCount > 0 then Core.AcronymDb.Modified := True;
    146146  ShowMessage(Format(SImportedNewAcronyms, [AddedCount]));
    147147end;
Note: See TracChangeset for help on using the changeset viewer.