Changeset 170 for trunk/Forms
- Timestamp:
- Jul 2, 2023, 11:07:39 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormImport.pas
r168 r170 68 68 procedure TFormImport.ComboBoxInputFormatChange(Sender: TObject); 69 69 begin 70 UpdateTableFormat;70 RedrawPending := True; 71 71 end; 72 72 … … 74 74 begin 75 75 RedrawPending := True; 76 UpdateTableFormat; 76 77 end; 77 78 … … 89 90 var 90 91 TableFormat: TTableFormat; 92 TableFormats: TTableFormats; 91 93 begin 94 Table := TTable.Create; 95 96 TableFormats := Table.GetInputFormats; 92 97 ComboBoxInputFormat.Items.BeginUpdate; 93 98 try 94 99 for TableFormat := Low(TTableFormat) to High(TTableFormat) do 95 if TableFormat <> tfListViewthen100 if TableFormat in TableFormats then 96 101 ComboBoxInputFormat.Items.AddObject(TableFormatText[TableFormat], TObject(TableFormat)); 97 102 if (ComboBoxInputFormat.ItemIndex = -1) and (ComboBoxInputFormat.Items.Count > 0) then … … 101 106 end; 102 107 103 Table := TTable.Create;104 108 LoadConfig; 105 109 UpdateTableFormat; … … 141 145 begin 142 146 FileExt := ExtractFileExt(EditInputFile.Text); 143 if FileExt = '. xml' then144 ComboBoxInputFormat.ItemIndex := ComboBoxInputFormat.Items.IndexOfObject(TObject(tf Xml))147 if FileExt = '.json' then 148 ComboBoxInputFormat.ItemIndex := ComboBoxInputFormat.Items.IndexOfObject(TObject(tfJson)) 145 149 else if FileExt = '.csv' then 146 150 ComboBoxInputFormat.ItemIndex := ComboBoxInputFormat.Items.IndexOfObject(TObject(tfCsv)) 147 else if (FileExt = '.htm') or (FileExt = '.html')then148 ComboBoxInputFormat.ItemIndex := ComboBoxInputFormat.Items.IndexOfObject(TObject(tf Html));151 else if FileExt = '.txt' then 152 ComboBoxInputFormat.ItemIndex := ComboBoxInputFormat.Items.IndexOfObject(TObject(tfMediaWiki)); 149 153 end; 150 154
Note:
See TracChangeset
for help on using the changeset viewer.