Guidance
指路人
g.yi.org
software / rapidq / Examples / Date & Time / qclock / qclock.inc

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     $INCLUDE "rapidq.inc"
     $RESOURCE tone AS "hournoise.wav"
     application.hintcolor = &h999ff99
     application.hinthidepause = 2000
     DECLARE SUB countdownenabled
     DECLARE SUB minuteevent
     TYPE qclock EXTENDS QPANEL
      timerx1 AS QTIMER
      timerx2 AS QTIMER
      timerx3 AS QTIMER
      labelx2 AS QLABEL
      labelx1 AS QLABEL
      buttonx1 AS QBUTTON
      buttonenabled AS INTEGER
      CONSTRUCTOR
       height = 65
       hint = "QClock component provided free by www.greenchicken.co.uk"
       showhint = 1
       buttonx1.CAPTION="Countdown"
       buttonx1.PARENT = qclock
       buttonx1.left = qclock.width/3 - 10
       buttonx1.top = 15
       buttonx1.visible = 0
       labelx1.PARENT = qclock
       labelx1.CAPTION = "Time: " + TIME$
       labelx1.left = qclock.width/3 - 10
       labelx2.PARENT = qclock
       labelx2.left = qclock.width/3 - 10
       labelx2.transparent = 1
      END CONSTRUCTOR
      SUB minuteevent
       SHOWMESSAGE("New hour, time is: " + TIME$)
      END SUB
      EVENT timerx1.ontimer
       IF qclock.buttonx1.CAPTION = "Countdown" THEN
        qclock.timerx2.enabled = 0
       END IF
       qclock.labelx1.CAPTION = "Time: " + TIME$
       b$ = TIME$
       a$ = RIGHT$(b$, 5)
       IF a$ = "00:00" THEN
        SHOWMESSAGE("New hour, time is: " + TIME$)
        SLEEP 1
       END IF
       a$ = RIGHT$(b$, 2)
       IF a$ = "00" THEN
        CALL minuteevent
        SLEEP 1
       END IF
      END EVENT
      EVENT timerx2.ontimer
      END EVENT
      SUB countdownenabled
       qclock.buttonx1.visible = 1
      END SUB
      EVENT buttonx1.onclick
       qclock.buttonx1.CAPTION="10"
       SLEEP 1
       qclock.buttonx1.CAPTION="9"
       SLEEP 1
       qclock.buttonx1.CAPTION="8"
       SLEEP 1
       qclock.buttonx1.CAPTION="7"
       SLEEP 1
       qclock.buttonx1.CAPTION="6"
       SLEEP 1
       qclock.buttonx1.CAPTION="5"
       SLEEP 1
       qclock.buttonx1.CAPTION="4"
       SLEEP 1
       qclock.buttonx1.CAPTION="3"
       SLEEP 1
       qclock.buttonx1.CAPTION="2"
       SLEEP 1
       qclock.buttonx1.CAPTION="1"
       SLEEP 1
       qclock.buttonx1.CAPTION="Countdown"
      END EVENT
      SUB qclock.onclick
      END SUB
     END TYPE
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Wed 2022-9-28  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-07-28 07:52:18