uo_thread_ws.sru 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. $PBExportHeader$uo_thread_ws.sru
  2. $PBExportComments$线程对象
  3. forward
  4. global type uo_thread_ws from nonvisualobject
  5. end type
  6. end forward
  7. global type uo_thread_ws from nonvisualobject
  8. end type
  9. global uo_thread_ws uo_thread_ws
  10. type prototypes
  11. Subroutine Sleep (ulong dwMilliseconds) Library "KERNEL32.DLL"
  12. end prototypes
  13. type variables
  14. //powerobject inv_pbcomm
  15. powerobject inv_pbcomm
  16. int ins_stopflag=0 //1-stop
  17. end variables
  18. forward prototypes
  19. public subroutine of_start ()
  20. public subroutine of_runue (string arg_uename)
  21. public subroutine of_setparent (powerobject arg_pbcomm)
  22. public subroutine of_runue (powerobject arg_powerobject, string arg_uename)
  23. end prototypes
  24. public subroutine of_start ();do while ins_stopflag=0
  25. inv_pbcomm.triggerevent("ue_thread")
  26. sleep(100)
  27. loop
  28. end subroutine
  29. public subroutine of_runue (string arg_uename);inv_pbcomm.triggerevent(arg_uename)
  30. end subroutine
  31. public subroutine of_setparent (powerobject arg_pbcomm);inv_pbcomm = arg_pbcomm
  32. end subroutine
  33. public subroutine of_runue (powerobject arg_powerobject, string arg_uename);arg_powerobject.triggerevent(arg_uename)
  34. end subroutine
  35. on uo_thread_ws.create
  36. call super::create
  37. TriggerEvent( this, "constructor" )
  38. end on
  39. on uo_thread_ws.destroy
  40. TriggerEvent( this, "destructor" )
  41. call super::destroy
  42. end on