航班售票管理系统_app.prg
上传用户:jeanshu
上传日期:2015-02-14
资源大小:11145k
文件大小:3k
源码类别:

交通/航空行业

开发平台:

Others

  1. * 航班售票管理系统_APP.PRG
  2. * This file is a generated, framework-enabling component
  3. * created by APPBUILDER 
  4. * (c) Microsoft Corporation
  5. * Framework-generated application startup program
  6. * for E:VF课程设计案例航班售票管理系统 Project
  7. #INCLUDE [..航班售票管理系统_APP.H]
  8. IF TYPE([APP_GLOBAL.Class]) = "C" AND ;
  9.    UPPER(APP_GLOBAL.Class) == UPPER(APP_CLASSNAME)
  10.    MESSAGEBOX(APP_ALREADY_RUNNING_LOC,48, ;
  11.               APP_GLOBAL.cCaption )
  12.    IF VARTYPE(APP_GLOBAL.oFrame) = "O"
  13.       APP_GLOBAL.oFrame.Show()
  14.    ENDIF              
  15.    RETURN
  16.    
  17. ENDIF   
  18. RELEASE APP_GLOBAL
  19. PUBLIC  APP_GLOBAL
  20. LOCAL lcLastSetTalk, llAppRan, lnSeconds, loSplash
  21. LOCAL ARRAY laCheck[1]
  22. lcLastSetTalk=SET("TALK")
  23. loSplash = .NULL.
  24. SET TALK OFF
  25. #IFDEF APP_SPLASHCLASS
  26.    IF NOT EMPTY(APP_SPLASHCLASS)
  27.       loSplash = NEWOBJECT(APP_SPLASHCLASS, APP_SPLASHCLASSLIB)
  28.       IF VARTYPE(loSplash) = "O"   
  29.          lnSeconds = SECONDS()
  30.          loSplash.Show()
  31.       ENDIF
  32.    ENDIF                                
  33. #ENDIF
  34. APP_GLOBAL = NEWOBJECT(APP_CLASSNAME, APP_CLASSLIB)
  35. IF VARTYPE(APP_GLOBAL) = "O" ;
  36.       AND ACLASS(laCheck,APP_GLOBAL) > 0 AND ;
  37.       ASCAN(laCheck,UPPER(APP_SUPERCLASS)) > 0
  38.    APP_GLOBAL.cReference =[APP_GLOBAL]
  39.    APP_GLOBAL.cFormMediatorName = APP_MEDIATOR_NAME
  40.    #IFDEF APP_CD
  41.       APP_CD
  42.    #ENDIF
  43.       
  44.    #IFDEF APP_PATH
  45.       APP_PATH
  46.    #ENDIF   
  47.    
  48.    #IFDEF APP_INITIALIZE
  49.        APP_INITIALIZE
  50.    #ENDIF
  51.    
  52.    IF VARTYPE(loSplash) = "O"
  53.    
  54.       IF SECONDS() < lnSeconds + APP_SPLASHDELAY
  55.          =INKEY(APP_SPLASHDELAY-(SECONDS()-lnSeconds),"MH")
  56.       ENDIF
  57.       loSplash.Release()
  58.       loSplash = .NULL.
  59.    ENDIF
  60.    
  61.    RELEASE laCheck, loSplash, lnSeconds
  62.            
  63.    IF NOT APP_GLOBAL.Show()
  64.       IF TYPE([APP_GLOBAL.Name]) = "C"
  65.          MESSAGEBOX(APP_CANNOT_RUN_LOC,16, ;
  66.                  APP_GLOBAL.cCaption )
  67.          APP_GLOBAL.Release()
  68.       ELSE
  69.          MESSAGEBOX(APP_CANNOT_RUN_LOC,16)
  70.       ENDIF
  71.    ELSE
  72.       llAppRan = .T.
  73.    ENDIF
  74.    
  75.      
  76.    IF TYPE([APP_GLOBAL.lReadEvents]) = "L"
  77.    
  78.       IF APP_GLOBAL.lReadEvents
  79.          * the Release() method was not used
  80.          * but we've somehow gotten out of READ EVENTS...
  81.          APP_GLOBAL.Release()
  82.       ENDIF
  83.    ELSE
  84.       RELEASE APP_GLOBAL
  85.    ENDIF
  86. ELSE
  87.    MESSAGEBOX(APP_WRONG_SUPERCLASS_LOC,16)
  88.    RELEASE APP_GLOBAL
  89. ENDIF
  90. IF lcLastSetTalk=="ON"
  91.    SET TALK ON
  92. ELSE
  93.    SET TALK OFF
  94. ENDIF
  95. IF TYPE([APP_GLOBAL]) = "O"
  96.    * non-read events app
  97.    RETURN APP_GLOBAL
  98. ELSE
  99.    RETURN llAppRan
  100. ENDIF