p align="left">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);
Страницы: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
|