Changeset 219 for trunk/Forms/FormImportSource.pas
- Timestamp:
- Jan 17, 2025, 9:05:54 PM (4 days ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormImportSource.pas
r218 r219 1 unit UFormImportSource; 2 3 {$mode delphi} 1 unit FormImportSource; 4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ActnList, Menus, ExtCtrls, UAcronym, LCLIntf;7 ActnList, Menus, ExtCtrls, Acronym, LCLIntf; 10 8 11 9 type … … 44 42 procedure ButtonOpenURLClick(Sender: TObject); 45 43 procedure ButtonShowFormatClick(Sender: TObject); 46 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);47 procedure FormCreate(Sender: TObject);48 44 procedure FormShow(Sender: TObject); 49 private50 { private declarations }51 45 public 52 46 procedure UpdateInterface; … … 55 49 end; 56 50 57 var58 FormImportSource: TFormImportSource;59 51 60 52 implementation … … 63 55 64 56 uses 65 UCore, UFormImportFormat, UFormCategorySelect;57 Core, FormImportFormat, FormCategorySelect; 66 58 67 59 { TFormImportSource } … … 70 62 var 71 63 NewImportFormat: TImportFormat; 64 FormImportFormat: TFormImportFormat; 72 65 begin 73 66 if ComboBox1.ItemIndex <> -1 then begin … … 80 73 FormImportFormat.Save(NewImportFormat); 81 74 TImportFormat(ComboBox1.Items.Objects[ComboBox1.ItemIndex]).Assign(NewImportFormat); 82 Core. AcronymDb.Modified := True;75 Core.Core.AcronymDb.Modified := True; 83 76 ComboBox1.Items.Strings[ComboBox1.ItemIndex] := NewImportFormat.Name; 84 77 end; … … 90 83 end; 91 84 92 procedure TFormImportSource.FormClose(Sender: TObject;93 var CloseAction: TCloseAction);94 begin95 Core.PersistentForm1.Save(Self);96 end;97 98 procedure TFormImportSource.FormCreate(Sender: TObject);99 begin100 Core.Translator.TranslateComponentRecursive(Self);101 Core.ThemeManager.UseTheme(Self);102 end;103 104 85 procedure TFormImportSource.FormShow(Sender: TObject); 105 86 begin 106 Core.PersistentForm1.Load(Self);107 87 UpdateInterface; 108 88 end; … … 116 96 var 117 97 I: Integer; 98 FormCategorySelect: TFormCategorySelect; 118 99 begin 119 100 FormCategorySelect := TFormCategorySelect.Create(Self); … … 155 136 EditName.Text := ImportSource.Name; 156 137 EditURL.Text := ImportSource.URL; 157 while ComboBox1.Items.Count > Core. AcronymDb.ImportFormats.Count do138 while ComboBox1.Items.Count > Core.Core.AcronymDb.ImportFormats.Count do 158 139 ComboBox1.Items.Delete(ComboBox1.Items.Count - 1); 159 while ComboBox1.Items.Count < Core. AcronymDb.ImportFormats.Count do140 while ComboBox1.Items.Count < Core.Core.AcronymDb.ImportFormats.Count do 160 141 ComboBox1.Items.Add(''); 161 for I := 0 to Core. AcronymDb.ImportFormats.Count - 1 do begin162 ComboBox1.Items[I] := TImportFormat(Core. AcronymDb.ImportFormats[I]).Name;163 ComboBox1.Items.Objects[I] := Core. AcronymDb.ImportFormats[I];142 for I := 0 to Core.Core.AcronymDb.ImportFormats.Count - 1 do begin 143 ComboBox1.Items[I] := TImportFormat(Core.Core.AcronymDb.ImportFormats[I]).Name; 144 ComboBox1.Items.Objects[I] := Core.Core.AcronymDb.ImportFormats[I]; 164 145 end; 165 146 ComboBox1.ItemIndex := ComboBox1.Items.IndexOfObject(ImportSource.Format);
Note:
See TracChangeset
for help on using the changeset viewer.