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

бесплатно 0
4.5 108
Создание программы в среде Delphi 7 для упрощения и автоматизации расчетов стоимости пластиковых оконных конструкций и дверей. Разработка программы с учётом расчёта стоимости заказываемых изделий, сохранением заказов в файлы, вывод отчетов на печать.

Скачать работу Скачать уникальную работу

Чтобы скачать работу, Вы должны пройти проверку:


Аннотация к работе
Предусмотренный в программе расчет стоимости оконных конструкций позволяет самостоятельно выбирать форму и тип оконных модулей, благодаря чему с помощью программы можно рассчитать стоимость оконных конструкций практически любого типа. Все заказы рассчитанные с помощью программы автоматически сохраняются в папку заказов, также программа позволяет производить различные операции с этими файлами, например печать, просмотр, редактирование и т.д. В программе будут реализованы возможности добавления данных о заказах, вывод отчетов на печать, а также расчет стоимости оконных конструкций с дополнительной комплектацией. Программа должна: добавлять, удалять, просматривать данные о заказе и заказчике в файлах, выводить отчеты на печать, записывать и читать данных в файлах, а также производить расчеты стоимости заказов. Данная программа занимает мало места на диске, поэтому ее легко перемещать на сменные носители, но все же для полной надежности программу «Урал Строй Монтаж» лучше хранить на винчестере (HDD), в связи с тем, что неожиданно может понадобиться изменение структуры задачи, либо внесение каких - либо изменений в базу данных.

Список литературы
Попов В. М. Программирование в T. Pascal . ? М.: Просвещение, 1997.

Макарова И. Р. Информатика. ? М.: Финансы и статистика, 2003.

Рудаков А. В. Технология разработки программных продуктов. ? М.: Академия, 2004.

Хомоненко А. Гофман В. Delphi 7 в подлиннике. ? М.: Просвещение, 2004.

Никифоров В. В. Основы разработки программных продуктов. ? М.: Просвещение, 2004.

Марченко А. И. Программирование в среде T. Pascal. ? Киев: Юниор, 1997.

Немнюгин С. А. Программирование на языке высокого уровня. ? М.: Просвещение, 1996.

Вендров А. М. Проектирование программного обеспечения экономических информационных систем. ? М.: Финансы и статистика, 2000. ? 352 с.

Соммервил И. Инженерия программного обеспечения. ? М.: СПБ.: Киев: Изд. Дом «Вильямс», 2002. ? 624 с.

Приложение А Входные документы

Приложение Б

Текст программы program Project1;

uses

Forms, Unit1 in "Unit1.pas" {Form1}, Unit2 in "Unit2.pas" {Form2}, Unit3 in "Unit3.pas" {Form3}, Unit4 in "Unit4.pas" {Form4}, Unit6 in "Unit6.pas" {Form6}, Unit7 in "Unit7.pas" {Form7}, Unit12 in "Unit12.pas" {Form12}, Unit13 in "Unit13.pas" {Form13}, Unit11 in "Unit11.pas" {Form11}, Unit16 in "Unit16.pas" {Form16}, Unit8 in "Unit8.pas" {Form8}, Unit9 in "Unit9.pas" {Form9}, Unit5 in "Unit5.pas" {Form5}, Unit15 in "Unit15.pas" {Form15}, Unit17 in "Unit17.pas" {Form17}, Unit18 in "Unit18.pas" {Form18}, Unit19 in "Unit19.pas" {Form19}, Unit20 in "Unit20.pas" {Form20}, Unit21 in "Unit21.pas" {Form21}, Unit22 in "Unit22.pas" {Form22}, Unit10 in "Unit10.pas" {Form10}, Unit14 in "Unit14.pas" {Form14};

{$R *.res} begin

Application.Initialize;

Application.Title:= "УРАЛСТРОЙМОНТАЖ";

Application.CREATEFORM(TFORM1, Form1);

Application.CREATEFORM(TFORM2, Form2);

Application.CREATEFORM(TFORM3, Form3);

Application.CREATEFORM(TFORM4, Form4);

Application.CREATEFORM(TFORM6, Form6);

Application.CREATEFORM(TFORM7, Form7);

Application.CREATEFORM(TFORM12, Form12);

Application.CREATEFORM(TFORM13, Form13);

Application.CREATEFORM(TFORM11, Form11);

Application.CREATEFORM(TFORM16, Form16);

Application.CREATEFORM(TFORM8, Form8);

Application.CREATEFORM(TFORM9, Form9);

Application.CREATEFORM(TFORM5, Form5);

Application.CREATEFORM(TFORM15, Form15);

Application.CREATEFORM(TFORM17, Form17);

Application.CREATEFORM(TFORM18, Form18);

Application.CREATEFORM(TFORM19, Form19);

Application.CREATEFORM(TFORM20, Form20);

Application.CREATEFORM(TFORM21, Form21);

Application.CREATEFORM(TFORM22, Form22);

Application.CREATEFORM(TFORM10, Form10);

Application.CREATEFORM(TFORM14, Form14);

Application.Run;

end. unit Unit1;

interface uses

Windows, Messages, SYSUTILS, Variants, Classes, Graphics, Controls, Forms,Dialogs, Menus, EXTCTRLS, STDCTRLS, XPMAN, COMCTRLS, Unit9, Mask,Buttons, jpeg ,Unit11, syncobjs,IMGLIST;

type

TFORM1 = class(TFORM)

MAINMENU1: TMAINMENU;

N1: TMENUITEM;N2: TMENUITEM;

N19: TMENUITEM;N18: TMENUITEM;

N4: TMENUITEM;N3: TMENUITEM;

N5: TMENUITEM;N6: TMENUITEM;

N7: TMENUITEM;N8: TMENUITEM;

N9: TMENUITEM;N10: TMENUITEM;

N12: TMENUITEM;N13: TMENUITEM;

N15: TMENUITEM;N16: TMENUITEM;

N17: TMENUITEM;Panel1: TPANEL;

Label4: TLABEL; Label1: TLABEL;

Edit1: TEDIT; Label2: TLABEL;Edit2: TEDIT;

Label3:TLABEL;Label6:TLABEL; SAVEDIALOG1: TSAVEDIALOG;

OPENDIALOG1: TOPENDIALOG; PRINTDIALOG1: TPRINTDIALOG;

XPMANIFEST1: TXPMANIFEST; Memo1: TMEMO;

N20: TMENUITEM; CONTROLBAR1: TCONTROLBAR;

FONTDIALOG1: TFONTDIALOG; SPEEDBUTTON4: TSPEEDBUTTON;

SPEEDBUTTON1: TSPEEDBUTTON; SPEEDBUTTON2: TSPEEDBUTTON;

SPEEDBUTTON3: TSPEEDBUTTON; SPEEDBUTTON5: TSPEEDBUTTON;

SPEEDBUTTON6: TSPEEDBUTTON; SPEEDBUTTON7: TSPEEDBUTTON;

SPEEDBUTTON8: TSPEEDBUTTON; SPEEDBUTTON9: TSPEEDBUTTON;

DATETIMEPICKER1: TDATETIMEPICKER;Timer1: TTIMER;N11: TMENUITEM;

Image1: TIMAGE; Image2: TIMAGE;Label9: TLABEL;SPEEDBUTTON13: TSPEEDBUTTON;

SPEEDBUTTON14: TSPEEDBUTTON;Label8: TLABEL; MASKEDIT3: TMASKEDIT;

Label7: TLABEL; MASKEDIT2: TMASKEDIT;Label10: TLABEL;

Label5: TLABEL; Label12: TLABEL; Memo4: TMEMO; Timer2: TTIMER;

RICHEDIT1: TRICHEDIT; SPEEDBUTTON11: TSPEEDBUTTON; Label11: TLABEL;

N14: TMENUITEM; procedure N5Click(Sender: TOBJECT);

procedure N16Click(Sender: TOBJECT); procedure N17Click(Sender: TOBJECT);

procedure N7Click(Sender: TOBJECT); procedure N9Click(Sender: TOBJECT);

procedure N10Click(Sender: TOBJECT); procedure N3Click(Sender: TOBJECT);

procedure N18Click(Sender: TOBJECT); procedure N19Click(Sender: TOBJECT);

procedure N11Click(Sender: TOBJECT); procedure N13Click(Sender: TOBJECT);

procedure N2Click(Sender: TOBJECT); procedure SPEEDBUTTON3Click(Sender: TOBJECT);

procedure SPEEDBUTTON1Click(Sender: TOBJECT);

procedure SPEEDBUTTON4Click(Sender: TOBJECT);

procedure SPEEDBUTTON7Click(Sender: TOBJECT);

procedure SPEEDBUTTON6Click(Sender: TOBJECT);

procedure SPEEDBUTTON5Click(Sender: TOBJECT);

procedure SPEEDBUTTON2Click(Sender: TOBJECT);

procedure Timer1Timer(Sender: TOBJECT);

procedure SPEEDBUTTON11Click(Sender: TOBJECT);

procedure N20Click(Sender: TOBJECT); procedure FORMCREATE(Sender: TOBJECT);

procedure SPEEDBUTTON13Click(Sender: TOBJECT);

procedure SPEEDBUTTON9Click(Sender: TOBJECT);

procedure Edit1KEYPRESS(Sender: TOBJECT; var Key: Char);

procedure Edit2KEYPRESS(Sender: TOBJECT; var Key: Char);

procedure SPEEDBUTTON8Click(Sender: TOBJECT);

procedure SPEEDBUTTON14Click(Sender: TOBJECT);

private

{ Private declarations } public

{ Public declarations } end;

var

CHECKEVENT: TEVENT; Form1: TFORM1; dir:string; kolok:integer;

prof,spak,mon,got:string;fiozam,fiozak,adres,data,itog,domtel,sottel:string;

implementation uses Unit2, Unit3, Unit4, Unit5, Unit6, Unit7, Unit8, Unit10, Unit12, Unit15;

{$R *.dfm} procedure TFORM1.N5Click(Sender: TOBJECT);

begin form2.Showmodal end;

procedure TFORM1.N16Click(Sender: TOBJECT);

begin form3.Showmodal end;

procedure TFORM1.N17Click(Sender: TOBJECT);

begin form4.Showmodal end;

procedure TFORM1.N7Click(Sender: TOBJECT);

var dlg:Word; begin dlg:=MESSAGEDLG("Вы точно хотите выйти???",MTCONFIRMATION,MBYESNOCANCEL,0);

if dlg = MRYES then close; end;

procedure TFORM1.N9Click(Sender: TOBJECT);

begin form6.Showmodal; end;

procedure TFORM1.N10Click(Sender: TOBJECT);

begin form7.Showmodal; end;

procedure TFORM1.N3Click(Sender: TOBJECT);

begin Form1.PRINTDIALOG1.Execute; end;

procedure TFORM1.N18Click(Sender: TOBJECT);

begin if Form1.SAVEDIALOG1.Execute then

RICHEDIT1.Lines.SAVETOFILE(SAVEDIALOG1.FILENAME); end;

procedure TFORM1.N19Click(Sender: TOBJECT);

begin if form1.OPENDIALOG1.Execute then

RICHEDIT1.Lines.LOADFROMFILE(OPENDIALOG1.FILENAME); end;

procedure TFORM1.N11Click(Sender: TOBJECT);

begin form9.Showmodal; end;

procedure TFORM1.N13Click(Sender: TOBJECT);

begin form12.Showmodal; end;

procedure TFORM1.N2Click(Sender: TOBJECT);

begin form11.Show; end;

procedure TFORM1.SPEEDBUTTON3Click(Sender: TOBJECT);

begin RICHEDIT1.Paragraph.Alignment:=TALEFTJUSTIFY; end;

procedure TFORM1.SPEEDBUTTON1Click(Sender: TOBJECT);

begin RICHEDIT1.Paragraph.Alignment:=TARIGHTJUSTIFY; end;

procedure TFORM1.SPEEDBUTTON4Click(Sender: TOBJECT);

begin if FONTDIALOG1.Execute then

RICHEDIT1.SELATTRIBUTES.Assign(FONTDIALOG1.Font);

RICHEDIT1.SETFOCUS; end;

procedure TFORM1.SPEEDBUTTON7Click(Sender: TOBJECT);

begin if Form1.SAVEDIALOG1.Execute then

RICHEDIT1.Lines.SAVETOFILE(SAVEDIALOG1.FILENAME); end;

procedure TFORM1.SPEEDBUTTON6Click(Sender: TOBJECT);

begin if form1.OPENDIALOG1.Execute then

RICHEDIT1.Lines.LOADFROMFILE(OPENDIALOG1.FILENAME); end;

procedure TFORM1.SPEEDBUTTON5Click(Sender: TOBJECT);

var f: Integer;

begin for f := 0 to COMPONENTCOUNT - 1 do begin if (Components[f] is TEDIT) then (Components[f] as TEDIT).Text := "";

if (Components[f] is TMASKEDIT) then (Components[f] as TMASKEDIT).Text := "";

if (Components[f] is TMEMO) then (Components[f] as TMEMO).Text := "";end;

RICHEDIT1.Clear;

prof:="";spak:="";mon:="";got:=""; got:="";adres:="";fiozam:="";fiozak:="";

Showmessage("Введите все данные по заказу!"); end;

procedure TFORM1.SPEEDBUTTON2Click(Sender: TOBJECT);

begin RICHEDIT1.Paragraph.Alignment:=TACENTER;end;

procedure TFORM1.Timer1Timer(Sender: TOBJECT);

begin Label5.Caption:= "Дата " DATETOSTR(date);

Label11.Caption:="Номер заказа: " INTTOSTR(nzak);

Label9.Caption:= "Время " TIMETOSTR(Time); end;

procedure TFORM1.SPEEDBUTTON11Click(Sender: TOBJECT);

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; domtel:=MASKEDIT3.Text;

sottel:=MASKEDIT2.Text; data:=datetostr(DATETIMEPICKER1.Date);

got:=memo4.Text; Form7.Showmodal; end; end;

procedure TFORM1.N20Click(Sender: TOBJECT);

begin form5.Showmodal; end;

procedure TFORM1.FORMCREATE(Sender: TOBJECT);

var f:textfile;s:string;

begin CHECKEVENT := TEVENT.Create(nil, false, true, "MYPROGRAM_CHECKEXIST");

if CHECKEVENT.WAITFOR(10) WRSIGNALED then begin Showmessage("Программа уже запущена!");

Self.Close; halt; end;

DATETIMEPICKER1.Date:=Date; odn:="";

dir:=EXTRACTFILEPATH(Application.EXENAME);

ASSIGNFILE(f,dir "

zak.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 а="()у.е" 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.Selectednil 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);

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 K

Вы можете ЗАГРУЗИТЬ и ПОВЫСИТЬ уникальность
своей работы


Новые загруженные работы

Дисциплины научных работ





Хотите, перезвоним вам?