G4C

;Path Finder part 2 for NetBar v6.0
;Kevin Anderson   andersok@mail.bogo.co.uk  {using Gui4Cli by D.Keletsekis}

;This Gui gets the DialEtc of the users Dialup scripts etc
;and saves them to variables in the ENV: drawer as well as copies them
;to ENVARC: so they are loaded each time.

WinBig 50 20 380 190 'Log On Scripts etc'
WinType 01010001
WinFont Times.font 11 000

;On loading read the ENV variables (if exist) and update Text boxes

xOnLoad
UpDate DialEtc 1 $.D.NetBar          ;get the App paths from ENV: Variable
UpDate DialEtc 2 $.H.NetBar          ;and put them in the TextIn gadgets
UpDate DialEtc 3 $.A.NetBar          ;so user can see what he has chosen

BOX 0 0 380 190 IN RIDGE

;Dialup/Hangup Script Choosers

Text 40 10 100 20 'Choose your DialUp and HangUp scripts if needed' 50 NOBOX
GadFont times.font 13 010            ;change font size and make it bold

Text 12 40 10 20 'Dialup:' 10 NOBOX   ;put a label in front of the xTextIn
GadFont Times.font 13 010
xTextIn 50 40 300 20 '' .D.NetBar 'Dialup Script etc' 80  ;contents of xTextIn
GadID 1                                                   ;is saved in Variable
xButton 355 40 20 20 'Get'
ReqFile 10 10 100 300 'Choose your Dialup Script' LOAD .D.NetBar '' ;get path
UpDate DialEtc 1 $.D.NetBar          ;update the xTextIn gadget as above

Text 7 70 10 20 'Hangup:' 10 NOBOX
GadFont Times.font 13 010
xTextIn 50 70 300 20 '' .H.NetBar 'Hangup Script etc' 80  
GadID 2
xButton 355 70 20 20 'Get'
ReqFile 10 10 100 300 'Choose your Hangup Script' LOAD .H.NetBar ''
UpDate DialEtc 2 $.H.NetBar

Text 40 100 10 20 'Choose your UnArchiving Drawer (if RAM DISK type Ram:)' 60 NOBOX
GadFont Times.font 13 010

xTextIn 50 130 300 20 '' .A.NetBar 'T:' 80
GadID 3
xButton 355 130 20 20 'Get'
ReqFile 10 10 100 300 'Choose your UnArc Drawer' LOAD .A.NetBar ''
UpDate DialEtc 3 $.A.NetBar

;Save button to save ENV variables for DialEtc etc and copy to ENVARC

xButton 180 160 60 20 '_Save'           ;put button, when pressed saves all paths 
GadFont Times.font 15 010               ;to ENV: and also copies to ENVARC: so
CLI 'Copy ENV:??.NetBar ENVARC: >NIL:'  ;they are always copied to ENV: on reboot etc
GuiClose DialEtc

xOnClose
GuiClose DialEtc  ;Best to be safe than sorry


RESIZE_SMALL 0 0 359 170 DialEtc

RESIZE_BIG 0 0 450 231 DialEtc
