Buttons

 (Available in 00 TS Base(GUI) - TS_Base_6_StatusBoxDialog)

Source

METHOD Buttons( udwButton1, udwButton2, udwButton3, udwButton4, udwButton5 ) CLASS  ; ...
...TS_StatusBox
LOCAL dwButton1 AS DWORD
LOCAL dwButton2 AS DWORD
LOCAL dwButton3 AS DWORD
LOCAL dwButton4 AS DWORD
LOCAL dwButton5 AS DWORD
LOCAL lIgnore AS LOGIC
LOCAL lRetry AS LOGIC
LOCAL lBreak AS LOGIC
   #IFDEF TS_TRACETIMED_ENABLE
      _TS_TraceTimedEnter( SysAddAtom( PSZ( _CAST, __APPLICATION__ ) ), SysAddAtom ; ...
     ... ( PSZ( _CAST, __MODULE__ ) ), SysAddAtom( PSZ( _CAST, __ENTITY__ ) ) )
   #ENDIF
   lIgnore:=FALSE
   lRetry:=FALSE
   lBreak:=FALSE
   SELF:_ButtonCount:=0U
   SELF:_DefaultChoice:=EC_ALERT
   IF IsNumeric( udwButton1 )
      dwButton1:=udwButton1
   ELSE
      dwButton1:=SE_NOBUTTON
   END
   IF IsNumeric( udwButton2 )
      dwButton2:=udwButton2
   ELSE
      dwButton2:=SE_NOBUTTON
   END
   IF IsNumeric( udwButton3 )
      dwButton3:=udwButton3
   ELSE
      dwButton3:=SE_NOBUTTON
   END
   IF IsNumeric( udwButton4 )
      dwButton4:=udwButton4
   ELSE
      dwButton4:=SE_NOBUTTON
   END
   IF IsNumeric( udwButton5 )
      dwButton5:=udwButton5
   ELSE
      dwButton5:=SE_NOBUTTON
   END
   IF SELF:_TestForButton( SE_RETRY, dwButton1, dwButton2, dwButton3 ; ...
  ... , dwButton4, dwButton5 ) .AND. TS_ErrorSysAborting( )==FALSE
      IF SELF:_DefaultChoice==EC_ALERT
         SELF:_DefaultChoice:=EC_RETRY
      END
      SELF:_AddButton( 0U, #ChoiceRetry, "&Retry", EC_RETRY,  ; ...
     ... RGB( 0, 255, 0 ), RGB( 0, 0, 255 ) )
      lRetry:=TRUE
   END
   IF lRetry==FALSE .AND. SELF:_TestForButton( SE_IGNORE, dwButton1 ; ...
  ... , dwButton2, dwButton3, dwButton4, dwButton5 ) .AND. TS_ErrorSysAborting( ) ; ...
  ... ==FALSE
      IF SELF:_DefaultChoice==EC_ALERT
         SELF:_DefaultChoice:=EC_RETRY
      END
      SELF:_AddButton( 0U, #ChoiceIgnore, "&Ignore", EC_IGNORE ; ...
     ... , RGB( 0, 127, 255 ), RGB( 0, 0, 0 ) )
      lIgnore:=TRUE
   END
   IF CanBreak( )
      IF lRetry==FALSE .AND. lIgnore==FALSE .AND. SELF:_TestForButton ; ...
     ... ( SE_BREAK, dwButton1, dwButton2, dwButton3, dwButton4, dwButton5 ) .AND.  ; ...
     ... TS_ErrorSysAborting( )==FALSE
         IF SELF:_DefaultChoice==EC_ALERT
            SELF:_DefaultChoice:=EC_BREAK
         END
         SELF:_AddButton( 0U, #ChoiceBreak, "&Break", EC_BREAK ; ...
        ... , RGB( 255, 0, 0 ), RGB( 0, 255, 255 ) )
         lBreak:=TRUE
      END
   END
   IF ( lRetry==FALSE .AND. lIgnore==FALSE .AND. lBreak==FALSE .AND. SELF:_TestForButton ; ...
  ... ( SE_ABORT, dwButton1, dwButton2, dwButton3, dwButton4, dwButton5 ) ) .OR.  ; ...
  ... TS_ErrorSysAborting( )
      IF SELF:_DefaultChoice==EC_ALERT
         SELF:_DefaultChoice:=EC_ABORT
      END
      SELF:_AddButton( 0U, #ChoiceAbort, "&Abort", EC_ABORT,  ; ...
     ... RGB( 0, 0, 0 ), RGB( 255, 255, 255 ) )
   END
   IF SELF:_ButtonCount<1U
      IF SELF:_DefaultChoice==EC_ALERT
         SELF:_DefaultChoice:=EC_IGNORE
      END
      SELF:_AddButton( 0U, #ChoiceIgnore, "&OK", EC_IGNORE, RGB ; ...
     ... ( 0, 127, 255 ), RGB( 0, 0, 0 ) )
   END
   IF SELF:_StatusStatus<>NULL_OBJECT
      SELF:_AddButton( 2U, #ChoiceMoreLess, "&"+IIF( SELF:_ShowMore ; ...
     ... , TS_S_LESS, TS_S_MORE ), EC_ALERT, RGB( 255, 255, 255 ), RGB( 0, 0, 255  ; ...
     ... ) )
   END
   IF TS_ErrorSysGetIsDebug( )
      IF SELF:_TestForButton( SE_DEBUG, dwButton1, dwButton2,  ; ...
     ... dwButton3, dwButton4, dwButton5 )
         SELF:_AddButton( IIF( SELF:_StatusStatus ; ...
        ... <>NULL_OBJECT, 3U, 2U ), #ChoiceDebug, "&Debug(*)", EC_DEBUG, RGB( 255 ; ...
        ... , 255, 0 ), RGB( 0, 0, 255 ) )
      ELSE
         SELF:_AddButton( IIF( SELF:_StatusStatus ; ...
        ... <>NULL_OBJECT, 3U, 2U ), #ChoiceDebug, "&Debug(**)", EC_DEBUG, RGB( 255 ; ...
        ... , 255, 0 ), RGB( 0, 0, 255 ) )
      END
      IF SELF:_StatusError<>NULL_OBJECT .AND. SELF:_StatusError:CanRetry
         SELF:_AddButton( 0U, #ChoiceRetry, "&Retry(*)", EC_RETRY ; ...
        ... , RGB( 0, 255, 0 ), RGB( 0, 0, 255 ) )
      END
      SELF:_AddButton( 0U, #ChoiceIgnore, "&Ignore(*)", EC_IGNORE ; ...
     ... , RGB( 0, 127, 255 ), RGB( 0, 0, 0 ) )
      IF CanBreak( )
         SELF:_AddButton( 0U, #ChoiceBreak, "&Break(*)", EC_BREAK ; ...
        ... , RGB( 255, 0, 0 ), RGB( 0, 255, 255 ) )
      END
      SELF:_AddButton( 0U, #ChoiceAbort, "&Abort(*)", EC_ABORT ; ...
     ... , RGB( 0, 0, 0 ), RGB( 255, 255, 255 ) )
   END
   #IFDEF TS_TRACETIMED_ENABLE
      _TS_TraceTimedLeave( SysAddAtom( PSZ( _CAST, __APPLICATION__ ) ), SysAddAtom ; ...
     ... ( PSZ( _CAST, __MODULE__ ) ), SysAddAtom( PSZ( _CAST, __ENTITY__ ) ) )
   #ENDIF
RETURN SELF