(Sender: TObject);
Var h: integer; f: textfile; s: string; dlg: Word;
begin
AssignFile (f, dir + ' nzak.txt');
Reset (f);
Read (f, s);
nzak: = StrToInt (s);
nzak: = nzak +1;
s: = IntToStr (nzak);
CloseFile (f);
rewrite (f);
write (f, s);
closefile (f);
Form1.RichEdit1.Lines.SaveToFile (dir + ' БД ' + fiozak + '(№' + inttostr (nzak) + ')' + '. rtf');
dlg: = MessageDlg ('Ви хочете зберегти замовлення?', mtConfirmation, mbYesNoCancel, 0);
if dlg = mrYes then
QuickRep1.PrintBackground else
for h: = 1 to 6 do
image1.Picture.SaveToFile (dir + ' temp ' + inttostr (h) + '. bmp');
Form1.RichEdit1.Lines.Clear; Close; end;
procedure TForm10.SpeedButton2Click (Sender: TObject);
begin
QuickRep1.Preview; end; end.
unit Unit11;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, Spin, jpeg, ExtCtrls;
type
TForm11 = class (TForm)
Image1: TImage; SpeedButton2: TSpeedButton; SpeedButton1: TSpeedButton;
Label1: TLabel; SpinEdit1: TSpinEdit; procedure SpeedButton1Click (Sender: TObject);
procedure SpeedButton2Click (Sender: TObject);
private
{Private declarations}
public
{Public declarations}
end;
var Form11: TForm11;
implementation
uses Unit16, Unit1;
{$ R *. dfm}
procedure TForm11.SpeedButton1Click (Sender: TObject);
begin close; end;
procedure TForm11.SpeedButton2Click (Sender: TObject);
begin
kolok: = SpinEdit1.Value;
form16.show;
SpinEdit1.Value: = 1; close; end; end.
unit Unit12;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, Spin, Mask, ComCtrls, Grids, jpeg, ExtCtrls, ShellAPI, Unit1;
type
TForm12 = class (TForm)
GroupBox2: TGroupBox; Label1: TLabel; Image1: TImage;
SpeedButton4: TSpeedButton; RichEdit1: TRichEdit; SpeedButton2: TSpeedButton;
SpeedButton1: TSpeedButton; SpeedButton5: TSpeedButton; ListBox1: TListBox;
procedure SpeedButton1Click (Sender: TObject);
procedure SpeedButton4Click (Sender: TObject);
procedure SpeedButton5Click (Sender: TObject);
procedure ListBox1Enter (Sender: TObject);
procedure FormKeyPress (Sender: TObject; var Key: Char);
procedure FormShow (Sender: TObject);
private
FPrefix: array [0 .. 255] of char;
{Private declarations}
public
{Public declarations}
end;
var Form12: TForm12; Count: integer;
implementation
{$ R *. dfm}
procedure TForm12.SpeedButton1Click (Sender: TObject);
begin close; end;
procedure TForm12.SpeedButton4Click (Sender: TObject);
begin
richedit1.Lines.LoadFromFile (dir + ' БД ' + listbox1.Items.Strings [listbox1.ItemIndex]);
end;
procedure TForm12.SpeedButton5Click (Sender: TObject);
begin
RichEdit1.Print ('Роздруківка замовлення');
end;
procedure TForm12.ListBox1Enter (Sender: TObject);
begin
FPrefix [0]: = # 0;
Label1.Caption: = StrPas (FPrefix);
end;
procedure TForm12.FormKeyPress (Sender: TObject; var Key: Char);
Var curKey: array [0 .. 1] of char;
ndx: integer;
begin
if ActiveControl = ListBox1 then begin
if key = # 8 {Backspace (клавіша повернення)} then begin
if FPrefix [0] <> # 0 then begin
FPrefix [StrLen (FPrefix) - 1]: = # 0; end end else begin
curKey [0]: = Key;
curKey [1]: = # 0;
StrCat (FPrefix, curKey);
ndx: = SendMessage (ListBox1.Handle, LB_FINDSTRING,
-1, longint (@ FPrefix));
if ndx <> LB_ERR then
ListBox1.ItemIndex: = ndx; end;
Label1.Caption: = StrPas (FPrefix);
Key: = # 0; end; end;
procedure TForm12.FormShow (Sender: TObject);
var F: TSearchRec; Path: string; Attr: Integer;
begin
Path: = dir + ' БД *. rtf';
Attr: = faAnyFile;
FindFirst (Path, Attr, F);
if F.name <>'' then
begin
ListBox1.Items.Add (F.name); {Додавання в TListBox імені знайденого файлу}
while FindNext (F) = 0 do
ListBox1.Items.Add (F.name); end; FindClose (F); end; end. br/>
unit Unit13;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Form...