Class TForm1 (unit BinaryClock1)

Inherits from

TForm

Constructors



Functions

procedure DrawRoundRectRegion(wnd : HWND; wrect : TRect);

Write to the registry

procedure FMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

Q is the TPoint for the screen

procedure FormCreate(Sender: TObject);

This function converts an integer into a binary string

procedure FormDestroy(Sender: TObject);

This timer controls the colons that blink

procedure Image1DblClick(Sender: TObject);

If right mouse button is raised then repaint form

procedure MapBackGround;


procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

This is the primary timer to get the time and translate to the leds

procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

check for mouse buttons

procedure Panel1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

Q is the TPoint for the screen

procedure RepaintForm;

Draw the form as a rounded rectangle

procedure SwitchLights(SL1,SL2 : integer);

Repaint all the various items in the form (image, leds, etc.

procedure SwitchPM;

This routine switches the LEDS on or off.

procedure Timer1Timer(Sender: TObject);

Here is where it starts, read the registry and set everything up

procedure Timer2Timer(Sender: TObject);

Toggle the upper time display on & off

Properties

Events

Variables

Image1 : TImage;


Image2 : TImage;


Panel1 : TPanel;


Timer1 : TTimer;


Timer2 : TTimer;


LbDown : boolean;


rgn : HRGN;

Private declarations

wrect : TRect;

These are needed for the DrawRectRegion stuff


Constructors


Functions


procedure DrawRoundRectRegion(wnd : HWND; wrect : TRect);

Write to the registry


procedure FMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

Q is the TPoint for the screen


procedure FormCreate(Sender: TObject);

This function converts an integer into a binary string


procedure FormDestroy(Sender: TObject);

This timer controls the colons that blink


procedure Image1DblClick(Sender: TObject);

If right mouse button is raised then repaint form


procedure MapBackGround;


procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

This is the primary timer to get the time and translate to the leds


procedure Panel1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

check for mouse buttons


procedure Panel1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

Q is the TPoint for the screen


procedure RepaintForm;

Draw the form as a rounded rectangle


procedure SwitchLights(SL1,SL2 : integer);

Repaint all the various items in the form (image, leds, etc.


procedure SwitchPM;

This routine switches the LEDS on or off. It is a } {major pain since I opted not to use matrix multiplying} {but did trial and error using the LED size to determine} {the location of the leds.


procedure Timer1Timer(Sender: TObject);

Here is where it starts, read the registry and set everything up


procedure Timer2Timer(Sender: TObject);

Toggle the upper time display on & off


Properties


Events


Variables


Image1 : TImage;


Image2 : TImage;


Panel1 : TPanel;


Timer1 : TTimer;


Timer2 : TTimer;


LbDown : boolean;


rgn : HRGN;

Private declarations


wrect : TRect;

These are needed for the DrawRectRegion stuff