Пишем программу для создания книг FB2
Шрифт:
Height = 25
Caption = '>'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -21
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 0
OnClick = Button12Click
end
object RG: TRadioGroup
Left = 16
Top = 72
Width = 177
Height = 193
Caption = ' Styles '
ItemIndex = 0
Items.Strings = (
'Normal'
'Epigraph'
'Text-author'
'Subtitle'
'Poem'
'Citation'
'None')
TabOrder = 1
end
object GroupBox2: TGroupBox
Left = 16
Top = 0
Width = 177
Height = 65
Caption = ' Heading '
TabOrder = 2
object Button1: TButton
Left = 16
Top = 24
Width = 25
Height = 25
Caption = '-'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 0
OnClick = Button1Click
end
object Button2: TButton
Left = 72
Top = 24
Width = 33
Height = 25
Caption = 'H1'
TabOrder = 1
OnClick = Button2Click
end
object Button5: TButton
Left = 128
Top = 24
Width = 25
Height = 25
Caption = '+'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -19
Font.Name = 'MS Sans Serif'
Font.Style = []
ParentFont = False
TabOrder = 2
OnClick = Button5Click
end
end
end
object ListBox1: TListBox
Left = 265
Top = 41
Width = 441
Height = 348
Align = alClient
Font.Charset = RUSSIAN_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Courier'
Font.Style = []
ItemHeight = 13
ParentFont = False
TabOrder = 2
OnClick = ListBox1Click
OnDblClick = ListBox1DblClick
end
end
object TabSheet4: TTabSheet
Caption = 'End Notes'
ImageIndex = 4
object Panel4: TPanel
Left = 0
Top = 0
Width = 706
Height = 41
Align = alTop
TabOrder = 0
object Button3: TButton
Left = 8
Top = 8
Width = 105
Height = 25
Caption = 'Load End Notes'
TabOrder = 0
OnClick = Button3Click
end
end
object EndNotesList: TListBox
Left = 0
Top = 41
Width = 706
Height = 348
Align = alClient
ItemHeight = 13
TabOrder = 1
end
end
end
object MainMenu1: TMainMenu
Left = 208
Top = 32
object File1: TMenuItem
Caption = 'File'
object Open1: TMenuItem
Caption = 'Open'
OnClick = Open1Click
end
object SaveasFB21: TMenuItem
Caption = 'Save as FB2'
OnClick = SaveasFB21Click
end
end
end
object OpenDialog1: TOpenDialog
Filter = 'Text|*.txt|Any file|*.*'
FilterIndex = 2
Left = 240
Top = 32
end
object SaveDialog1: TSaveDialog
Filter = 'FB2 |*.fb2'
Left = 272
Top = 32
end
end
//
Код файла Unit1.pas соответствующего Form1
// начало кода
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Menus, CheckLst, ComCtrls,
genres, UmFB2, dm, authors;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
File1: TMenuItem;
Open1: TMenuItem;
SaveasFB21: TMenuItem;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
Annotation: TMemo;
TabSheet3: TTabSheet;
Lurl: TLabel;
LID: TLabel;
Lversion: TLabel;
url: TEdit;
id: TEdit;
version: TEdit;
TabSheet6: TTabSheet;
LISBN: TLabel;
LBook_name: TLabel;
Lpublisher: TLabel;
Lcity: TLabel;
Lyear: TLabel;
isbn: TEdit;
Book_name: TEdit;
publisher: TEdit;
year: TEdit;
city: TEdit;
TabSheet2: TTabSheet;
Panel1: TPanel;
Panel2: TPanel;
Button12: TButton;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
ListBox1: TListBox;
TabSheet4: TTabSheet;
Panel4: TPanel;
Button3: TButton;
EndNotesList: TListBox;
RG: TRadioGroup;
Panel3: TPanel;
Lbook_title: TLabel;
LProject: TLabel;
LAnnotation: TLabel;
Lsequence: TLabel;
LLang: TLabel;
Lsrc_lang: TLabel;
LTome: TLabel;
book_title: TEdit;
FB2_file: TEdit;
Au: TGroupBox;
ListBox3: TListBox;
Button10: TButton;