Changeset 219 for trunk/Forms/FormCheck.pas
- Timestamp:
- Jan 17, 2025, 9:05:54 PM (4 days ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormCheck.pas
r218 r219 1 unit UFormCheck; 2 3 {$mode delphi} 1 unit FormCheck; 4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, LazFileUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ExtCtrls, ComCtrls, Menus, ActnList, UAcronym, URegistry, Registry, UCommon,10 fgl;7 ExtCtrls, ComCtrls, Menus, ActnList, Acronym, RegistryEx, Registry, Common, 8 Generics.Collections; 11 9 12 10 type … … 21 19 { TReportItems } 22 20 23 TReportItems = class(T FPGObjectList<TReportItem>)21 TReportItems = class(TObjectList<TReportItem>) 24 22 function AddNew(Message: string; Position: TPoint; 25 23 Kind: TReportType = rtNone): TReportItem; … … 65 63 procedure ButtonCheckClick(Sender: TObject); 66 64 procedure ButtonLoadFromFileClick(Sender: TObject); 67 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);68 65 procedure FormCreate(Sender: TObject); 69 66 procedure FormDestroy(Sender: TObject); … … 98 95 end; 99 96 100 var101 FormCheck: TFormCheck;102 103 97 const 104 98 ReportTypeString: array[TReportType] of string = ('', 'Note', 'Warning', 'Error'); … … 110 104 111 105 uses 112 UFormAcronyms, UCore;106 FormAcronyms, Core; 113 107 114 108 resourcestring … … 198 192 end; 199 193 200 procedure TFormCheck.FormClose(Sender: TObject; var CloseAction: TCloseAction);201 begin202 Core.PersistentForm1.Save(Self);203 end;204 205 194 procedure TFormCheck.FormCreate(Sender: TObject); 206 195 begin 207 196 AcronymDbSummary := TAcronymDb.Create; 208 197 AcronymDbContent := TAcronymDb.Create; 209 Core.Translator.TranslateComponentRecursive(Self);210 Core.ThemeManager.UseTheme(Self);211 198 ReportItems := TReportItems.Create; 212 199 end; … … 214 201 procedure TFormCheck.FormDestroy(Sender: TObject); 215 202 begin 216 ReportItems.Free;217 AcronymDbSummary.Free;218 AcronymDbContent.Free;203 FreeAndNil(ReportItems); 204 FreeAndNil(AcronymDbSummary); 205 FreeAndNil(AcronymDbContent); 219 206 end; 220 207 … … 222 209 begin 223 210 PageControl1.TabIndex := 0; 224 Core.PersistentForm1.Load(Self);225 211 if FileExists(LastDocumentFileName) then 226 212 MemoDocument.Lines.LoadFromFile(LastDocumentFileName); … … 724 710 with TRegistryEx.Create do 725 711 try 726 RootKey := RegistryRootHKEY[Core. ApplicationInfo1.RegistryRoot];727 OpenKey(Core. ApplicationInfo1.RegistryKey, True);712 RootKey := RegistryRootHKEY[Core.Core.ApplicationInfo1.RegistryRoot]; 713 OpenKey(Core.Core.ApplicationInfo1.RegistryKey, True); 728 714 EditSummaryStart.Text := ReadStringWithDefault('SummaryStart', 'ACRONYMS AND ABBREVIATIONS'); 729 715 EditSummaryEnd.Text := ReadStringWithDefault('SummaryEnd', 'Appendix'); … … 739 725 with TRegistryEx.Create do 740 726 try 741 RootKey := RegistryRootHKEY[Core. ApplicationInfo1.RegistryRoot];742 OpenKey(Core. ApplicationInfo1.RegistryKey, True);727 RootKey := RegistryRootHKEY[Core.Core.ApplicationInfo1.RegistryRoot]; 728 OpenKey(Core.Core.ApplicationInfo1.RegistryKey, True); 743 729 WriteString('SummaryStart', EditSummaryStart.Text); 744 730 WriteString('SummaryEnd', EditSummaryEnd.Text);
Note:
See TracChangeset
for help on using the changeset viewer.