home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
vse-esa.zip
/
WINDOW2.VRX
< prev
next >
Wrap
Text File
|
1994-05-31
|
6KB
|
236 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.3)
ok = VRSet( "EF_3", "Value", InitArgs.4)
ok = VRSet( "EF_4","Value","C:\VSECOM\LISTS\RESULTS")
if InitArgs.1 = "LIB" then do
ok = VRSet( "Window2", "Caption", "LIBRARY INPUT")
ok = VRSet( "EF_2", "Enabled", 0)
ok = VRSet( "EF_2", "Visible", 0)
ok = VRSet( "EF_3", "Enabled", 0)
ok = VRSet( "EF_3", "Visible", 0)
ok = VRSet( "EF_4","Value","C:\VSECOM\LISTS\LIBLIST")
end
memparm = LEFT(InitArgs.1,3)
if memparm = "SUB" then do
ok = VRSet( "EF_2", "Enabled", 1)
ok = VRSet( "EF_2", "Visible", 1)
ok = VRSet( "EF_3", "Enabled", 0)
ok = VRSet( "EF_3", "Visible", 0)
end
if InitArgs.1 = "SUBL" then do
ok = VRSet( "Window2", "Caption", "LIST SUBLIB INPUT")
ok = VRSet( "EF_4","Value","C:\VSECOM\LISTS\SUBLIST")
end
if InitArgs.1 = "SUBD" then do
ok = VRSet( "Window2", "Caption", "DELETE SUBLIB INPUT")
end
if InitArgs.1 = "SUBC" then do
ok = VRSet( "Window2", "Caption", "CREATE SUBLIB INPUT")
end
if memparm = "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
if InitArgs.1 = "MEML" then do
ok = VRSet( "Window2", "Caption", "DIR OF MEMBERS INPUT")
ok = VRSet( "EF_4","Value","C:\VSECOM\LISTS\MEMLIST")
end
if InitArgs.1 = "MEMD" then do
ok = VRSet( "Window2", "Caption", "DELETE MEMBER(S) INPUT")
end
if InitArgs.1 = "LOCK" then do
ok = VRSet( "Window2", "Caption", "LOCK MEM INPUT")
ok = VRSet( "EF_2", "Enabled", 1)
ok = VRSet( "EF_2", "Visible", 1)
ok = VRSet( "EF_3", "Enabled", 1)
ok = VRSet( "EF_3", "Visible", 1)
ok = VRSet( "CB_3", "Visible", 1)
end
if InitArgs.1 = "UNLOCK" then do
ok = VRSet( "Window2", "Caption", "UNLOCK MEM INPUT")
ok = VRSet( "EF_2", "Enabled", 1)
ok = VRSet( "EF_2", "Visible", 1)
ok = VRSet( "EF_3", "Enabled", 1)
ok = VRSet( "EF_3", "Visible", 1)
ok = VRSet( "CB_4", "Visible", 1)
end
if InitArgs.1 = "UPLOAD" then do
ok = VRSet( "Window2", "Caption", "UPLOAD MEM INPUT")
ok = VRSet( "EF_2", "Enabled", 1)
ok = VRSet( "EF_2", "Visible", 1)
ok = VRSet( "EF_3", "Enabled", 1)
ok = VRSet( "EF_3", "Visible", 1)
ok = VRSet( "CB_5", "Visible", 1)
end
if InitArgs.1 = "DOWNLOAD" then do
ok = VRSet( "Window2", "Caption", "DOWNLOAD MEM INPUT")
ok = VRSet( "EF_2", "Enabled", 1)
ok = VRSet( "EF_2", "Visible", 1)
ok = VRSet( "EF_3", "Enabled", 1)
ok = VRSet( "EF_3", "Visible", 1)
ok = VRSet( "CB_6", "Visible", 1)
end
if InitArgs.1 = "SEARCH" then do
ok = VRSet( "Window2", "Caption", "SEARCH MEM INPUT")
ok = VRSet( "EF_2", "Enabled", 0)
ok = VRSet( "EF_2", "Visible", 0)
ok = VRSet( "EF_3", "Enabled", 1)
ok = VRSet( "EF_3", "Visible", 1)
end
if InitArgs.1 = "SUBMIT" then do
ok = VRSet( "Window2", "Caption", "SUBMIT JCL FROM PC")
ok = VRSet( "EF_1", "Enabled", 0)
ok = VRSet( "EF_1", "Visible", 0)
ok = VRSet( "EF_2", "Enabled", 0)
ok = VRSet( "EF_2", "Visible", 0)
ok = VRSet( "EF_3", "Enabled", 0)
ok = VRSet( "EF_3", "Visible", 0)
ok = VRSet( "CB_7", "Visible", 1)
ok = VRSet( "EF_4","Value","C:\VSECOM\JOBS\JOBNAME")
end
Retcode = ""
window = VRWindow()
call VRMethod window, "CenterWindow"
call VRSet window, "Visible", 1
call VRMethod window, "Activate"
drop window
return
/*:VRX PB_2_Click
*/
PB_2_Click:
LIBNAME = VRGet( "EF_1", "Value")
SUBNAME = VRGet( "EF_2", "Value")
MEMNAME = VRGet( "EF_3", "Value")
LIBFILE = VRGet( "EF_4", "Value")
CHKVIEW = VRGet( "CB_1", "Set")
CHKPRT = VRGet( "CB_2", "Set")
ok = VRSet( "CB_3", "Visible", 0)
ok = VRSet( "CB_4", "Visible", 0)
ok = VRSet( "CB_5", "Visible", 0)
ok = VRSet( "CB_6", "Visible", 0)
ok = VRSet( "CB_7", "Visible", 0)
ok = VRSet( "EF_1", "Enabled", 1)
ok = VRSet( "EF_1", "Visible", 1)
Retcode = CHKPRT||","||CHKVIEW||","||LIBFILE","LIBNAME||","||SUBNAME","MEMNAME
call Quit
return
/*:VRX PB_3_Click
*/
PB_3_Click:
call Quit
return
/*:VRX Quit
*/
Quit:
window = VRWindow()
call VRSet window, "Shutdown", 1
drop window
return
/*:VRX Window2_Close
*/
Window2_Close:
call Quit
return