vrLength := Length(Text);
vrPos := Pos(',', Text);
vrSelStart := SelStart; end;
case Key of '0'..'9':
begin
if (vrPos > 0) and (vrLength - vrPos > I) and (vrSelStart >= vrPos) then
Key := #0; end; ',', '.':
begin
if (vrPos > 0) or (vrSelStart = 0) or (vrLength = 0) then
Key := #0 else Key := #44; end; #8: ; else Key := #0; end;end;
procedure TForm9.Edit5KeyPress(Sender: TObject; var Key: Char);
var vrPos, vrLength, vrSelStart: byte;
const I: byte = 1;
begin
with Sender as TEdit do
begin
vrLength := Length(Text);
vrPos := Pos(',', Text);
vrSelStart := SelStart; end;
case Key of '0'..'9':
begin
if (vrPos > 0) and (vrLength - vrPos > I) and (vrSelStart >= vrPos) then
Key := #0; end; ',', '.':
begin
if (vrPos > 0) or (vrSelStart = 0) or (vrLength = 0) then
Key := #0 else Key := #44; end; #8: ; else Key := #0; end;end;end.
unit Unit10;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, QRCtrls, QuickRpt, ExtCtrls, StdCtrls, QRPrntr, ImgList, Buttons,
RpBase, RpSystem, RpDefine, RpRave;
type
TForm10 = class(TForm)
QuickRep1: TQuickRep; QRSubDetail1: TQRSubDetail; QRLabel5: TQRLabel;
QRRichText1: TQRRichText; QRLabel1: TQRLabel; QRLabel2: TQRLabel;
QRLabel3: TQRLabel; QRImage1: TQRImage; QRImage2: TQRImage;
QRImage3: TQRImage; QRImage4: TQRImage; QRImage5: TQRImage;
QRImage6: TQRImage; Image1: TImage; SpeedButton2: TSpeedButton;
SpeedButton1: TSpeedButton; procedure FormCreate(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var Form10: TForm10; nzak:integer;
implementation
uses Unit1,unit7;
{$R *.dfm}
procedure TForm10.FormCreate(Sender: TObject);
begin QrrichText1.ParentRichEdit:=Form1.RichEdit1; end;
procedure TForm10.SpeedButton1Click(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.
unit Unit13;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, StdCtrls, Buttons, unit1,jpeg, ExtCtrls;
type
TForm13 = class(TForm)
Image1: TImage; SpeedButton3: TSpeedButton; SpeedButton2: TSpeedButton;
SpeedButton1: TSpeedButton; StringGrid1: TStringGrid;Label2: TLabel;Label3: TLabel;
Label1: TLabel; procedure FormCreate(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
procedure SpeedButton3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var Form13: TForm13;
implementation
{$R *.dfm}
procedure TForm13.FormCreate(Sender: TObject);
begin
Form13.StringGrid1.Cells[0,0]:='Наименование';
Form13.StringGrid1.Cells[0,1]:='Глухой модуль';
Form13.StringGrid1.Cells[0,2]:='Поворотный модуль';
Form13.StringGrid1.Cells[0,3]:='Поворотно-откидной';
Form13.StringGrid1.Cells[0,4]:='Входная дверь';
Form13.StringGrid1.Cells[0,5]:='Балконная поворотная';
Form13.StringGrid1.Cells[0,6]:='Поворотно-откидная ';
Form13.StringGrid1.Cells[1,0]:='Высота(мм)';
Form13.StringGrid1.Cells[2,0]:='Ширина(мм)';
Form13.StringGrid1.Cells[3,0]:='Высота(мм)';
Form13.StringGrid1.Cells[4,0]:='Ширина(мм)';end;
procedure TForm13.SpeedButton1Click(Sender: TObject);
begin
Form13.StringGrid1.Cells[1,1]:=inttostr(470);
Form13.StringGrid1.Cells[1,2]:=inttostr(520);
Form13.StringGrid1.Cells[1,3]:=inttostr(520);
Form13.StringGrid1.Cells[1,4]:=inttostr(1000);
Form13.StringGrid1.Cells[1,5]:=inttostr(410);
Form13.StringGrid1.Cells[1,6]:=inttostr(410);
Form13.StringGrid1.Cells[2,1]:=inttostr(400);
Form13.StringGrid1.Cells[2,2]:=inttostr(410);
Form13.StringGrid1.Cells[2,3]:=inttostr(410);
Form13.StringGrid1.Cells[2,4]:=inttostr(530);
Form13.StringGrid1.Cells[2,5]:=inttostr(410);
Form13.StringGrid1.Cells[2,6]:=inttostr(410);
Form13.StringGrid1.Cells[3,1]:=inttostr(2135);
Form13.StringGrid1.Cells[3,2]:=inttostr(2250);
Form13.StringGrid1.Cells[3,3]:=inttostr(2250);
Form13.StringGrid1.Cells[3,4]:=inttostr(2250);
Form13.StringGrid1.Cells[3,5]:=inttostr(2250);
Form13.StringGrid1.Cells[3,6]:=inttostr(2250);
Form13.StringGrid1.Cells[4,1]:=inttostr(2135);
Form13.StringGrid1.Cells[4,2]:=inttostr(800);
Form13.StringGrid1.Cells[4,3]:=inttostr(800);
Form13.StringGrid1.Cells[4,4]:=inttostr(990);
Form13.StringGrid1.Cells[4,5]:=inttostr(800);
Form13.StringGrid1.Cells[4,6]:=inttostr(800);end;
procedure TForm13.SpeedButton2Click(Sender: TObject);
Var s:string;f:textfile;
begin
{$I-}
AssignFile(f,dir+'\Технические допуски\');
{$I+}
If IOResult=0 then begin
s:=dir+'\Технические допуски\';
Rewrite(f,s+'\Глухой модуль.dat');
Writeln(f,Form13.StringGrid1.Cells[1,1]);
Writeln(f,Form13.StringGrid1.Cells[2,1]);
Writeln(f,Form13.StringGrid1.Cells[3,1]);
Writeln(f,Form13.StringGrid1.Cells[4,1]);
CloseFile(f);
Rewrite(f,s+'\Поворотный модуль.dat');
Writeln(f,Form13.StringGrid1.Cells[1,2]);
Writeln(f,Form13.StringGrid1.Cells[2,2]);
Writeln(f,Form13.StringGrid1.Cells[3,2]);
Writeln(f,Form13.StringGrid1.Cells[4,2]);
CloseFile(f);
Rewrite(f,s+'\Поворотно-откидной.dat');
Writeln(f,Form13.StringGrid1.Cells[1,3]);
Writeln(f,Form13.StringGrid1.Cells[2,3]);
Writeln(f,Form13.StringGrid1.Cells[3,3]);
Writeln(f,Form13.StringGrid1.Cells[4,3]);
CloseFile(f);
Rewrite(f,s+'\Входная дверь.dat');
Writeln(f,Form13.StringGrid1.Cells[1,4]);
Writeln(f,Form13.StringGrid1.Cells[2,4]);
Writeln(f,Form13.StringGrid1.Cells[3,4]);
Writeln(f,Form13.StringGrid1.Cells[4,4]);
CloseFile(f);
Rewrite(f,s+'\Балконная поворотная.dat');
Writeln(f,Form13.StringGrid1.Cells[1,5]);
Writeln(f,Form13.StringGrid1.Cells[2,5]);
Writeln(f,Form13.StringGrid1.Cells[3,5]);
Writeln(f,Form13.StringGrid1.Cells[4,5]);
CloseFile(f);
Rewrite(f,s+'\Поворотно-откидная.dat');
Writeln(f,Form13.StringGrid1.Cells[1,6]);
Writeln(f,Form13.StringGrid1.Cells[2,6]);
Writeln(f,Form13.StringGrid1.Cells[3,6]);
Writeln(f,Form13.StringGrid1.Cells[4,6]);
CloseFile(f); ShowMessage('Данные сохранены успешно!');end
else Exit; end;
procedure TForm13.SpeedButton3Click(Sender: TObject);
begin close; end; end.
unit Unit14;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, Spin, jpeg, ExtCtrls;
type
TForm14 = class(TForm)
Image1: TImage; Label20: TLabel; SpinEdit1: TSpinEdit; Label1: TLabel;
SpeedButton14: TSpeedButton;
private
{ Private declarations }
public
{ Public declarations }
end;
var Form14: TForm14;
implementation
{$R *.dfm}
end.
unit Unit15;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, jpeg, ExtCtrls;
type
TForm15 = class(TForm)
Image1: TImage; RadioButton1: TRadioButton; RadioButton2: TRadioButton;
SpeedButton8: TSpeedButton; procedure SpeedButton8Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var Form15: TForm15;
implementation
uses Unit8;
{$R *.dfm}
procedure TForm15.SpeedButton8Click(Sender: TObject);
Var sum,t:real;
begin
if Form8.StringGrid2.Cells [5,1]='' then begin
If RadioButton1.Checked=true then begin
t:=strtofloat(Form8.StringGrid2.Cells [6,1]);
sum:=t+((t/100)*30);
Form8.StringGrid2.Cells [6,1]:=floattostr(sum);
Form8.StringGrid2.Cells [5,1]:='Одна сторона';
Close; end;
If RadioButton2.Checked=true then begin
t:=strtofloat(Form8.StringGrid2.Cells [6,1]);
sum:=t+((t/100)*40);
Form8.StringGrid2.Cells [6,1]:=floattostr(sum);
Form8.StringGrid2.Cells [5,1]:='Две стороны'; Close;end;end;end;end.
unit Unit16;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, unit1,Mask,ExtCtrls, jpeg, ComCtrls;
type
TForm16 = class(TForm)
Image1: TImage; Label1: TLabel;Edit1: TEdit;Edit2: TEdit;Label2: TLabel;
Label3: TLabel; Memo1: TMemo; Label6: TLabel; SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton; DateTimePicker1: TDateTimePicker;
MaskEdit2: TMaskEdit; MaskEdit3: TMaskEdit; Label8: TLabel; Label7: TLabel;
Label10: TLabel; Memo4: TMemo; Label4: TLabel;
procedure SpeedButton2Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Edit2KeyPress(Sender: TObject; var Key: Char);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var Form16: TForm16;
implementation
uses Unit10, Unit7;
{$R *.dfm}
procedure TForm16.SpeedButton2Click(Sender: TObject);
Var f: Integer;
begin
if (Edit1.Text='') or(Edit2.Text='')or(Memo1.Text='') then
Showmessage('Сначала введите необходимую информацию!') else
if(MaskEdit3.Text='')and(MaskEdit2.Text='(8) ')then
Showmessage('Введите хотя бы один номер телефона!')
else begin
fiozam:=Edit1.Text;
fiozak:=Edit2.Text;
adres:=Memo1.Text;
got:=Memo4.Text;
data:=datetostr(DateTimePicker1.Date);
domtel:=MaskEdit3.Text;
sottel:=MaskEdit2.Text;
for f := 0 to ComponentCount - 1 do begin
if (Components[f] is TEdit) then
(Components[f] as TEdit).Text:='';
if (Components[f] is TMemo) then
(Components[f] as TMemo).Text:='';
if (Components[f] is TMaskEdit) then
(Components[f] as TMaskEdit).Text:='';
form7.Show; Close; end;end;end;
procedure TForm16.SpeedButton1Click(Sender: TObject);
begin Close; end;
procedure TForm16.Edit1KeyPress(Sender: TObject; var Key: Char);
var vrLength, vrSelStart: byte;
begin
with Sender as TEdit do
begin
vrLength := Length(Text);
vrSelStart := SelStart; end;
case Key of 'А'..'Я':begin end;
'а'..'я':begin end;
#8:begin end;
#32:begin end;
#46:
else Key := #0;end;end;
procedure TForm16.Edit2KeyPress(Sender: TObject; var Key: Char);
var vrLength, vrSelStart: byte;
begin
with Sender as TEdit do
begin
vrLength := Length(Text);
vrSelStart := SelStart; end;
case Key of 'А'..'Я':begin end;
'а'..'я':begin end;
#8:begin end;
#32:begin end;
#46: else Key := #0; end;end;
procedure TForm16.FormCreate(Sender: TObject);
begin datetimepicker1.Date:=Date;end;end.
unit Unit17;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, jpeg,unit1, ExtCtrls,unit8;
type
TForm17 = class(TForm)
Image1: TImage; SpeedButton8: TSpeedButton; SpeedButton1: TSpeedButton;
ComboBox1: TComboBox; ComboBox2: TComboBox; ComboBox3: TComboBox;
RadioButton1: TRadioButton; RadioButton2: TRadioButton;
RadioButton3: TRadioButton; procedure RadioButton1Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure RadioButton3Click(Sender: TObject);
procedure SpeedButton8Click(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
procedure ComboBox2Change(Sender: TObject);
procedure ComboBox3Change(Sender: TObject);