unit hauscode;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Buttons;

type

  { TFormHauscode }

  TFormHauscode = class(TForm)
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    BitBtn4: TBitBtn;
    BitBtn5: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
    procedure BitBtn3Click(Sender: TObject);
    procedure BitBtn4Click(Sender: TObject);
    procedure BitBtn5Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  FormHauscode: TFormHauscode;
  state_1: Boolean;
  state_2: Boolean;
  state_3: Boolean;
  state_4: Boolean;
  state_5: Boolean;


implementation

{$R *.lfm}

{ TFormHauscode }

procedure TFormHauscode.BitBtn1Click(Sender: TObject);
begin
  if BitBtn1.Color = clLime then
    BitBtn1.Color:= clRed
    state_1:= false;
  else
    BitBtn1.Color:= clLime;
    state_1:= true;
end;

procedure TFormHauscode.BitBtn2Click(Sender: TObject);
begin
  if BitBtn2.Color = clLime then
    BitBtn2.Color:= clRed
    state_2:= false;
  else
    BitBtn2.Color:= clLime;
    state_2:= false;
end;

procedure TFormHauscode.BitBtn3Click(Sender: TObject);
begin
  if BitBtn3.Color = clLime then
    BitBtn3.Color:= clRed
    state_3:= false;
  else
    BitBtn3.Color:= clLime;
    state_3:= false;
end;

procedure TFormHauscode.BitBtn4Click(Sender: TObject);
begin
  if BitBtn4.Color = clLime then
    BitBtn4.Color:= clRed
  else
    BitBtn4.Color:= clLime;
end;

procedure TFormHauscode.BitBtn5Click(Sender: TObject);
begin
  if BitBtn5.Color = clLime then
    BitBtn5.Color:= clRed
  else
    BitBtn5.Color:= clLime;
end;

end.

