Init Method
Class: tastrade
Expand/Collapse source code of procedure Init Source Code
*-- (c) Microsoft Corporation 1995

LOCAL llRetVal, ;
      lnRetVal, ;
      lcUserLevel, ;
      lcBuffer, ;
      llShowIntro, ;
      lcLoginString

*- this class can't be used independent of the application
IF TYPE("m.gTTrade") # 'L' OR !m.gTTrade
	=MESSAGEBOX(CLASSBROWERR_LOC)
	RETURN .F.
ENDIF

*-- Set the caption
This.cMainWindCaption = TASTRADE_LOC

*-- Initialize the base class
llRetVal = Application::Init()
IF llRetVal
  DO menus\intro.mpr
  *-- Put up intro form
  lcBuffer = " " + CHR(0)
  llShowIntro = .T.
  IF GetPrivStr("Defaults", "ShowIntroForm", "", @lcBuffer, LEN(lcBuffer), CURDIR() + INIFILE) > 0
    llShowIntro = (VAL(lcBuffer) = 1)
  ENDIF
  lnRetVal = IIF(llShowIntro, this.DoFormRetVal("introform"), 1)
  DO CASE 
    CASE lnRetVal = 1      && Continue

      IF !DEBUGMODE
        llRetVal = this.Login()
      ELSE
        this.cEmployeeID = ""
        this.cUserLevel = USER_APPDEV_LOC
      ENDIF

    CASE lnRetVal = 2      && Exit
      llRetVal = .F.

  ENDCASE
ENDIF

IF !llRetVal
  	IF THIS.Cleanup()
  		THIS.Cleanup2
	ENDIF
ENDIF

RETURN llRetVal