unit MainForm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, ComCtrls, ExtCtrls, ActnList, StdCtrls, Grids, DBGrids,
  DataModule;

type
  TFMain = class(TForm)
    Panel1: TPanel;
    StatusBar1: TStatusBar;
    SpeedButton1: TSpeedButton;
    ActionList1: TActionList;
    ActionClose: TAction;
    Label1: TLabel;
    Shape: TShape;
    procedure ActionCloseExecute(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private

  public

  end;

var
  FMain: TFMain;

implementation
{$R *.dfm}
{------------------------------------------------------------------------------}
procedure TFMain.ActionCloseExecute(Sender: TObject);
begin
   Close();
end;

procedure TFMain.FormActivate(Sender: TObject);
begin
   if DM.SQLConnection.Connected  = True then begin
      Shape.Brush.Color := clGreen;
   end
   else begin
      Shape.Brush.Color := clRed;
   end;
end;

end.
