');
end;
procedure SaveEndnotes;
var
S: string;
i: integer;
begin
if Form1.EndNotesList.Items.Count = 0 then exit; //[1]
OutList.Add('
Примечания
for i:= 0 to Form1.EndNotesList.Items.Count - 1 do
begin
S:= Form1.EndNotesList.Items[i];
OutList.Add(' '+IntToStr(i+1)+'
OutList.Add('
'+S+'
');OutList.Add('');
end;
OutList.Add('
');
end;
Procedure Make_fb2(S: string);
begin //
if Form1.ListBox1.Items.Count = 0 then exit;
SytleStack.Clear;
OutList.Clear;
SaveDescription;
SaveBodyFB2;
SaveEndnotes;
OutList.Add('');
OutList.SaveToFile(S); //++ +
showMessage('Done.');
end;
function BookHaveName: boolean;
begin
with Form1 do
result:= (book_title.Text <> '') and
(FB2_file.Text <> '') and
(GenresBox.Count > 0);
end;
procedure TForm1.SaveasFB21Click(Sender: TObject);
begin
if not BookHaveName then
begin
PageControl1.ActivePageIndex:= 0;
ShowMessage('Fill the form.');
exit;
end;
SaveDialog1.FileName:= form1.FB2_file.Text;