Changeset 95 for trunk/Forms/UFormImportSource.pas
- Timestamp:
- Aug 17, 2016, 11:20:37 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormImportSource.pas
r89 r95 72 72 NewImportFormat := TImportFormat.Create; 73 73 NewImportFormat.Assign(TImportFormat(ComboBox1.Items.Objects[ComboBox1.ItemIndex])); 74 FormImportFormat.Load(NewImportFormat); 75 if FormImportFormat.ShowModal = mrOk then begin 76 FormImportFormat.Save(NewImportFormat); 77 TImportFormat(ComboBox1.Items.Objects[ComboBox1.ItemIndex]).Assign(NewImportFormat); 78 Core.AcronymDb.Modified := True; 79 ComboBox1.Items.Strings[ComboBox1.ItemIndex] := NewImportFormat.Name; 74 FormImportFormat := TFormImportFormat.Create(Self); 75 try 76 FormImportFormat.Load(NewImportFormat); 77 if FormImportFormat.ShowModal = mrOk then begin 78 FormImportFormat.Save(NewImportFormat); 79 TImportFormat(ComboBox1.Items.Objects[ComboBox1.ItemIndex]).Assign(NewImportFormat); 80 Core.AcronymDb.Modified := True; 81 ComboBox1.Items.Strings[ComboBox1.ItemIndex] := NewImportFormat.Name; 82 end; 83 if Assigned(NewImportFormat) then NewImportFormat.Free; 84 finally 85 FreeAndNil(FormImportFormat); 80 86 end; 81 if Assigned(NewImportFormat) then NewImportFormat.Free;82 87 end; 83 88 end; … … 97 102 I: Integer; 98 103 begin 99 FormCategorySelect.Load(ListBox1.Items); 100 if FormCategorySelect.ShowModal = mrOk then begin 101 for I := 0 to FormCategorySelect.ListBox1.Count - 1 do 102 if FormCategorySelect.ListBox1.Selected[I] then begin 103 ListBox1.Items.AddObject(FormCategorySelect.ListBox1.Items[I], FormCategorySelect.ListBox1.Items.Objects[I]); 104 end; 104 FormCategorySelect := TFormCategorySelect.Create(Self); 105 try 106 FormCategorySelect.Load(ListBox1.Items); 107 if FormCategorySelect.ShowModal = mrOk then begin 108 for I := 0 to FormCategorySelect.ListBox1.Count - 1 do 109 if FormCategorySelect.ListBox1.Selected[I] then begin 110 ListBox1.Items.AddObject(FormCategorySelect.ListBox1.Items[I], FormCategorySelect.ListBox1.Items.Objects[I]); 111 end; 112 end; 113 finally 114 FreeAndNil(FormCategorySelect); 105 115 end; 106 116 end;
Note:
See TracChangeset
for help on using the changeset viewer.