Changeset 95 for trunk/Forms/UFormImportFormat.pas
- Timestamp:
- Aug 17, 2016, 11:20:37 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormImportFormat.pas
r31 r95 80 80 NewImportPattern: TImportPattern; 81 81 begin 82 NewImportPattern := TImportPattern.Create; 83 FormImportPattern.Load(NewImportPattern); 84 if FormImportPattern.ShowModal = mrOk then begin 85 FormImportPattern.Save(NewImportPattern); 86 ImportFormat.ItemPatterns.Add(NewImportPattern); 87 NewImportPattern := nil; 88 ReloadList; 89 end; 90 if Assigned(NewImportPattern) then NewImportPattern.Free; 91 end; 92 93 procedure TFormImportFormat.AModifyExecute(Sender: TObject); 94 var 95 NewImportPattern: TImportPattern; 96 begin 97 if Assigned(ListViewItemRules.Selected) then begin 82 FormImportPattern := TFormImportPattern.Create(Self); 83 try 98 84 NewImportPattern := TImportPattern.Create; 99 NewImportPattern.Assign(ListViewItemRules.Selected.Data);100 85 FormImportPattern.Load(NewImportPattern); 101 86 if FormImportPattern.ShowModal = mrOk then begin 102 87 FormImportPattern.Save(NewImportPattern); 103 TImportPattern(ListViewItemRules.Selected.Data).Assign(NewImportPattern); 88 ImportFormat.ItemPatterns.Add(NewImportPattern); 89 NewImportPattern := nil; 104 90 ReloadList; 105 91 end; 106 92 if Assigned(NewImportPattern) then NewImportPattern.Free; 93 finally 94 FreeAndNil(FormImportPattern); 95 end; 96 end; 97 98 procedure TFormImportFormat.AModifyExecute(Sender: TObject); 99 var 100 NewImportPattern: TImportPattern; 101 begin 102 FormImportPattern := TFormImportPattern.Create(Self); 103 try 104 if Assigned(ListViewItemRules.Selected) then begin 105 NewImportPattern := TImportPattern.Create; 106 NewImportPattern.Assign(ListViewItemRules.Selected.Data); 107 FormImportPattern.Load(NewImportPattern); 108 if FormImportPattern.ShowModal = mrOk then begin 109 FormImportPattern.Save(NewImportPattern); 110 TImportPattern(ListViewItemRules.Selected.Data).Assign(NewImportPattern); 111 ReloadList; 112 end; 113 if Assigned(NewImportPattern) then NewImportPattern.Free; 114 end; 115 finally 116 FreeAndNil(FormImportPattern); 107 117 end; 108 118 end;
Note:
See TracChangeset
for help on using the changeset viewer.