# 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
if (RadioButton1.Checked <> true) and (RadioButton2.Checked <> true) and
(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.StringG...