Расчет стоимости пластиковых оконных конструкций и дверей
Курсовой проект - Компьютеры, программирование
Другие курсовые по предмету Компьютеры, программирование
e then begin
t:=strtofloat(Form8.StringGrid2.Cells [6,1]);
sum:=t+((t/100)*30);
Form8.StringGrid2.Cells [6,1]:=floattostr(sum);
Form8.StringGrid2.Cells [5,1]:=Одна сторона;
Close; end;
If RadioButton2.Checked=true then begin
t:=strtofloat(Form8.StringGrid2.Cells [6,1]);
sum:=t+((t/100)*40);
Form8.StringGrid2.Cells [6,1]:=floattostr(sum);
Form8.StringGrid2.Cells [5,1]:=Две стороны; Close;end;end;end;end.
unit Unit16;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, unit1,Mask,ExtCtrls, jpeg, ComCtrls;
type
TForm16 = class(TForm)
Image1: TImage; Label1: TLabel;Edit1: TEdit;Edit2: TEdit;Label2: TLabel;
Label3: TLabel; Memo1: TMemo; Label6: TLabel; SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton; DateTimePicker1: TDateTimePicker;
MaskEdit2: TMaskEdit; MaskEdit3: TMaskEdit; Label8: TLabel; Label7: TLabel;
Label10: TLabel; Memo4: TMemo; Label4: TLabel;
procedure SpeedButton2Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Edit2KeyPress(Sender: TObject; var Key: Char);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var Form16: TForm16;
implementation
uses Unit10, Unit7;
{$R *.dfm}
procedure TForm16.SpeedButton2Click(Sender: TObject);
Var f: Integer;
begin
if (Edit1.Text=) or(Edit2.Text=)or(Memo1.Text=) then
Showmessage(Сначала введите необходимую информацию!) else
if(MaskEdit3.Text=)and(MaskEdit2.Text=(8) )then
Showmessage(Введите хотя бы один номер телефона!)
else begin
fiozam:=Edit1.Text;
fiozak:=Edit2.Text;
adres:=Memo1.Text;
got:=Memo4.Text;
data:=datetostr(DateTimePicker1.Date);
domtel:=MaskEdit3.Text;
sottel:=MaskEdit2.Text;
for f := 0 to ComponentCount - 1 do begin
if (Components[f] is TEdit) then
(Components[f] as TEdit).Text:=;
if (Components[f] is TMemo) then
(Components[f] as TMemo).Text:=;
if (Components[f] is TMaskEdit) then
(Components[f] as TMaskEdit).Text:=;
form7.Show; Close; end;end;end;
procedure TForm16.SpeedButton1Click(Sender: TObject);
begin Close; end;
procedure TForm16.Edit1KeyPress(Sender: TObject; var Key: Char);
var vrLength, vrSelStart: byte;
begin
with Sender as TEdit do
begin
vrLength := Length(Text);
vrSelStart := SelStart; end;
case Key of А..Я:begin end;
а..я:begin end;
#8:begin end;
#32:begin end;
#46:
else Key := #0;end;end;
procedure TForm16.Edit2KeyPress(Sender: TObject; var Key: Char);
var vrLength, vrSelStart: byte;
begin
with Sender as TEdit do
begin
vrLength := Length(Text);
vrSelStart := SelStart; end;
case Key of А..Я:begin end;
а..я:begin end;
#8:begin end;
#32:begin end;
#46: else Key := #0; end;end;
procedure TForm16.FormCreate(Sender: TObject);
begin datetimepicker1.Date:=Date;end;end.
unit Unit17;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, StdCtrls, jpeg,unit1, ExtCtrls,unit8;
type
TForm17 = class(TForm)
Image1: TImage; SpeedButton8: TSpeedButton; SpeedButton1: TSpeedButton;
ComboBox1: TComboBox; ComboBox2: TComboBox; ComboBox3: TComboBox;
RadioButton1: TRadioButton; RadioButton2: TRadioButton;
RadioButton3: TRadioButton; procedure RadioButton1Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure RadioButton3Click(Sender: TObject);
procedure SpeedButton8Click(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
procedure ComboBox2Change(Sender: TObject);
procedure ComboBox3Change(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var plo,zen:real; Form17: TForm17; senton:string; t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12
,t13,h1,h2,h3,h4,h5,h6,h7,h8,r1,r2,r3,r4:string;
implementation
uses Unit22;
{$R *.dfm}
procedure TForm17.RadioButton1Click(Sender: TObject);
Var f:textfile;
begin
if RadioButton1.Checked=True then begin
ComboBox1.Enabled:=True;
ComboBox2.Enabled:=False;
ComboBox3.Enabled:=False;
{$I-}
AssignFile(f,dir+\Цены\Тонировка\Prof.dat);
{$I+}
If IOResult=0 then begin
Reset(f);
while not EoF(f) do begin
readln(f,t1); readln(f,t2);
readln(f,t3); readln(f,t4);
readln(f,t5); readln(f,t6);
readln(f,t7); readln(f,t8);
readln(f,t9); readln(f,t10);
readln(f,t11); readln(f,t12);
readln(f,t13); end end
else begin Exit; Showmessage(Ошибка чтения файла цены);
CloseFile(f); end;end;end;
procedure TForm17.RadioButton2Click(Sender: TObject);
Var f:textfile;
begin
if RadioButton2.Checked=True then begin
ComboBox1.Enabled:=False;
ComboBox2.Enabled:=True;
ComboBox3.Enabled:=False;
{$I-}
AssignFile(f,dir+\Цены\Тонировка\Dekor.dat);
{$I+}
If IOResult=0 then begin
Reset(f);
while not EoF(f) do begin
readln(f,r1); readln(f,r2);
readln(f,r3); readln(f,r4); end end
else begin Exit; Showmessage(Ошибка чтения файла цены);
CloseFile(f); end;end;end;
procedure TForm17.RadioButton3Click(Sender: TObject);
Var f:textfile;
begin
if RadioButton3.Checked=True then begin
ComboBox1.Enabled:=False;
ComboBox2.Enabled:=False;
ComboBox3.Enabled:=True;
{$I-}
AssignFile(f,dir+\Цены\Тонировка\Udar.dat);
{$I+}
If IOResult=0 then begin
Reset(f);
while not EoF(f) do begin
readln(f,h1); readln(f,h2);
readln(f,h3); readln(f,h4);
readln(f,h5); readln(f,h6);
readln(f,h7); readln(f,h8); end end
else begin Exit; Showmessage(Ошибка чтения файла цены);
CloseFile(f); end;end;end;
procedure TForm17.SpeedButton8Click(Sender: TObject);
Var f: Integer;
begin
if Form8.StringGrid2.Cells[4,1]= then begin
true)and(RadioButton2.Checkedtrue)and
true)then">(RadioButton3.Checked<>true) then
Showmessage(Сначала что-нибудь нужно выбрать!)
else
if (Combobox1.Text=)and(Combobox2.Text=)and
(Combobox3.Text=) then
Showmessage(Выберите конкретный тип тонировки!)
else begin
plo:=StrtoFloat(Form8.StringGrid2.Cells[0,1]);
zen:=strtofloat(Form8.StringGrid2.Cells[6,1])+(strtofloat(senton)*plo);
Form8.StringGrid2.Cells[6,1]:=floattostr(zen);
Form8.StringGrid2.Cells[4,1]:=ton;
for f := 0 to ComponentCount - 1 do
if (Components[f] is TCombobox) then
(Components[f] as TCombobox).Items.Clear;Close;end;
end else begin
Showmessage(Окно можно тонировать только один раз!);
Close;end;end;
procedure TForm17.ComboBox1Change(Sender: TObject);
begin
if ComboBox1.Text=R Silver 20 then begin
ton:=ComboBox1.Text;
senton:=t1;end;
if ComboBox1.Text=R Silver 35 then begin
ton:=ComboBox1.Text;
senton:=t2; end;
if ComboBox1.Text=R Silver 50 then begin
ton:=ComboBox1.Text;
senton:=t3; end;
if ComboBox1.Text=R Grey 10 then begin
ton:=ComboBox1.Text;
senton:=t4; end;
if ComboBox1.Text=R Blue 15 then begin
ton:=ComboBox1.Text;
senton:=t5; end;
if ComboBox1.Text=R Gold 15 then begin
ton:=ComboBox1.Text;
senton:=t6; end;
if ComboBox1.Text=R Green 10 then begin
ton:=ComboBox1.Text;
senton:=t7; end;
if ComboBox1.Text=R Bronze 10 then begin
ton:=ComboBox1.Text;
senton:=t8;end;
if ComboBox1.Text=HP Natural 20 then begin
ton:=ComboBox1.Text;
senton:=t9;end;
if ComboBox1.Text=HP Natural 35 then begin
ton:=Comb