Changeset 219 for trunk/Forms/FormImportFormats.pas
- Timestamp:
- Jan 17, 2025, 9:05:54 PM (4 days ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormImportFormats.pas
r218 r219 1 unit UFormImportFormats; 2 3 {$mode delphi} 1 unit FormImportFormats; 4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 ActnList, Menus, UAcronym;7 ActnList, Menus, Acronym, FormEx; 10 8 11 9 type … … 13 11 { TFormImportFormats } 14 12 15 TFormImportFormats = class(TForm )13 TFormImportFormats = class(TFormEx) 16 14 AAdd: TAction; 17 15 ActionList1: TActionList; … … 30 28 procedure AModifyExecute(Sender: TObject); 31 29 procedure ARemoveExecute(Sender: TObject); 32 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);33 30 procedure FormCreate(Sender: TObject); 34 31 procedure FormShow(Sender: TObject); … … 38 35 procedure ListView1SelectItem(Sender: TObject; Item: TListItem; 39 36 Selected: Boolean); 40 private41 { private declarations }42 37 public 43 38 ImportFormats: TImportFormats; … … 46 41 end; 47 42 48 var49 FormImportFormats: TFormImportFormats;50 43 51 44 implementation … … 54 47 55 48 uses 56 UCore, UFormImportFormat;49 Core, FormImportFormat; 57 50 58 51 resourcestring … … 104 97 procedure TFormImportFormats.FormShow(Sender: TObject); 105 98 begin 106 Core.PersistentForm1.Load(Self);107 99 UpdateList; 108 Core. ScaleDPI1.ScaleControl(ToolBar1,Core.ScaleDPI1.DesignDPI);100 Core.Core.ScaleDPI1.ScaleControl(ToolBar1, Core.Core.ScaleDPI1.DesignDPI); 109 101 end; 110 102 … … 112 104 var 113 105 NewImportFormat: TImportFormat; 106 FormImportFormat: TFormImportFormat; 114 107 begin 115 108 NewImportFormat := TImportFormat.Create; … … 123 116 ImportFormats.Add(NewImportFormat); 124 117 NewImportFormat := nil; 125 Core. AcronymDb.Modified := True;118 Core.Core.AcronymDb.Modified := True; 126 119 UpdateList; 127 120 end else ShowMessage(Format(SImportFormatAlreadyExists, [NewImportFormat.Name])); … … 136 129 var 137 130 NewImportFormat: TImportFormat; 131 FormImportFormat: TFormImportFormat; 138 132 begin 139 133 if Assigned(ListView1.Selected) then begin … … 148 142 if not Assigned(ImportFormats.SearchByName(NewImportFormat.Name)) then begin; 149 143 TImportFormat(ListView1.Selected.Data).Assign(NewImportFormat); 150 Core. AcronymDb.Modified := True;144 Core.Core.AcronymDb.Modified := True; 151 145 UpdateList; 152 146 end else ShowMessage(Format(SImportFormatAlreadyExists, [NewImportFormat.Name])); 153 147 end else begin 154 148 TImportFormat(ListView1.Selected.Data).Assign(NewImportFormat); 155 Core. AcronymDb.Modified := True;149 Core.Core.AcronymDb.Modified := True; 156 150 UpdateList; 157 151 end; … … 179 173 end; 180 174 181 procedure TFormImportFormats.FormClose(Sender: TObject;182 var CloseAction: TCloseAction);183 begin184 Core.PersistentForm1.Save(Self);185 end;186 187 175 procedure TFormImportFormats.FormCreate(Sender: TObject); 188 176 var 189 177 I: Integer; 190 178 begin 191 Core.Translator.TranslateComponentRecursive(Self);192 Core.ThemeManager.UseTheme(Self);193 179 for I := 0 to ToolBar1.ButtonCount - 1 do 194 180 ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
Note:
See TracChangeset
for help on using the changeset viewer.