Guest User

Untitled

a guest
Feb 24th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. var All, f1, f2, f3: TStringList;
  2. i: integer;
  3. begin
  4.  
  5. All := TStringList.Create;
  6. f1 := TStringList.Create;
  7. f2 := TStringList.Create;
  8. f3 := TStringList.Create;
  9. All.LoadFromFile(OpenDialog1.FileName);
  10. for i := 0 to All.Count - 1 do
  11. begin
  12. if CheckBox1.Checked then
  13. begin
  14. if Pos(Edit1.Text, All.Strings[i]) > 0 then f1.Add(All.Strings[i]);
  15. end;
  16. if CheckBox2.Checked then
  17. begin
  18. if Pos(Edit2.Text, All.Strings[i]) > 0 then f2.Add(All.Strings[i]);
  19. end;
  20. if CheckBox3.Checked then
  21. begin
  22. if Pos(Edit3.Text, All.Strings[i]) > 0 then f3.Add(All.Strings[i]);
  23. end;
  24. end;
  25. All.Free;
  26. if CheckBox1.Checked then
  27. begin
  28. f1.SaveToFile('Organization.txt');
  29. end;
  30. if CheckBox2.Checked then
  31. begin
  32. f2.SaveToFile('Working.txt');
  33. end;
  34. if CheckBox3.Checked then
  35. begin
  36. f3.SaveToFile('Types.txt');
  37. end;
  38. f1.Free;
  39. f2.Free;
  40. f3.Free;
  41. end;
Add Comment
Please, Sign In to add comment