Рефераты

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

dir:=ExtractFilePath(Application.ExeName);

AssignFile(f,dir+'\nzak.txt');

Reset(f); Read(f,s); nzak:=StrToInt(s); CloseFile(f); end;

function Search_And_Replace(RichEdit: TRichEdit;

SearchText, ReplaceText: string): Boolean;

var startpos, Position, endpos: integer;

begin startpos := 0;

with RichEdit do begin endpos := Length(RichEdit.Text);

Lines.BeginUpdate;

while FindText(SearchText, startpos, endpos, [stMatchCase])<>-1 do

begin endpos   := Length(RichEdit.Text) - startpos;

Position := FindText(SearchText, startpos, endpos, [stMatchCase]);

Inc(startpos, Length(SearchText)); SetFocus; SelStart  := Position;

SelLength := Length(SearchText); richedit.clearselection;

SelText := ReplaceText; end;

Lines.EndUpdate; end; end;

procedure TForm1.SpeedButton13Click(Sender: TObject);

Var b,a:string; begin

if (fiozam='')or(fiozak='')or(adres='')

then showmessage('Не введены обязательные параметры!') else

if prof='' then Showmessage('Введите информацию о заказе!')else

begin RichEdit1.Lines.LoadFromFile(dir+'\Отчеты\ЕвроДом.rtf');

Search_And_Replace(Richedit1, '№1',prof );

Search_And_Replace(Richedit1, '№2',spak);

Search_And_Replace(Richedit1, '№4',mon);

Search_And_Replace(Richedit1, '№3',got );

if (SOB='')and(Lam='')and(So9='') then b:=''

else if (SOB='')or(Lam='')or(So9='') then begin

if SOB='' then b:=Lam+'; '+So9+'; '+ton;

if Lam='' then b:=SOB+'; '+So9+'; '+ton;

if So9='' then b:=SOB+'; '+Lam+'; '+ton;

if (Lam='')and(So9='') then b:=SOB+'; '+ton end

else b:=SOB+'; '+Lam+'; '+So9+'; '+ton;

Search_And_Replace(Richedit1, '#B',b);

a:=MarkP+'('+RazPod+')'+Podsen+'у.е';

if a='()у.е' then a:='';

Search_And_Replace(Richedit1, '#A',a );

if sottel='(8)            ' then

Search_And_Replace(Richedit1, '#6',' ')

else

Search_And_Replace(Richedit1, '#6',sottel);

Search_And_Replace(Richedit1, '#C',itog);

Search_And_Replace(Richedit1, '#5',domtel);

Search_And_Replace(Richedit1, '#1',fiozam );

Search_And_Replace(Richedit1, '#2',data);

Search_And_Replace(Richedit1, '#3',fiozak );

Search_And_Replace(Richedit1, '#4',adres );

end; end;

procedure TForm1.SpeedButton9Click(Sender: TObject);

begin

RichEdit1.Perform(EM_UNDO, 0, 0);end;

procedure TForm1.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 TForm1.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 TForm1.SpeedButton8Click(Sender: TObject);

begin RichEdit1.Print('Печать отчета'); end;

procedure TForm1.SpeedButton14Click(Sender: TObject);

begin if RichEdit1.Text<>'' then begin

form10.qrimage1.Picture.LoadFromFile(dir+'\temp\'+'1.bmp');

form10.qrimage2.Picture.LoadFromFile(dir+'\temp\'+'2.bmp');

form10.qrimage3.Picture.LoadFromFile(dir+'\temp\'+'3.bmp');

form10.qrimage4.Picture.LoadFromFile(dir+'\temp\'+'4.bmp');

form10.qrimage5.Picture.LoadFromFile(dir+'\temp\'+'5.bmp');

form10.qrimage6.Picture.LoadFromFile(dir+'\temp\'+'6.bmp');

form10.Show;   end

else Showmessage('Сначала создайте отчёт!');end;end.

unit Unit2;

interface

uses

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

Dialogs, Buttons, StdCtrls, Spin, jpeg,Unit1, ExtCtrls;

type

TForm2 = class(TForm)

Image1: TImage;GroupBox1: TGroupBox;Label1: TLabel;

Label2: TLabel; Label3: TLabel; Label4: TLabel;

Label5: TLabel; Label6: TLabel; Label7: TLabel;

Label8: TLabel; Label9: TLabel; SpinEdit1: TSpinEdit;

SpinEdit2: TSpinEdit;  SpinEdit3: TSpinEdit; SpinEdit4: TSpinEdit;

SpinEdit5: TSpinEdit;  SpinEdit6: TSpinEdit; SpinEdit7: TSpinEdit;

SpinEdit8: TSpinEdit;  SpinEdit9: TSpinEdit; SpinEdit10: TSpinEdit;

SpinEdit11: TSpinEdit; SpinEdit12: TSpinEdit; GroupBox2: TGroupBox;

Label10: TLabel; Label11: TLabel; Label12: TLabel; Label13: TLabel;

Label14: TLabel; Label15: TLabel;Label16: TLabel; Label17: TLabel;

Label18: TLabel; SpinEdit13: TSpinEdit; SpinEdit14: TSpinEdit;

SpinEdit15: TSpinEdit; SpinEdit16: TSpinEdit; SpinEdit17: TSpinEdit;

SpinEdit18: TSpinEdit; SpinEdit19: TSpinEdit; SpinEdit20: TSpinEdit;

SpinEdit21: TSpinEdit; SpinEdit22: TSpinEdit; SpinEdit23: TSpinEdit;

SpinEdit24: TSpinEdit;  SpeedButton4: TSpeedButton; SpeedButton3: TSpeedButton;

SpeedButton2: TSpeedButton; SpeedButton1: TSpeedButton;

SpeedButton6: TSpeedButton; SpeedButton7: TSpeedButton;

procedure SpeedButton1Click(Sender: TObject);

procedure SpeedButton2Click(Sender: TObject);

procedure SpeedButton3Click(Sender: TObject);

procedure SpeedButton4Click(Sender: TObject);

procedure SpeedButton6Click(Sender: TObject);

procedure SpeedButton7Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var Form2: TForm2;

implementation

uses Unit13, Unit14, Unit21, Unit22;

{$R *.dfm}

procedure TForm2.SpeedButton1Click(Sender: TObject);

begin close; end;

procedure TForm2.SpeedButton2Click(Sender: TObject);

Var s:string;

f:textfile;

begin

{$I-}

AssignFile(f,dir+'\Цены\Окна');

{$I+}

If IOResult=0 then begin

s:=dir+'\Цены\Окна';

Rewrite(f,s+'\Exprof58mm24.dat');

Writeln(f,SpinEdit1.Value);

Writeln(f,SpinEdit2.Value);

Writeln(f,SpinEdit3.Value);

CloseFile(f);

Rewrite(f,s+'\Exprof58mm32.dat');

Writeln(f,SpinEdit4.Value);

Writeln(f,SpinEdit5.Value);

Writeln(f,SpinEdit6.Value);

CloseFile(f);

Rewrite(f,s+'\Exprof101mm24.dat');

Writeln(f,SpinEdit7.Value);

Writeln(f,SpinEdit8.Value);

Writeln(f,SpinEdit9.Value);

CloseFile(f);

Rewrite(f,s+'\Exprof101mm32.dat');

Writeln(f,SpinEdit10.Value);

Writeln(f,SpinEdit11.Value);

Writeln(f,SpinEdit12.Value);

CloseFile(f);

end else Exit;

{$I-}

AssignFile(f,dir+'\Цены\Двери');

{$I+}

If IOResult=0 then begin

s:=dir+'\Цены\Двери';

Rewrite(f,s+'\Exprof58mm24.dat');

Writeln(f,SpinEdit13.Value);

Writeln(f,SpinEdit14.Value);

Writeln(f,SpinEdit15.Value);

CloseFile(f);

Rewrite(f,s+'\Exprof58mm32.dat');

Writeln(f,SpinEdit16.Value);

Writeln(f,SpinEdit17.Value);

Writeln(f,SpinEdit18.Value);

CloseFile(f);

Rewrite(f,s+'\Exprof101mm24.dat');

Writeln(f,SpinEdit19.Value);

Writeln(f,SpinEdit20.Value);

Writeln(f,SpinEdit21.Value);

CloseFile(f);

Rewrite(f,s+'\Exprof101mm32.dat');

Writeln(f,SpinEdit22.Value);

Writeln(f,SpinEdit23.Value);

Writeln(f,SpinEdit24.Value);

CloseFile(f); end else Exit;

ShowMessage('Данные сохранены успешно!'); end;

procedure TForm2.SpeedButton3Click(Sender: TObject);

begin

SpinEdit1.Value:=58; SpinEdit2.Value:=167;

SpinEdit3.Value:=172; SpinEdit4.Value:=67;

SpinEdit5.Value:=175; SpinEdit6.Value:=181;

SpinEdit7.Value:=68; SpinEdit8.Value:=195;

SpinEdit9.Value:=201; SpinEdit10.Value:=79;

SpinEdit11.Value:=204; SpinEdit12.Value:=212;

SpinEdit13.Value:=152; SpinEdit14.Value:=157;

SpinEdit15.Value:=176; SpinEdit16.Value:=165;

SpinEdit17.Value:=170; SpinEdit18.Value:=187;

SpinEdit19.Value:=180; SpinEdit20.Value:=188;

SpinEdit21.Value:=0; SpinEdit22.Value:=194;

SpinEdit23.Value:=200;SpinEdit24.Value:=0; end;

procedure TForm2.SpeedButton4Click(Sender: TObject);

begin  form13.show; end;

procedure TForm2.SpeedButton6Click(Sender: TObject);

begin form21.Show; end;

procedure TForm2.SpeedButton7Click(Sender: TObject);

begin form22.Show; end; end.

unit Unit3;

interface

uses

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

Dialogs, StdCtrls, Buttons, jpeg, ExtCtrls;

type

TForm3 = class(TForm)

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

Label4: TLabel; Label5: TLabel; SpeedButton1: TSpeedButton;

procedure BitBtn1Click(Sender: TObject);

procedure SpeedButton1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var Form3: TForm3;

implementation

{$R *.dfm}

procedure TForm3.BitBtn1Click(Sender: TObject);

begin  close  end;

procedure TForm3.SpeedButton1Click(Sender: TObject);

begin close; end; end.

unit Unit4;

interface

uses

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

Dialogs, StdCtrls, Buttons, jpeg, ExtCtrls;

type

TForm4 = class(TForm)

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

Label4: TLabel; Label5: TLabel;  SpeedButton1: TSpeedButton;

procedure SpeedButton1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var Form4: TForm4;

implementation

{$R *.dfm}

procedure TForm4.SpeedButton1Click(Sender: TObject);

begin close; end; end.

unit Unit5;

interface

uses

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

Dialogs, StdCtrls, ComCtrls, ExtCtrls, jpeg,unit1, Buttons;

type

TForm5 = class(TForm)

TreeView1: TTreeView; Timer1: TTimer;RichEdit1: TRichEdit;Image1: TImage;

Label3: TLabel; Label2: TLabel; Label1: TLabel; Bevel1: TBevel;Bevel2: TBevel;

SpeedButton2: TSpeedButton; SpeedButton1: TSpeedButton;

procedure Timer1Timer(Sender: TObject);

procedure SpeedButton2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var  Form5: TForm5;

implementation

{$R *.dfm}

procedure TForm5.Timer1Timer(Sender: TObject);

begin

if TreeView1.Selected<>nil then begin

label3.Caption:=TreeView1.Selected.Text;

if TreeView1.Selected.Text='Решение задач' then

RichEdit1.Lines.LoadFromFile(dir+'\Справка\Основные задачи.rtf');

if TreeView1.Selected.Text='УралСтройМантаж' then

RichEdit1.Lines.LoadFromFile(dir+'\Справка\УралСтройМонтаж.rtf');

if TreeView1.Selected.Text='Описание интерфейса' then

RichEdit1.Lines.LoadFromFile(dir+'\Справка\Интерфейс.rtf');

if TreeView1.Selected.Text='Расчет стоимости' then

RichEdit1.Lines.LoadFromFile(dir+'\Справка\Расчет.rtf');

if TreeView1.Selected.Text='Системные требования' then

RichEdit1.Lines.LoadFromFile(dir+'\Справка\Системные требования.rtf');

if TreeView1.Selected.Text='Создание шаблонов' then

RichEdit1.Lines.LoadFromFile(dir+'\Справка\Шаблон.rtf');

if TreeView1.Selected.Text='Установка цен' then

RichEdit1.Lines.LoadFromFile(dir+'\Справка\Цены.rtf');end;end;

procedure TForm5.SpeedButton2Click(Sender: TObject);

begin  Close; end; end.

unit Unit6;

interface

uses

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

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

type

TForm6 = class(TForm)

Panel1: TPanel; SpeedButton1: TSpeedButton; SpeedButton2: TSpeedButton;

SpeedButton3: TSpeedButton;  SpeedButton5: TSpeedButton;

SpeedButton6: TSpeedButton; SpeedButton4: TSpeedButton;

SpeedButton14: TSpeedButton; SpeedButton15: TSpeedButton;

SpeedButton16: TSpeedButton; Panel2: TPanel;

UpDown2: TUpDown;UpDown1: TUpDown; SpeedButton11: TSpeedButton;

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

SpeedButton9: TSpeedButton;  procedure SpeedButton1Click(Sender: TObject);

procedure SpeedButton16Click(Sender: TObject);

procedure SpeedButton2Click(Sender: TObject);

procedure SpeedButton14Click(Sender: TObject);

procedure SpeedButton15Click(Sender: TObject);

procedure SpeedButton3Click(Sender: TObject);

procedure SpeedButton4Click(Sender: TObject);

procedure SpeedButton6Click(Sender: TObject);

procedure SpeedButton5Click(Sender: TObject);

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

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

procedure Panel2MouseDown(Sender: TObject; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer);

procedure SpeedButton11Click(Sender: TObject);

procedure SpeedButton9Click(Sender: TObject);

procedure SpeedButton8Click(Sender: TObject);

private

procedure CmFocusChanged (var Msg: TCmFocusChanged);

message cm_FocusChanged;

{ Private declarations }

public

{ Public declarations }

end;

var  Msg1: TCmFocusChanged; Form6: TForm6;c:string;

implementation

{$R *.dfm}

procedure TForm6.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 TForm6.CmFocusChanged (var Msg: TCmFocusChanged);

begin  Msg1:=Msg;  end;

procedure TForm6.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 TForm6.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 TForm6.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+'\Иконки\поворотный1.bmp');end;end;

procedure TForm6.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+'\Иконки\откидной.bmp');

Parent := Panel2;end;end;

procedure TForm6.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 TForm6.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 TForm6.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 TForm6.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 TForm6.UpDown1Click(Sender: TObject; Button: TUDBtnType);

begin

if Msg1.Sender.ClassName='TBitBtn' then

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

end;

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

begin

if Msg1.Sender.ClassName='TBitBtn' then

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

end;

procedure TForm6.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 TForm6.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 TForm6.SpeedButton9Click(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+15;

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

Top:=Panel2.Top;

Bottom:=Panel2.Top+Panel2.Height+12;

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 TForm6.SpeedButton8Click(Sender: TObject);

begin  close;end;end.

unit Unit7;

interface

uses

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

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

type

TForm7 = 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);

Страницы: 1, 2, 3


© 2010 Собрание рефератов