eclarations}
end;
var
Form1: TForm1;
implementation
uses Unit4;
// es Unit2;
{$ R *. DFM}
procedure TForm1.N2Click (Sender: TObject);
begin
With OpenDialog1 do
If Execute Then
Begin
memo1.lines.loadfromfile (Filename);
ExtractFilename (Filename);
SaveDialog1.FileName: = Filename;
Filename: ='';
End;
end;
procedure TForm1.N3Click (Sender: TObject);
begin
Memo1.Lines.SaveToFile (SaveDialog1.FileName);
end;
procedure TForm1.N4Click (Sender: TObject);
begin
with SaveDialog1 do
If execute Then
Memo1.Lines.SaveToFile (SaveDialog1.FileName);
end;
procedure TForm1.N5Click (Sender: TObject);
var list: TStringList;
tmpString: string;
i, CurrentSymbol, SeekSymbol, lastTag: integer;
notFound: boolean;
begin
With SaveDialog2 do
If execute then
Begin
list: = TStringList.Create;
for i: = 0 to memo1.Lines.Count-1 do list.Add (memo1.lines [i]);
list.Insert (0, '');
list.Add ('');
for i: = 1 to memo1.Lines.Count do
begin
lastTag: = 1; tmpString: ='';
for CurrentSymbol: = 1 to Length (List [i]) - 9 do
if Copy (List [i], CurrentSymbol, 9) = '
begin
SeekSymbol: = CurrentSymbol; notFound: = true;
while (SeekSymbol <= Length (List [i])) and (notFound) do
begin
if Copy (List [i], SeekSymbol, 1) = '>' then
begin
tmpString: = tmpString + '
' +
Copy (List [i], lastTag, CurrentSymbol-lastTag) +
'
' +
Copy (List [i], CurrentSymbol, SeekSymbol-CurrentSymbol +1) + '
';
lastTag: = SeekSymbol +1; notFound: = false;
end;
inc (SeekSymbol);
end;
end;
if tmpString <>'' then
begin
tmpString: = tmpString + '
' + Copy (List [i], lastTag, Length (List [i])-lastTag +1) + '
';
List [i]: = '' + tmpString + '';
end;
end;
List.SaveToFile (Filename);
list.Free;
End;
end;
procedure TForm1.N6Click (Sender: TObject);
// prosmotr
var list: TStringList;
tmpString: string;
i, CurrentSymbol, SeekSymbol, lastTag: integer;
notFound: boolean;
Begin
list: = TStringList.Create;
for i: = 0 to memo1.Lines.Count-1 do list.Add (memo1.lines [i]);
list.Insert (0, '');
list.Add ('');
for i: = 1 to m...