( alarm day 17.05.2001 )

needs SetAlarm alarms
needs beep sound
needs case case
needs nilEvent events
needs ShowForm forms

api: TimGetSeconds
api: FrmAlert

1000 constant MainForm

: showAlarm
   1000 FrmAlert drop
;

:noname 
( PBP prvglob glob lcode -- rcode )
 case
  CmdAlarmTriggered of beep endof
  CmdDisplayAlarm of showAlarm endof
 endcase
 0
; SetupLCHandler

: go
  MainForm ShowForm
  begin
    ekey ctlEnterEvent =
    if
      event itemID 1005 =
      if 0 TimGetSeconds 10 +
         SetAlarm bye
      then
    then
  again
;

' go to PilotMain
s" Alarm" 'LHJK' build

'rsrc' 'Hasf' use-resource
'tFRM' 1000 CopyRes
'Talt' 1000 CopyRes
bye