Guidance
指路人
g.yi.org
software / rapidq / Examples / QObject / Object / QFlashLabel.inc

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

  
'=======================================================
' Type Objet
' Classe QFlashLabel version 1.0
'=======================================================
     $IFNDEF TRUE
      $DEFINE True 1
     $ENDIF

     $IFNDEF FALSE
      $DEFINE False 0
     $ENDIF

     $IFNDEF boolean
      $DEFINE boolean INTEGER
     $ENDIF

     TYPE QFlashLabel EXTENDS QLABEL
Private:
      TIMER AS QTIMER
Public:
      LightColor AS LONG
      DarkColor AS LONG PROPERTY SET SetDarkColor
      Flash AS boolean PROPERTY SET SetFlash
      State AS SHORT PROPERTY SET SetState
      Speed AS LONG PROPERTY SET SetSpeed

  '=========================================
  ' Proprieté couleur texte label
  '=========================================
      PROPERTY SET SetDarkColor(COLOR AS LONG)
       QFlashLabel.DarkColor=COLOR
       QFlashLabel.font.COLOR=QFlashLabel.DarkColor
      END PROPERTY

  '=========================================
  ' Proprieté état couleur texte label
  '=========================================
      PROPERTY SET SetState(state AS SHORT)
       QFlashLabel.State=state
       IF QFlashLabel.State=1 THEN
        QFlashLabel.font.COLOR=QFlashLabel.LightColor
       ELSE
        QFlashLabel.font.COLOR=QFlashLabel.DarkColor
       END IF
      END PROPERTY

  '=========================================
  ' Proprieté clignotement texte label
  '=========================================
      PROPERTY SET SetFlash(flash AS boolean)
       QFlashLabel.Flash=flash
       IF QFlashLabel.Flash THEN
        QFlashLabel.TIMER.Enabled=true
       ELSE
        QFlashLabel.TIMER.Enabled=false
        QFlashLabel.State=0
        QFlashLabel.font.COLOR=QFlashLabel.DarkColor
       END IF
      END PROPERTY

  '=====================================
  ' proprieté vitesse clignotement
  '=====================================
      PROPERTY SET SetSpeed(speed AS LONG)
       QFlashLabel.TIMER.Interval=speed
       QFlashLabel.Speed=speed
      END PROPERTY

  '=====================================
  ' evenement timer
  '=====================================
      EVENT TIMER.OnTimer
       IF QFlashLabel.State THEN
        QFlashLabel.State=false
        QFlashLabel.font.COLOR=QFlashLabel.DarkColor
       ELSE
        QFlashLabel.State=true
        QFlashLabel.font.COLOR=QFlashLabel.LightColor
       END IF
      END EVENT

      CONSTRUCTOR
       TIMER.Enabled=false
       TIMER.Interval=1000
       Speed=1000
       Transparent=true
       autosize=true
       DarkColor=&h0
       LightColor=&h0
       State=0
      END CONSTRUCTOR
     END TYPE
掌柜推荐
 
 
¥289.00 ·
 
 
¥1,080.00 ·
 
 
¥1,380.00 ·
 
 
¥638.00 ·
 
 
¥1,290.00 ·
 
 
¥1,420.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-09-18 18:08:58