Changeset 227 for trunk/Forms/FormExport.pas
- Timestamp:
- Jan 20, 2025, 11:38:55 AM (42 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormExport.pas
r221 r227 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 7 JobProgressView, FormEx ;7 JobProgressView, FormEx, Acronym; 8 8 9 9 type … … 15 15 ButtonSaveToFile: TButton; 16 16 ComboBoxDataFormat: TComboBox; 17 JobProgressView1: TJobProgressView; 17 18 Label1: TLabel; 18 19 Memo1: TMemo; … … 26 27 procedure JobExportMediaWiki(Job: TJob); 27 28 procedure JobExportMediaWikiTable(Job: TJob); 29 public 30 AcronymDb: TAcronymDb; 28 31 end; 29 32 … … 32 35 33 36 {$R *.lfm} 34 35 uses36 Core, Acronym;37 37 38 38 resourcestring … … 57 57 J: Integer; 58 58 begin 59 Job.Progress.Max := Core.Core.AcronymDb.Acronyms.Count;59 Job.Progress.Max := AcronymDb.Acronyms.Count; 60 60 ItemCount := 0; 61 61 Content := ''; 62 for I := 0 to Core.Core.AcronymDb.Acronyms.Count - 1 do63 with Core.Core.AcronymDb.Acronyms[I] do begin62 for I := 0 to AcronymDb.Acronyms.Count - 1 do 63 with AcronymDb.Acronyms[I] do begin 64 64 for J := 0 to Meanings.Count - 1 do 65 65 with Meanings[J] do begin … … 77 77 J: Integer; 78 78 begin 79 Job.Progress.Max := Core.Core.AcronymDb.Acronyms.Count;79 Job.Progress.Max := AcronymDb.Acronyms.Count; 80 80 ItemCount := 0; 81 81 Content := ''; 82 for I := 0 to Core.Core.AcronymDb.Acronyms.Count - 1 do83 with Core.Core.AcronymDb.Acronyms[I] do begin82 for I := 0 to AcronymDb.Acronyms.Count - 1 do 83 with AcronymDb.Acronyms[I] do begin 84 84 Content := Content + '; ' + Name + LineEnding; 85 85 for J := 0 to Meanings.Count - 1 do … … 98 98 J: Integer; 99 99 begin 100 Job.Progress.Max := Core.Core.AcronymDb.Acronyms.Count;100 Job.Progress.Max := AcronymDb.Acronyms.Count; 101 101 ItemCount := 0; 102 102 Content := '{| class="wikitable sortable"' + LineEnding + 103 103 '! Name !! Meaning !! Description !! Categories' + LineEnding; 104 for I := 0 to Core.Core.AcronymDb.Acronyms.Count - 1 do105 with Core.Core.AcronymDb.Acronyms[I] do begin104 for I := 0 to AcronymDb.Acronyms.Count - 1 do 105 with AcronymDb.Acronyms[I] do begin 106 106 for J := 0 to Meanings.Count - 1 do 107 107 with Meanings[J] do begin … … 120 120 begin 121 121 if ComboBoxDataFormat.ItemIndex = 0 then 122 Core.Core.JobProgressView1.AddJob(SExporting, JobExportCSV);122 JobProgressView1.AddJob(SExporting, JobExportCSV); 123 123 if ComboBoxDataFormat.ItemIndex = 1 then 124 Core.Core.JobProgressView1.AddJob(SExporting, JobExportMediaWiki);124 JobProgressView1.AddJob(SExporting, JobExportMediaWiki); 125 125 if ComboBoxDataFormat.ItemIndex = 2 then 126 Core.Core.JobProgressView1.AddJob(SExporting, JobExportMediaWikiTable);127 Core.Core.JobProgressView1.Start;126 JobProgressView1.AddJob(SExporting, JobExportMediaWikiTable); 127 JobProgressView1.Start; 128 128 Memo1.Lines.Text := Content; 129 129 ShowMessage(Format(SExportedAcronyms, [ItemCount]));
Note:
See TracChangeset
for help on using the changeset viewer.