Блок управления для системы кодового контроля с возможностью внутреннего соединения абонентов, страница 24

procedure Button1Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button5Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

procedure Button4Click(Sender: TObject);

procedure close1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form1: TForm1;

Addressl,AdL,AdH,kORPUS,Datal:integer;

implementation                                                                                     {$R*.DFM}

procedure TForm1. Shape1MouseDown(Sender: TObject; Button:

TMouseButton; Shift: TShiftState; X, Y: Integer);       {address  1}

begin

IF Shape1.Brush.Color:=clWhite then

begin

Shape1.Brush.Color:=clLime;

Address1 :=Address1 +1;

Edit1 .Text:=IntToStr(Address1 )

end 

else

begin

Shape1.Brush.Color:=clWhite;

Address1 :=Address1 -1;

Edit.1Text:=IntToStr(Address1);

end;

end;

procedure TForml.Shape2MouseDown(Sender TObject; Button:

TMouseButton;

Shift: TShiftState; X, Y: Integer);      {address  2}

begin

IF Shape2.Brush.Color:=clWhite then

begin

Shape2.Brush.CoIor:==clLime;

Address1 :=Address1 +2;

Edit1.Text:=IntToStr(Address1)

end

else

begin

Shape2.Brush.Color:=clWhite;

Address1 :=Address1 -2;

Edit1.Text:=IntToStr(Address1);

end;

end;

procedure TForm1.Shape3MouseDown(Sender: TObject; Button:

TMouseButton; Shift: TShiftState; X, Y: Integer);      {address  3}

begin

IF Shape3.Brush.Color:=clWhite then

begin

Shape3.Brush.Color:=clLime;

Address1 :=Address1 +4;

Edit1.Text:=IntToStr(Address1)

end

else

begin

Shape3.Brush.Color:=clWhite;

Address1 :=Address1-4;

Edit1.Text:=IntToStr(Address1);

end;

end;

procedure TForml.Shape4MouseDown(Sender: TObject: Button:

TMouseButton; Shift: TShiftState; X, Y: Integer);        {address  4}

begin

IF Shape4.Brush. Color:=clWhite then

begin

Shape4.Brush.Color:=clLime;

Address1 :=Address1 +8;

Edit1.Text:=IntToStr(Address1 )

end

else

begin

Shape4.Brush.Color:=clWhite;

Address1 :=Address1 -8:

Edit1.Text:=IntToStr(Address1);

end;

end;

procedure TForml.Shape5MouseDown(Sender: TObject; Button:

TMouseButton; Shift: TShiftState; X, Y: Integer);       { address  5}

begin

IF Shape5.Brush.Color:=clWhite then

begin

Shape5.Brush.Color:=clLime;

Address1 :=Address1 +16;

Edit1.Text:=IntToStr(Address1)

end

else

begin

Shape5.Brush.Color:=clWhite;

Address1 :=Address1 -16:

Edit1.Text:=IntToStr(Address1);

end;

end;

procedure TForml.Shape6MouseDown(Sender: TObject; Button:

TMouseButton; Shift: TShiftState: X, Y: Integer);        {address 6}

begin

IF Shape6.Brush.Color:=clWhite then

begin

Shape6.Brush.Color:=clLime;

Addressl:=Addressl+32;

Edit1.Text:=IntToStr(Address1)

end

else

begin

Shape6.Brush.Color:=clWhite;

Address1 :=Address1 -32:

Edit1.Text:=IntToStr( Address1);

end;

end;

procedure TFoiml.Shape7MouseDown(Sender: TObject; Button:

TMouseButton; Shift: TShiftState; X, Y: Integer);      {address 7}

begin

IF Shape7.Brush.Color:=clWhite then

begin

Shape7.Brush.Color:=clLime;

Address1 :=Address1 +64;

Edit1.Text:=IntToStr(Address1)

end

else

begin

Shape7.Brush.Color:=clWhite;

Address1 :=Addressl-64;

Editl.Text:=IntToStr(Address1);

end;

end;

procedure TForml.Shape8MouseDown(Sender: TObject; Button:

TMouseButton; Shift: TShiftState; X, Y: Integer);     {address 8}

begin

IF Shape8.Brush.Color=clWhite then

begin

Shape8.Brush.Color:==clLime;

Address1 :=Address1 +128;

Edit1.Text:=IntToStr(Address1 )

end

else

begin

Shape8. Brush.Color:=clWhite;

Address1:=Address1-128;

Edit1.Text:=IntToStr(Address1);

end;

end;

procedure TForml.Shape9MouseDown(Sender: TObjeet; Button:

TMouseButton; Shift: TShiftState; X, Y: Integer);    {address 9}

begin

IF Shape9.Brush.Color:=clWhite then

begin

Shape9.Brush.Color:=clLime;

Address1 :=Address1 +256;

Edit1.Text:=IntToSlr(Address1)

end

else 

begin

Shape9.Brush.Color:=clWhite;

Address1:=Address1 -256;

Edit1.Text:=IntToStr(Address1);

end;

end;

procedure TForml.Shape10MouSeDown( Sender: TObject; Button:

TMouseButton; Shift: TShiftState; X, Y: Integer):    {address  10}

begin

IF Shape10.Brush.Color:=clWhitc then

begin

Shape10.Brush.Color:=clLime;

Address1 :=Address1 +512;