- Регистрация
- 1 Мар 2015
- Сообщения
- 1,185
- Баллы
- 155
To begin with we throw in the form of 3 Memo, 4 buttons, OpenDialog and SaveDialog.
Button "Load passwords" all the same one for Memo2:
We now turn to the actual primary key in our code "glue":
Well, the last button to save:
Код:
begin
If OpenDialog1.Execute then // Open the file selection window
begin
Memo1.Lines.LoadFromFile(OpenDialog1.FileName); // After selecting the file in the ship Memo1
end;
end;
Код:
begin
If OpenDialog1.Execute then
begin
Memo2.Lines.LoadFromFile(OpenDialog1.FileName); // After selecting the file in the ship Memo2
end;
end;
Код:
var
i,s: integer; // Declare two numeric variables for the cycle.
begin
for i := 0 to Memo1.Lines.Count -1 do
begin // The last line is empty, so it is "-1"
for s := 0 to Memo2.Lines.Count -1 do
begin // Here we use nested loops
Memo3.Lines.Add(Memo1.Lines.Strings + ':' + Memo2.Lines.Strings); // connecting
end;
end;
end;
Код:
begin
if SaveDialog1.Execute then
begin// Open the window to select where to save the file
Memo3.Lines.SaveToFile(SaveDialog1.FileName); // After you select to save the contents Memo3...
end;
end;
Последнее редактирование: