Ignore:
Timestamp:
May 4, 2016, 11:43:42 PM (9 years ago)
Author:
chronos
Message:
  • Added: Now import formats can be specified using new edit windows.
  • Added: Import source can now be downloaded and processed including download from https URLs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r21 r22  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    9   ComCtrls, StdCtrls, ExtCtrls, ActnList, UAcronym, UPersistentForm, Contnrs,
     9  ComCtrls, StdCtrls, ExtCtrls, ActnList, UAcronym, UPersistentForm,
    1010  URegistry, ULastOpenedList, UListViewSort, UCoolTranslator, Registry,
    1111  SpecializedList, LazUTF8;
     
    1616
    1717  TFormMain = class(TForm)
     18    AProcessImports: TAction;
     19    AShowImportFormats: TAction;
    1820    AShowAbout: TAction;
    1921    AShowImportSources: TAction;
     
    5254    MenuItem21: TMenuItem;
    5355    MenuItem22: TMenuItem;
     56    MenuItem23: TMenuItem;
    5457    MenuItem4: TMenuItem;
    5558    MenuItem5: TMenuItem;
    5659    MenuItem6: TMenuItem;
     60    MenuItem7: TMenuItem;
    5761    MenuItemOpenRecent: TMenuItem;
    5862    MenuItem2: TMenuItem;
     
    7276    procedure AFileSaveExecute(Sender: TObject);
    7377    procedure AImportExecute(Sender: TObject);
     78    procedure AProcessImportsExecute(Sender: TObject);
    7479    procedure ASettingsExecute(Sender: TObject);
    7580    procedure AShowAboutExecute(Sender: TObject);
     
    7782    procedure AShowCategoriesExecute(Sender: TObject);
    7883    procedure AShowExecute(Sender: TObject);
     84    procedure AShowImportFormatsExecute(Sender: TObject);
    7985    procedure AShowImportSourcesExecute(Sender: TObject);
    8086    procedure CheckBoxExactMathChange(Sender: TObject);
     
    118124
    119125uses
    120   UFormImport, UFormAcronym, UFormSettings, UFormCategories, UFormAcronyms,
    121   UFormImportSource, UFormImportSources, UFormAbout;
     126  UFormImport, UFormSettings, UFormCategories, UFormAcronyms,
     127  UFormImportSources, UFormAbout, UFormImportFormats;
    122128
    123129resourcestring
     
    243249end;
    244250
     251procedure TFormMain.AProcessImportsExecute(Sender: TObject);
     252var
     253  I: Integer;
     254begin
     255  for I := 0 to AcronymDb.ImportSources.Count - 1 do
     256    TImportSource(AcronymDb.ImportSources[I]).Process;
     257  UpdateAcronymsList;
     258  UpdateInterface;
     259end;
     260
    245261procedure TFormMain.ASettingsExecute(Sender: TObject);
    246262begin
     
    271287begin
    272288  Show;
     289end;
     290
     291procedure TFormMain.AShowImportFormatsExecute(Sender: TObject);
     292begin
     293  FormImportFormats.ImportFormats := AcronymDb.ImportFormats;
     294  FormImportFormats.ShowModal;
     295  UpdateInterface;
    273296end;
    274297
Note: See TracChangeset for help on using the changeset viewer.