home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
vsecom3.zip
/
WINDOW11.VRX
< prev
next >
Wrap
Text File
|
1994-12-21
|
5KB
|
191 lines
/*:VRX Main
*/
/* Main
*/
Main:
/* Process the arguments.
Get the parent window.
*/
parse source . calledAs .
parent = ""
argCount = arg()
argOff = 0
if( calledAs \= "COMMAND" )then do
if argCount >= 1 then do
parent = arg(1)
argCount = argCount - 1
argOff = 1
end
end
InitArgs.0 = argCount
if( argCount > 0 )then do i = 1 to argCount
InitArgs.i = arg( i + argOff )
end
drop calledAs argCount argOff
/* Load the windows
*/
call VRInit
parse source . . spec
_VREPrimaryWindowPath = ,
VRParseFileName( spec, "dpn" ) || ".VRW"
_VREPrimaryWindow = ,
VRLoad( parent, _VREPrimaryWindowPath )
drop parent spec
if( _VREPrimaryWindow == "" )then do
call VRMessage "", "Cannot load window:" VRError(), ,
"Error!"
_VREReturnValue = 32000
signal _VRELeaveMain
end
/* Process events
*/
call Init
signal on halt
do while( \ VRGet( _VREPrimaryWindow, "Shutdown" ) )
_VREEvent = VREvent()
interpret _VREEvent
end
_VREHalt:
_VREReturnValue = Fini()
call VRDestroy _VREPrimaryWindow
_VRELeaveMain:
call VRFini
exit _VREReturnValue
VRLoadSecondary: procedure
name = arg( 1 )
window = VRLoad( VRWindow(), VRWindowPath(), name )
call VRMethod window, "CenterWindow"
call VRSet window, "Visible", 1
call VRMethod window, "Activate"
return window
/*:VRX Fini
*/
Fini:
window = VRWindow()
call VRSet window, "Visible", 0
drop window
return Retcode
/*:VRX Halt
*/
Halt:
signal _VREHalt
return
/*:VRX Init
*/
Init:
ok = VRSet( "EF_1", "Value", InitArgs.2)
ok = VRSet( "EF_2", "Value", InitArgs.4)
/* ok = VRSet( "EF_2", "Value", InitArgs.4)
ok = VRSet( "EF_7", "Value", InitArgs.3)
ok = VRSet( "EF_3", "Value", InitArgs.5)
ok = VRSet( "EF_6", "Value", InitArgs.6) */
if InitArgs.1 = "RENSUB" then do
ok = VRSet( "Window3", "Caption", "LIBR RENAME SUBLIBRARY")
ok = VRSet( "EF_2", "Enabled", 1)
ok = VRSet( "EF_2", "Visible", 1)
ok = VRSet( "EF_5", "Value", "NEWSUB")
ok = VRSet( "EF_5", "Enabled", 1)
ok = VRSet( "EF_5", "Visible", 1)
ok = VRSet( "EF_3", "Enabled", 0)
ok = VRSet( "EF_3", "Visible", 0)
ok = VRSet( "EF_4", "Enabled", 0)
ok = VRSet( "EF_4", "Visible", 0)
ok = VRSet( "EF_6", "Enabled", 0)
ok = VRSet( "EF_6", "Visible", 0)
ok = VRSet( "EF_7", "Value", InitArgs.3||"\NEWSUB")
end
if InitArgs.1 = "COPY" then do
ok = VRSet( "Window3", "Caption", "COPY MEMBER(S) INPUT")
ok = VRSet( "EF_2", "Enabled", 1)
ok = VRSet( "EF_2", "Visible", 1)
ok = VRSet( "EF_5", "Value", "NEWSUB?")
ok = VRSet( "EF_5", "Enabled", 1)
ok = VRSet( "EF_5", "Visible", 1)
ok = VRSet( "EF_3", "Value", "COPYNME?")
ok = VRSet( "EF_3", "Enabled", 3)
ok = VRSet( "EF_3", "Visible", 3)
ok = VRSet( "EF_4", "Value", InitArgs.2)
ok = VRSet( "EF_4", "Enabled", 4)
ok = VRSet( "EF_4", "Visible", 4)
ok = VRSet( "EF_6", "Enabled", 0)
ok = VRSet( "EF_6", "Visible", 0)
ok = VRSet( "EF_7", "Value", InitArgs.3||"\COPYLIST")
end
if InitArgs.1 = "RENMEM" then do
ok = VRSet( "Window3", "Caption", "LIBR RENAME MEMBER")
ok = VRSet( "EF_2", "Enabled", 1)
ok = VRSet( "EF_2", "Visible", 1)
ok = VRSet( "EF_3", "Value", "OLDNAME")
ok = VRSet( "EF_3", "Enabled", 1)
ok = VRSet( "EF_3", "Visible", 1)
ok = VRSet( "EF_4", "Enabled", 0)
ok = VRSet( "EF_4", "Visible", 0)
ok = VRSet( "EF_5", "Enabled", 0)
ok = VRSet( "EF_5", "Visible", 0)
ok = VRSet( "EF_6", "Value", "NEWNAME")
ok = VRSet( "EF_6", "Enabled", 1)
ok = VRSet( "EF_6", "Visible", 1)
ok = VRSet( "EF_7", "Value", InitArgs.3||"\NEWMEM")
end
/* if InitArgs.1 = "MEM" then do
ok = VRSet( "EF_2", "Enabled", 1)
ok = VRSet( "EF_2", "Visible", 1)
ok = VRSet( "EF_3", "Enabled", 1)
ok = VRSet( "EF_3", "Visible", 1)
end */
Retcode = ""
window = VRWindow()
call VRMethod window, "CenterWindow"
call VRSet window, "Visible", 1
call VRMethod window, "Activate"
drop window
return
/*:VRX PB_1_Click
*/
PB_1_Click:
LIBNAME = VRGet( "EF_1", "Value")
SUBNAME = VRGet( "EF_2", "Value")
MEMNAME = VRGet( "EF_3", "Value")
NEWSUB = VRGet( "EF_5", "Value")
NEWMEM = VRGet( "EF_6", "Value")
NEWLIB = VRGet( "EF_4", "Value")
LIBFILE = VRGet( "EF_7", "Value")
CHKVIEW = VRGet( "CB_1", "Set")
CHKPRT = VRGet( "CB_2", "Set")
Retcode = CHKPRT||","||CHKVIEW||","||LIBFILE||","||LIBNAME||","||SUBNAME||","||MEMNAME||","||NEWSUB|| ","||NEWMEM|| ","||NEWLIB
call Quit
return
/*:VRX PB_2_Click
*/
PB_2_Click:
call Quit
return
/*:VRX Quit
*/
Quit:
window = VRWindow()
call VRSet window, "Shutdown", 1
drop window
return
/*:VRX Window3_Close
*/
Window3_Close:
call Quit
return