Xreferat.com » Рефераты по информатике и программированию » Расчет стоимости пластиковых оконных конструкций и дверей

Расчет стоимости пластиковых оконных конструкций и дверей

class(TForm)

Panel1: TPanel; Panel2: TPanel; SpeedButton1: TSpeedButton;

SpeedButton2: TSpeedButton; SpeedButton3: TSpeedButton;

SpeedButton5: TSpeedButton; SpeedButton6: TSpeedButton;

SpeedButton9: TSpeedButton; SpeedButton10: TSpeedButton;

Image1: TImage; SpeedButton7: TSpeedButton; SpeedButton8: TSpeedButton;

ComboBox1: TComboBox; Label4: TLabel;Label3: TLabel;

ComboBox3: TComboBox; Label2: TLabel; ComboBox2: TComboBox;

UpDown1: TUpDown; UpDown2: TUpDown; Image2: TImage;

OpenDialog1: TOpenDialog; SpeedButton4: TSpeedButton;

SpeedButton14: TSpeedButton; SpeedButton15: TSpeedButton;

SpeedButton16: TSpeedButton; SpeedButton11: TSpeedButton;

SpeedButton12: TSpeedButton; SpeedButton13: TSpeedButton;

SpeedButton17: TSpeedButton; Label1: TLabel; Label5: TLabel; Label6: TLabel;

Label7: TLabel;

procedure SpeedButton1Click(Sender: TObject);

procedure SpeedButton2Click(Sender: TObject);

procedure SpeedButton3Click(Sender: TObject);

procedure SpeedButton4Click(Sender: TObject);

procedure SpeedButton5Click(Sender: TObject);

procedure SpeedButton6Click(Sender: TObject);

procedure Panel2MouseDown(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure ComboBox1Change(Sender: TObject);

procedure FormCreate(Sender: TObject);

procedure SpeedButton8Click(Sender: TObject);

procedure SpeedButton9Click(Sender: TObject);

procedure UpDown1Click(Sender: TObject; Button: TUDBtnType);

procedure UpDown2Click(Sender: TObject; Button: TUDBtnType);

procedure SpeedButton11Click(Sender: TObject);

procedure SpeedButton13Click(Sender: TObject);

procedure SpeedButton12Click(Sender: TObject);

procedure SpeedButton14Click(Sender: TObject);

procedure SpeedButton15Click(Sender: TObject);

procedure SpeedButton16Click(Sender: TObject);

procedure SpeedButton17Click(Sender: TObject);

procedure SpeedButton10Click(Sender: TObject);

procedure SpeedButton7Click(Sender: TObject);

procedure FormShow(Sender: TObject);

private

{ Private declarations }

public

procedure CmFocusChanged (var Msg: TCmFocusChanged);

message cm_FocusChanged;

{ Public declarations }

end; const n=15 ;

var Form7: TForm7; j,pay1,okn,tek:integer; b1 : TBitBtn; fail,put,Activ,odn:string;

Msg1: TCmFocusChanged; nam:string;

implementation

uses Unit9, Unit8;

{$R *.dfm}

procedure TForm7.CmFocusChanged (var Msg: TCmFocusChanged);

begin Msg1:=Msg; end;

procedure TForm7.SpeedButton1Click(Sender: TObject);

begin

b1 := TBitBtn.Create(Self);

nam:=nam+'#Глухой';

with b1 do begin

b1.Hint:='1';

Left := 20;

Top := 20;

Width := 60;

Height := 100;

Parent := Panel2;

Glyph.LoadFromFile(dir+'Иконкиглухой.bmp');end;end;

procedure TForm7.SpeedButton2Click(Sender: TObject);

begin

nam:=nam+'#Поворотный';

b1 := TBitBtn.Create(Self);

with b1 do begin

b1.Hint:='2';

Left := 20;

Top := 20;

Width := 60;

Height := 100;

Parent := Panel2;

Glyph.LoadFromFile(dir+'Иконкиповоротный.bmp');end;end;

procedure TForm7.SpeedButton3Click(Sender: TObject);

begin

nam:=nam+'#Откидной';

b1 := TBitBtn.Create(Self);

with b1 do begin

b1.Hint:='3';

Left := 20;

Top := 20;

Width := 60;

Height := 100;

Glyph.LoadFromFile(dir+'Иконкиоткидной.bmp');

Parent := Panel2;end;end;

procedure TForm7.SpeedButton4Click(Sender: TObject);

begin

nam:=nam+'#балкон1';

b1 := TBitBtn.Create(Self);

with b1 do begin

b1.Hint:='4';

Left := 20;

Top := 20;

Width := 60;

Height := 100;

Glyph.LoadFromFile(dir+'Иконкибалкон1.bmp');

Parent := Panel2;end;end;

procedure TForm7.SpeedButton5Click(Sender: TObject);

begin

nam:=nam+'#Балкон2';

b1 := TBitBtn.Create(Self);

with b1 do begin

b1.Hint:='5';

Left := 20;

Top := 20;

Width := 60;

Height := 100;

Glyph.LoadFromFile(dir+'Иконкибалкон2.bmp');

Parent := Panel2;end;end;

procedure TForm7.SpeedButton6Click(Sender: TObject);

begin

nam:=nam+'#Вход';

b1 := TBitBtn.Create(Self);

with b1 do begin

b1.Hint:='6';

Left := 20;

Top := 20;

Width := 60;

Height := 100;

Glyph.LoadFromFile(dir+'Иконкивход.bmp');

Parent := Panel2;end;end;

procedure TForm7.Panel2MouseDown(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

const

SC_DragMove = $F012; { a magic number }

begin

ReleaseCapture;

if Msg1.Sender.ClassName='TBitBtn' then

msg1.Sender.perform(WM_SysCommand, SC_DragMove, 0);

end;

procedure TForm7.ComboBox1Change(Sender: TObject);

begin

if ComboBox1.Text='Оконные модули' then begin

SpeedButton1.Visible:=True;SpeedButton2.Visible:=True;

SpeedButton14.Visible:=True;SpeedButton15.Visible:=True;

SpeedButton16.Visible:=True;SpeedButton3.Visible:=True;

SpeedButton4.Visible:=False;SpeedButton5.Visible:=False;

SpeedButton6.Visible:=False; end else begin

SpeedButton4.Visible:=True;SpeedButton5.Visible:=True;

SpeedButton6.Visible:=True;SpeedButton1.Visible:=False;

SpeedButton2.Visible:=False;SpeedButton3.Visible:=False;

SpeedButton14.Visible:=False;SpeedButton15.Visible:=False;

SpeedButton16.Visible:=False;end;end;

procedure TForm7.FormCreate(Sender: TObject);

begin okn:=1;

SpeedButton1.Visible:=False;SpeedButton2.Visible:=False;

SpeedButton3.Visible:=False;SpeedButton4.Visible:=False;

SpeedButton5.Visible:=False;SpeedButton6.Visible:=False;

SpeedButton14.Visible:=False;SpeedButton15.Visible:=False;

SpeedButton16.Visible:=False; end;

procedure TForm7.SpeedButton8Click(Sender: TObject);

begin

if (Combobox3.Text='') or (Combobox2.Text='') then

Showmessage('Укажите тип профиля и ст.-пакета')

else begin

prof:=Combobox3.Text;

spak:=Combobox2.Text;

close;end;end;

procedure TForm7.SpeedButton9Click(Sender: TObject);

var B: TBitmap; srcRect,dstRect: TRect;

begin

if (put='') or (nam='')then Showmessage('Сначала загрузите цену!!!')

else begin

B:=TBitmap.Create;

with dstRect do begin

Left:=0;

Top:=0;

Right:=Panel2.Width+1;

Bottom:=Panel2.Height+1; end;

with srcRect do begin

Left:=Panel2.Left+145;

Right:=Panel2.Left+Panel2.Width+145;

Top:=Panel2.Top+10;

Bottom:=Panel2.Top+Panel2.Height+10; end;

B.Width:=Panel2.Width;

B.Height:=Panel2.Height;

B.Canvas.CopyRect(dstRect,Self.Canvas,srcRect);

B.PixelFormat:=pf1bit;

B.SaveToFile(dir+'temp'+inttostr(okn)+'.bmp');

B.Free;form8.Show;end;end;

procedure TForm7.UpDown1Click(Sender: TObject; Button: TUDBtnType);

begin

if Msg1.Sender.ClassName='TBitBtn' then

msg1.Sender.Width:=UpDown1.Position*3;end;

procedure TForm7.UpDown2Click(Sender: TObject; Button: TUDBtnType);

begin

if Msg1.Sender.ClassName='TBitBtn' then

msg1.Sender.Height:=UpDown2.Position*3;end;

procedure TForm7.SpeedButton11Click(Sender: TObject);

Var p:integer;begin

if Msg1.Sender.ClassName='TBitBtn' then begin

if msg1.Sender.Hint='1' then begin p:=pos('#Глухой',nam);delete(nam,p,7);msg1.Sender.Destroy;end;

if msg1.Sender.Hint='2' then begin p:=pos('#Поворотный',nam);delete(nam,p,11);msg1.Sender.Destroy;end;

if msg1.Sender.Hint='3' then begin p:=pos('#Откидной',nam);delete(nam,p,9);msg1.Sender.Destroy;end;

if msg1.Sender.Hint='4' then begin p:=pos('#балкон1',nam);delete(nam,p,8);msg1.Sender.Destroy;end;

if msg1.Sender.Hint='5' then begin p:=pos('#Балкон2',nam);delete(nam,p,8);msg1.Sender.Destroy;end;

if msg1.Sender.Hint='6' then begin p:=pos('#Вход',nam);delete(nam,p,5);msg1.Sender.Destroy;end;end;end;

procedure TForm7.SpeedButton13Click(Sender: TObject);

var B: TBitmap; srcRect,dstRect: TRect;

begin

B:=TBitmap.Create;

with dstRect do begin

Left:=0;

Top:=0;

Right:=Panel2.Width+1;

Bottom:=Panel2.Height+1; end;

with srcRect do begin

Left:=Panel2.Left+145;

Right:=Panel2.Left+Panel2.Width+145;

Top:=Panel2.Top+10;

Bottom:=Panel2.Top+Panel2.Height+10; end;

B.Width:=Panel2.Width;

B.Height:=Panel2.Height;

B.Canvas.CopyRect(dstRect,Self.Canvas,srcRect);

B.PixelFormat:=pf1bit;

B.SaveToFile(dir+'Шаблоны'+nam+'.bmp');

ShowMessage('Шаблон успешно сохранился!');

B.Free;end;

procedure TForm7.SpeedButton12Click(Sender: TObject);

Var s:string;d,a:integer;

begin

if form7.OpenDialog1.Execute then begin

image2.Top:=Panel2.Top-10;

image2.Left:=Panel2.Left-130;

image2.AutoSize:=true;

image2.Transparent:=FaLSE;

Image2.Picture.LoadFromFile(OpenDialog1.FileName);

nam:=OpenDialog1.FileName;

getdir(0,s);d:=pos(s,nam);a:=pos('#',nam);

delete(nam,d,a-1);d:=pos('.',nam);

delete(nam,d,4);end;end;

procedure TForm7.SpeedButton14Click(Sender: TObject);

begin

nam:=nam+'#Поворотный';

b1 := TBitBtn.Create(Self);

with b1 do begin

b1.Hint:='2';

Left := 20;

Top := 20;

Width := 60;

Height := 100;

Parent := Panel2;

Glyph.LoadFromFile(dir+'Иконкиповоротный1.bmp');end;end;

procedure TForm7.SpeedButton15Click(Sender: TObject);

begin

nam:=nam+'#Поворотный';

b1 := TBitBtn.Create(Self);

with b1 do begin

b1.Hint:='2';

Left := 20;

Top := 20;

Width := 60;

Height := 100;

Parent := Panel2;

Glyph.LoadFromFile(dir+'Иконкиповоротный2.bmp');end;end;

procedure TForm7.SpeedButton16Click(Sender: TObject);

begin

nam:=nam+'#Откидной';

b1 := TBitBtn.Create(Self);

with b1 do begin

b1.Hint:='3';

Left := 20;

Top := 20;

Width := 60;

Height := 100;

Glyph.LoadFromFile(dir+'Иконкиоткидной2.bmp');

Parent := Panel2;end;end;

procedure TForm7.SpeedButton17Click(Sender: TObject);

begin

if (Combobox1.Text='')or(Combobox3.Text='')or(Combobox2.Text='') then

Showmessage('Введите все необходимые данные!') else begin

if combobox1.Text='Оконные модули' then

fail:='ЦеныОкна'

else fail:='ЦеныДвери';

if (Combobox3.Text='Exprof58mm')and (Combobox2.Text='Однокамерный') then

Put:=fail+'Exprof58mm24.dat';

if (Combobox3.Text='Exprof58mm')and (Combobox2.Text='Двухкамерный') then

Put:=fail+'Exprof58mm32.dat';

if (Combobox3.Text='Exprof58mm')and (Combobox2.Text='Одно стекло') then begin

Put:=fail+'Exprof58mm24.dat';

odn:='1';end;

if (Combobox3.Text='Exprof101mm')and (Combobox2.Text='Однокамерный') then

Put:=fail+'Exprof101mm24.dat';

if (Combobox3.Text='Exprof101mm')and (Combobox2.Text='Двухкамерный') then

Put:=fail+'Exprof101mm32.dat';

if (Combobox3.Text='Exprof101mm')and (Combobox2.Text='Одно стекло') then begin

Put:=fail+'Exprof101mm24.dat';odn:='1';

end; Showmessage('Цена успешно загружена!');end;end;

procedure TForm7.SpeedButton10Click(Sender: TObject);

var f: LongInt;

begin

if itog<>'' then begin

if kolok>0 then kolok:=kolok-1;

tek:=tek+1;

label7.Caption:=inttostr(kolok);

label5.Caption:=inttostr(tek);

end else Showmessage('Сначала расчитайте предыдущее окно!');

nam:='';okn:=okn+1;

for f := 0 to ComponentCount - 1 do begin

if (Components[f] is TBitBtn) then

(Components[f] as TBitBtn).Visible:=false;end;end;

procedure TForm7.SpeedButton7Click(Sender: TObject);

begin Form7.Free; end;

procedure TForm7.FormShow(Sender: TObject);

begin tek:=1;

label7.Caption:=inttostr(kolok);

label5.Caption:=inttostr(tek);end;end.


unit Unit8;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Spin, Unit7,unit1, Buttons, ComCtrls, jpeg, ExtCtrls, Grids;

type

TForm8 = class(TForm)

Image1: TImage; Label4: TLabel;SpeedButton2: TSpeedButton;

SpeedButton9: TSpeedButton;Label9: TLabel; SpeedButton3: TSpeedButton;

SpeedButton1: TSpeedButton;Label6: TLabel; Label5: TLabel;SpinEdit1: TSpinEdit;

SpinEdit2: TSpinEdit;Label2: TLabel;Label1: TLabel; Label3: TLabel;

StringGrid1: TStringGrid; Bevel3: TBevel; Label7: TLabel; Label8: TLabel;

Bevel1: TBevel; Label14: TLabel;Bevel2: TBevel; Label13: TLabel;Label10: TLabel;

SpeedButton5: TSpeedButton; SpeedButton6: TSpeedButton; Label11: TLabel;

Label12: TLabel; SpeedButton7: TSpeedButton; SpeedButton8: TSpeedButton;

SpeedButton4: TSpeedButton; Label15: TLabel; SpeedButton10: TSpeedButton;

SpeedButton11: TSpeedButton; SpeedButton12: TSpeedButton;

StringGrid2: TStringGrid; Label16: TLabel; Label17: TLabel; Label18: TLabel;

Label19: TLabel; SpeedButton13: TSpeedButton; SpeedButton14: TSpeedButton;

Label20: TLabel; procedure SpeedButton1Click(Sender: TObject);

procedure SpeedButton2Click(Sender: TObject);

procedure SpeedButton9Click(Sender: TObject);

procedure SpeedButton3Click(Sender: TObject);

procedure FormCreate(Sender: TObject);

procedure StringGrid1SelectCell(Sender: TObject; ACol, ARow: Integer;

var CanSelect: Boolean);

procedure SpeedButton4Click(Sender: TObject);

procedure SpeedButton5Click(Sender: TObject);

procedure SpeedButton6Click(Sender: TObject);

procedure SpeedButton7Click(Sender: TObject);

procedure SpeedButton10Click(Sender: TObject);

procedure SpeedButton11Click(Sender: TObject);

procedure SpeedButton12Click(Sender: TObject);

procedure SpeedButton8Click(Sender: TObject);

procedure SpeedButton13Click(Sender: TObject);

procedure FormShow(Sender: TObject);

procedure SpeedButton14Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var Form8: TForm8; p:integer; n,path,one,two,tri,minv,minh,maxv,maxh:string;

plos,res:real; l,h,impost,pay,stol,e,dob:integer; start:Boolean;

Razpod,Markp,Podsen,So9,Lam,SOB,Ton,Maskit:string;

implementation

uses Unit15, Unit17, Unit18, Unit19, Unit20, Unit9, Unit14;

{$R *.dfm}

procedure TForm8.SpeedButton1Click(Sender: TObject);

begin

WinExec('c:/windows/system32/calc.exe',SW_showNormal);

end;

procedure TForm8.SpeedButton2Click(Sender: TObject);

var f: Integer;

begin

if StringGrid2.Cells[4,1]<>'' then

ton:='Тонировка:'+ton;

if StringGrid2.Cells[0,1]<>'' then

SOB:='Общая площадь:'+StringGrid2.Cells[0,1];

if StringGrid2.Cells[6,1]<>'' then

itog:=StringGrid2.Cells[6,1]+'у.е.';

if StringGrid2.Cells[3,1]='да' then

So9:='Профиль SO9 Учтен';

if StringGrid2.Cells[1,1]<>'' then

mon:=StringGrid2.Cells[1,1];

if StringGrid2.Cells[5,1]<>'' then

Lam:='Ламинирование:'+StringGrid2.Cells[5,1];

for f := 0 to ComponentCount - 1 do begin

if (Components[f] is TSpinEdit) then

(Components[f] as TSpinEdit).Value :=0;

Stringgrid1.Cols[0].Clear; Stringgrid1.Cols[1].Clear;

Stringgrid1.Cols[2].Clear; Stringgrid1.Cols[3].Clear;

Stringgrid2.Rows[1].Clear;SpeedButton5.Visible:=false;

SpeedButton6.Visible:=False;SpeedButton7.Visible:=false;

SpeedButton10.Visible:=false;SpeedButton11.Visible:=false;

SpeedButton14.Visible:=false;SpeedButton8.Visible:=false; end;close;end;


procedure TForm8.SpeedButton9Click(Sender: TObject);

label 1,2,3,4,5,6;

Var i,b:integer;nam1:string;f,dop:textfile;

begin b:=1;

SpeedButton3.Visible:=true;SpeedButton9.Visible:=false;

{$I-}

AssignFile(f,dir+put);

{$I+}

If IOResult=0 then begin

Reset(f);

while not EoF(f) do begin

readln(f, one);

readln(f, two);

readln(f, tri); end;CloseFile(f); end;

nam1:=nam;delete(nam1,1,1);nam1:=nam1+'#';

for i:=1 to length(nam1) do begin

if nam1[i]<>'#'then n:=n+nam1[i]

else begin if n='Глухой' then begin

Label4.Caption:='Глухой';

pay:=strtoint(one);

if odn='1' then

pay:=pay-6;

impost:=impost+1;

{$I-}

AssignFile(dop,dir+'Технические допускиГлухой модуль.dat');

{$I+}

If IOResult=0 then begin

Reset(dop);

while not EoF(dop) do begin

readln(dop, minv);

readln(dop, minh);

readln(dop, maxv);

readln(dop, maxh); end; CloseFile(dop); end;

SpinEdit1.MinValue:=strtoint(minh);

SpinEdit1.MaxValue:=strtoint(maxh);

SpinEdit2.MinValue:=strtoint(minv);

SpinEdit2.MaxValue:=strtoint(maxv);

SpinEdit1.Value:=strtoint(minh);

SpinEdit2.Value:=strtoint(minv);

ShowMessage('Введите размеры и нажмите "ОК"');

1:application.ProcessMessages;

if start=true then begin l:=spinedit1.Value;

h:=spinedit2.Value;

plos:=(l*h)*0.000001;

if (plos<=0.5) then

res:=(plos*pay)+((plos*pay)/100)*30

else res:=plos*pay;

if StringGrid1.RowCount<b then StringGrid1.RowCount:=b+1;

StringGrid1.Cells[0,b]:='Глухой';

StringGrid1.Cells[1,b]:=floattostr(plos);

StringGrid1.Cells[2,b]:=floattostr(res);

b:=b+1;

start:=false;SpinEdit1.Value:=0;

SpinEdit2.Value:=0; end else goto 1;

end;

if n='Поворотный' then begin

Label4.Caption:='Поворотный';

pay:=strtoint(two);

if odn='1' then

pay:=pay-6;

{$I-}

AssignFile(dop,dir+'Технические допускиПоворотный модуль.dat');

{$I+}

If IOResult=0 then begin

Reset(dop);

while not EoF(dop) do begin

readln(dop, minv);

readln(dop, minh);

readln(dop, maxv);

readln(dop, maxh); end; CloseFile(dop); end;

SpinEdit1.MinValue:=strtoint(minh);

SpinEdit1.MaxValue:=strtoint(maxh);

SpinEdit2.MinValue:=strtoint(minv);

SpinEdit2.MaxValue:=strtoint(maxv);

SpinEdit1.Value:=strtoint(minh);

SpinEdit2.Value:=strtoint(minv);

ShowMessage('Введите размеры и нажмите "ОК"');

2:application.ProcessMessages;

if start=true then begin l:=spinedit1.Value;

h:=spinedit2.Value;

plos:=(l*h)*0.000001;

if plos<=0.5 then

res:=(plos*pay)+((plos*pay)/100)*30

else res:=plos*pay;

if StringGrid1.RowCount<b then StringGrid1.RowCount:=b+1;

StringGrid1.Cells[0,b]:='Поворотный';

StringGrid1.Cells[1,b]:=floattostr(plos);

StringGrid1.Cells[2,b]:=floattostr(res);

b:=b+1;

start:=false;SpinEdit1.Value:=0;

SpinEdit2.Value:=0; end else goto 2; end;

if n='Откидной' then begin

Label4.Caption:='Откидной';

pay:=strtoint(tri);

if odn='1' then

pay:=pay-6;

{$I-}

AssignFile(dop,dir+'Технические допускиПоворотно-откидной.dat');

{$I+}

If IOResult=0 then begin

Reset(dop);

while not EoF(dop) do begin

readln(dop, minv);

readln(dop, minh);

readln(dop, maxv);

readln(dop, maxh); end; CloseFile(dop); end;

SpinEdit1.MinValue:=strtoint(minh);

SpinEdit1.MaxValue:=strtoint(maxh);

SpinEdit2.MinValue:=strtoint(minv);

SpinEdit2.MaxValue:=strtoint(maxv);

SpinEdit1.Value:=strtoint(minh);

SpinEdit2.Value:=strtoint(minv);

ShowMessage('Введите размеры и нажмите "ОК"');

3:application.ProcessMessages;

if start=true then begin l:=spinedit1.Value;

h:=spinedit2.Value;

plos:=(l*h)*0.000001;

if plos<=0.5 then

res:=(plos*pay)+((plos*pay)/100)*30

else res:=plos*pay;

if StringGrid1.RowCount<b then StringGrid1.RowCount:=b+1;

StringGrid1.Cells[0,b]:='Откидной';

StringGrid1.Cells[1,b]:=floattostr(plos);

StringGrid1.Cells[2,b]:=floattostr(res);

b:=b+1;

start:=false;SpinEdit1.Value:=0;

SpinEdit2.Value:=0; end else goto 3; end;

if n='балкон1' then begin

Label4.Caption:='Балконная-поворотная дверь';

pay:=strtoint(one);

if odn='1' then

pay:=pay-6;

{$I-}

AssignFile(dop,dir+'Технические допускиБалконная поворотная.dat');

{$I+}

If IOResult=0 then begin

Reset(dop);

while not EoF(dop) do begin

readln(dop, minv);

readln(dop, minh);

readln(dop, maxv);

readln(dop, maxh); end; CloseFile(dop); end;

SpinEdit1.MinValue:=strtoint(minh);

SpinEdit1.MaxValue:=strtoint(maxh);

SpinEdit2.MinValue:=strtoint(minv);

SpinEdit2.MaxValue:=strtoint(maxv);

SpinEdit1.Value:=strtoint(minh);

SpinEdit2.Value:=strtoint(minv);

ShowMessage('Введите размеры и нажмите "ОК"');

4:application.ProcessMessages;

if start=true then begin l:=spinedit1.Value;

h:=spinedit2.Value;

plos:=(l*h)*0.000001;

if plos<=0.5 then

res:=(plos*pay)+((plos*pay)/100)*30

else res:=plos*pay;

if StringGrid1.RowCount<b then StringGrid1.RowCount:=b+1;

StringGrid1.Cells[0,b]:='Балкон. поворотная';

StringGrid1.Cells[1,b]:=floattostr(plos);

StringGrid1.Cells[2,b]:=floattostr(res);

b:=b+1;

start:=false;SpinEdit1.Value:=0;

SpinEdit2.Value:=0; end else goto 4;

end;

if n='Балкон2' then begin

Label4.Caption:='Балконная-поворотно-откидная дверь';

pay:=strtoint(two);

if odn='1' then

pay:=pay-6;

{$I-}

AssignFile(dop,dir+'Технические допускиПоворотно-откидная.dat');

{$I+}

If IOResult=0 then begin

Reset(dop);

while not EoF(dop) do begin

readln(dop, minv);

readln(dop, minh);

readln(dop, maxv);

readln(dop, maxh); end; CloseFile(dop); end;

SpinEdit1.MinValue:=strtoint(minh);

SpinEdit1.MaxValue:=strtoint(maxh);

SpinEdit2.MinValue:=strtoint(minv);

SpinEdit2.MaxValue:=strtoint(maxv);

SpinEdit1.Value:=strtoint(minh);

SpinEdit2.Value:=strtoint(minv);

ShowMessage('Введите размеры и нажмите "ОК"');

5:application.ProcessMessages;

if start=true then begin l:=spinedit1.Value;

h:=spinedit2.Value;

plos:=(l*h)*0.000001;

if plos<=0.5 then

res:=(plos*pay)+((plos*pay)/100)*30

else res:=plos*pay;

if StringGrid1.RowCount<b then StringGrid1.RowCount:=b+1;

StringGrid1.Cells[0,b]:='Балкон. поворот-откид';

StringGrid1.Cells[1,b]:=floattostr(plos);

StringGrid1.Cells[2,b]:=floattostr(res);

b:=b+1;

start:=false;SpinEdit1.Value:=0;

SpinEdit2.Value:=0; end else goto 5; end;

if n='Вход' then begin

Label4.Caption:='Входная дверь';

pay:=strtoint(tri);

if odn='1' then

pay:=pay-6;

{$I-}

AssignFile(dop,dir+'Технические допускиВходная дверь.dat');

{$I+}

If IOResult=0 then begin

Reset(dop);

while not EoF(dop) do begin

readln(dop, minv);

readln(dop, minh);

readln(dop, maxv);

readln(dop, maxh); end; CloseFile(dop); end;

SpinEdit1.MinValue:=strtoint(minh);

SpinEdit1.MaxValue:=strtoint(maxh);

SpinEdit2.MinValue:=strtoint(minv);

SpinEdit2.MaxValue:=strtoint(maxv);

SpinEdit1.Value:=strtoint(minh);

SpinEdit2.Value:=strtoint(minv);

ShowMessage('Введите размеры и нажмите "ОК"');

6:application.ProcessMessages;

if start=true then begin l:=spinedit1.Value;

h:=spinedit2.Value;

plos:=(l*h)*0.000001;

if plos<=0.5 then

res:=(plos*pay)+((plos*pay)/100)*30

else res:=plos*pay;

if StringGrid1.RowCount<b then StringGrid1.RowCount:=b+1;

StringGrid1.Cells[0,b]:='Входная дверь';

StringGrid1.Cells[1,b]:=floattostr(plos);

StringGrid1.Cells[2,b]:=floattostr(res);

b:=b+1;

start:=false;SpinEdit1.Value:=0;

SpinEdit2.Value:=0; end else goto 6;

end;n:='';end;end;dob:=b;

ShowMessage('Расчет стоимости завершен!!!');

SpeedButton3.Visible:=false;SpeedButton9.Visible:=true;

SpeedButton2.Visible:=True;SpeedButton12.Visible:=True;end;

procedure TForm8.SpeedButton3Click(Sender: TObject);

begin start:=true; end;

procedure TForm8.FormCreate(Sender: TObject);

begin e:=0;

start:=false;

StringGrid2.Cells[0,0]:='Площадь';StringGrid2.Cells[1,0]:='Монтаж';

StringGrid2.Cells[2,0]:='Подоконник';StringGrid2.Cells[3,0]:='Профиль SO9';

StringGrid2.Cells[4,0]:='Тонировка';StringGrid2.Cells[5,0]:='Ламин.';

StringGrid2.Cells[6,0]:='Итог';end;

procedure TForm8.StringGrid1SelectCell(Sender: TObject; ACol,

ARow: Integer; var CanSelect: Boolean);

begin

Label14.Caption :=StringGrid1.Cells [0, ARow];

stol:=Arow;end;

procedure TForm8.SpeedButton4Click(Sender: TObject);

Var sen,sen1:real;

begin

if (label14.Caption='Поворотный')or(label14.Caption='Откидной') then

if StringGrid1.Cells [3, stol]<>'да' then

begin

sen1:=strtofloat(StringGrid1.Cells [2, stol]);

sen:=sen1+16;

StringGrid1.Cells [2, stol]:=floattostr(sen);

StringGrid1.Cells [3, stol]:='да';

ShowMessage('Расчет закончен!');end

else Showmessage('На этом модуле уже стоит маскитка!')

else Showmessage('На данный модуль нельзя ставить маскитку!');end;

procedure TForm8.SpeedButton5Click(Sender: TObject);

begin

if Form8.StringGrid2.Cells [5,1]='' then

form15.Showmodal else

Showmessage('Окно можно ламинировать только один раз!');end;

procedure TForm8.SpeedButton6Click(Sender: TObject);

begin

if Form8.StringGrid2.Cells[4,1]='' then

form17.Show else

Showmessage('Окно можно тонировать только один раз!');end;

procedure TForm8.SpeedButton7Click(Sender: TObject);

begin

if Form8.StringGrid2.Cells[2,1]='да' then

Showmessage('На окно можно ставить только один подоконник!')

else Form18.Showmodal;end;

procedure TForm8.SpeedButton10Click(Sender: TObject);

begin

if Form8.StringGrid2.Cells [3,1]<>'да' then

form19.Showmodal

else Showmessage('На этом окне профиль уже учтён!');end;

procedure TForm8.SpeedButton11Click(Sender: TObject);

begin

if impost>=2 then begin e:=e+1;

if e<=(impost-1) then

form20.Showmodal

else showmessage('Превышено допустимое число!');end

else showmessage('Импост считается только между двумя глухими модулями!');

end;

procedure TForm8.SpeedButton12Click(Sender: TObject);

Var i:integer;p2,s:real;beginp2:=0;s:=0;

for i:=1 to dob do

if StringGrid1.Cells[1,i]<>'' then

p2:=p2+Strtofloat(StringGrid1.Cells[1,i]);

StringGrid2.Cells[0,1]:=Floattostr(p2);

for i:=1 to dob do

if StringGrid1.Cells[2,i]<>'' then

s:=s+strtofloat(StringGrid1.Cells[2,i]);

if impost=1 then

s:=s+p2*7;

StringGrid2.Cells[6,1]:=floattostr(s);

SpeedButton12.Visible:=false;SpeedButton5.Visible:=true;

SpeedButton6.Visible:=true;SpeedButton7.Visible:=true;

SpeedButton10.Visible:=true;SpeedButton11.Visible:=true;

SpeedButton14.Visible:=true;SpeedButton8.Visible:=true;end;


procedure TForm8.SpeedButton8Click(Sender: TObject);

Var pl,sen:real;

begin

if StringGrid2.Cells [1,1]<>'да' then

begin

pl:=strtofloat(StringGrid2.Cells [6,1]);

sen:=(pl/100)*12;

sen:=sen+pl;

StringGrid2.Cells [6,1]:=floattostr(sen);

StringGrid2.Cells [1,1]:='да';

ShowMessage('Расчет закончен!');end

else Showmessage('На этом окне монтаж уже расчитан!') end;

procedure TForm8.SpeedButton13Click(Sender: TObject);

begin

if StringGrid2.Cells[6,1]<>'' then

Form9.Edit5.Text:=StringGrid2.Cells[6,1];

form9.Show;end;

procedure TForm8.FormShow(Sender: TObject);

begin

SpeedButton3.Visible:=false;

SpeedButton9.Visible:=true;

StringGrid1.Cells[0,0]:='Модули';

StringGrid1.Cells[1,0]:='Площадь';

StringGrid1.Cells[2,0]:='Стоимость';

StringGrid1.Cells[3,0]:='Москитка';end;

procedure TForm8.SpeedButton14Click(Sender: TObject);

begin form14.show;end;end.


unit Unit9;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Mask, Buttons, jpeg, ExtCtrls;

type

TForm9 = class(TForm)

Image1: TImage; Label1: TLabel;Label2: TLabel;Label3: TLabel;Label4: TLabel;

Label5: TLabel; Label6: TLabel;RadioButton1: TRadioButton;

RadioButton2: TRadioButton;RadioButton3: TRadioButton;

SpeedButton1: TSpeedButton;Edit1: TEdit;Edit2: TEdit;Edit3: TEdit;Edit4: TEdit;

Edit5: TEdit; procedure SpeedButton1Click(Sender: TObject);

procedure Edit1KeyPress(Sender: TObject; var Key: Char);

procedure Edit2KeyPress(Sender: TObject; var Key: Char);

procedure Edit3KeyPress(Sender: TObject; var Key: Char);

procedure Edit4KeyPress(Sender: TObject; var Key: Char);

procedure Edit5KeyPress(Sender: TObject; var Key: Char);

private

{ Private declarations }

public

{ Public declarations }

end;

var Form9: TForm9;

implementation

{$R *.dfm}

procedure TForm9.SpeedButton1Click(Sender: TObject);

Var evro,dol,rub:real;kursE,kursD:real;

begin

kursD:=0;kursE:=0;evro:=0;dol:=0;rub:=0;

If RadioButton1.Checked=True then begin

kursD:=Strtofloat(Edit2.Text);

dol:=Strtofloat(Edit4.Text);

Edit3.Text:=floattoStr(dol*kursD);end;

If RadioButton2.Checked=True then begin

kursE:=Strtofloat(Edit1.Text);

evro:=Strtofloat(Edit5.Text);

Edit3.Text:=floattoStr(evro*kursE);end;

If RadioButton3.Checked=True then begin

kursE:=Strtofloat(Edit1.Text);

kursD:=Strtofloat(Edit2.Text);

evro:=Strtofloat(Edit5.Text);

Edit4.Text:=floattoStr((evro*kursE)/kursD);end;end;

procedure TForm9.Edit1KeyPress(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;

procedure TForm9.Edit2KeyPress(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;


procedure TForm9.Edit3KeyPress(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;

procedure TForm9.Edit4KeyPress(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;

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;

Если Вам нужна помощь с академической работой (курсовая, контрольная, диплом, реферат и т.д.), обратитесь к нашим специалистам. Более 90000 специалистов готовы Вам помочь.
Бесплатные корректировки и доработки. Бесплатная оценка стоимости работы.

Поможем написать работу на аналогичную тему

Получить выполненную работу или консультацию специалиста по вашему учебному проекту
Нужна помощь в написании работы?
Мы - биржа профессиональных авторов (преподавателей и доцентов вузов). Пишем статьи РИНЦ, ВАК, Scopus. Помогаем в публикации. Правки вносим бесплатно.

Похожие рефераты: