От: | cyber-bat | ||
Дата: | 14.03.16 18:55 | ||
Оценка: |
program DocManager;
begin
RequireDerivedFormResource := True;
Application.Initialize;
Application.CreateForm(TmFrm, mFrm);
Application.CreateForm(TiFrm, iFrm);
Application.Run;
end.
unit main;
procedure TmFrm.FormCreate(Sender: TObject); { создание формы }
begin
records := TRecords.Create;
end;
procedure TmFrm.mAddFileClick(Sender: TObject); { меню добавления файла }
var
i: cardinal;
begin
iFrm.rd := @records;
if iFrm.ShowModal = mrClose then
begin
i := 1;
with records do
begin
stringgrid1.RowCount := records.count+1;
cur := top;
while cur<>nil do
begin
stringgrid1.Cells[1,i] := cur^.bAuth;
stringgrid1.Cells[2,i] := cur^.bName;
stringgrid1.Cells[3,i] := cur^.bPubl;
stringgrid1.Cells[4,i] := cur^.bTown;
stringgrid1.Cells[5,i] := cur^.bYear;
stringgrid1.Cells[6,i] := cur^.bPage;
stringgrid1.Cells[7,i] := cur^.bNote;
stringgrid1.Cells[8,i] := cur^.bKwrd;
stringgrid1.Cells[9,i] := cur^.bPath;
stringgrid1.Update;
cur := cur^.next;
inc(i);
end;
end;
end;
end;
unit input;
interface
uses
Classes, SysUtils, FileUtil, Forms, Graphics, Controls, ExtCtrls,
Dialogs, Buttons, StdCtrls, def, Windows, ComObj, LazUTF8, cef3lcl;
const
wdPageFitNone = $00000000;
wdPageFitFullPage = $00000001;
wdPageFitBestFit = $00000002;
wdPageFitTextFit = $00000003;
type
{ TiFrm }
TiFrm = class(TForm)
bClose: TBitBtn;
Chromium1: TChromium;
ePath: TEdit;
Label1: TLabel;
Label2: TLabel;
eAuth: TLabeledEdit;
eName: TLabeledEdit;
ePubl: TLabeledEdit;
eTown: TLabeledEdit;
eYear: TLabeledEdit;
ePage: TLabeledEdit;
eNote: TMemo;
eKwrd: TMemo;
oDlg: TOpenDialog;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
sPrev: TSpeedButton;
sNext: TSpeedButton;
sTick: TSpeedButton;
dBtn: TSpeedButton;
private
{ private declarations }
public
{ public declarations }
rd: PRecords;
end;
var
iFrm: TiFrm;
implementation
{$R *.lfm}
{ TiFrm }
end.