;GUI for LzX LhA & DmS DCG
;LzX LhA & DmS must be in C:
;$VER: DZA 1.2b DCG

LAB Start
C:Requestchoice >env:achoice "DCG 1.2b""Select Option""LzX""LhA""DmS""Cancel"

IF $achoice eq "0"
skip EndIt
ENDIF

IF $achoice eq "1"
skip lzx
ENDIF

IF $achoice eq "2"
skip lha
ENDIF

IF $achoice eq "3"
skip dms
ENDIF

lab again
c:requestchoice >env:gchoice "DCG 1.2b""Go_Again""YEA""NAA"

if $gchoice eq "0"
skip endit
endif

if $gchoice eq "1"
skip start back
endif

lab lha
C:Requestchoice >env:lchoice "DCG 1.2b""Select Option""LhA_Files""UnLhA""LhA_Dir""Cancel"

if $lchoice eq "0"
skip EndIt
ENDIF

IF $lchoice eq "1"
skip Tolha
ENDIF

IF $lchoice eq "2"
skip unlha
ENDIF

IF $Ichoice eq "3"
skip vlha
ENDIF

LAB vlha
C:Requestfile Ram: >env:lhafile drawersonly TITLE "Select Directory to LhA"
skip wheretolha

lab wheretolha
c:requestfile Ram: >env:lhadrawer title "Where to LhA"
c:lha -r a -q $lhadrawer $lhafile 

skip again back

LAB Tolha
C:Requestfile Ram: >env:lhafile multiselect pattern="#?|#?.info" TITLE "Select File to LhA"
skip wheretolha

lab wheretolha
c:requestfile Ram: >env:lhadrawer title "Where to LhA"
c:lha a -q $lhadrawer $lhafile

skip again back

LAB Unlha
C:Requestfile Ram: >env:lhafile pattern="#?.lha" TITLE "Select File to UnLhA"
skip Wherelha

LAB Wherelha
C:Requestfile Ram: >env:lhaDrawer TITLE "Where to UnLhA"
c:lha x $lhafile $lhaDrawer

skip again back

lab lzx
C:Requestchoice >env:zchoice "DCG 1.2b""Select Option""LzX_Files""UnLzX""LzX_Dir""Cancel"

if $zchoice eq "0"
skip EndIt
ENDIF

IF $zchoice eq "1"
skip Tolzx
ENDIF

IF $zchoice eq "2"
skip unlzx
ENDIF

IF $zchoice eq "3"
skip vlzx
ENDIF

LAB vlzx
C:Requestfile Ram: >env:lzxfile drawersonly TITLE "Select Directory to LzX"
skip wheretolzx

lab wheretolzx
c:requestfile Ram: >env:lzxdrawer title "Where to LzX"
c:lzx -r a -q $lzxdrawer $lzxfile

skip again back

LAB Tolzx
C:Requestfile Ram: >env:lzxfile multiselect pattern="#?|#?.info" TITLE "Select File to LzX"
skip wheretolzx

lab wheretolzx
c:requestfile Ram: >env:lzxdrawer title "Where to LzX"
c:lzx a -q $lzxdrawer $lzxfile

skip again back

LAB Unlzx
C:Requestfile Ram: >env:lzxfile pattern="#?.lzx" TITLE "Select File to UnLzX"
skip Wherelzx

LAB Wherelzx
C:Requestfile Ram: >env:lzxDrawer TITLE "Where to UnLzX"
c:lzx x $lzxfile $lzxDrawer

skip again back


lab dms
C:Requestchoice >env:dchoice "DCG 1.2b""Select Option""DmS""UnDmS""ViewDmS""Cancel"

if $dchoice eq "0"
skip EndIt
ENDIF

IF $dchoice eq "1"
skip Todms
ENDIF

IF $dchoice eq "2"
skip undms
ENDIF

IF $dchoice eq "3"
skip vdms
ENDIF

lab vdms
c:requestfile Ram: >env:dmsfile title "Select File to View"
c:dms view $dmsfile

skip back again

lab todms
c:requestfile Ram: >env:dmsfile title "Select Device to DmS"
skip wheretodms

lab wheretodms
c:requestfile Ram: >env:dmsdrawer title "Where to DmS"
c:dms read $dmsdrawer from $dmsfile

skip again back


lab undms
c:requestfile Ram: >env:dmsfile pattern="#?.dms" title "Select File to UnDmS"
skip Wheredms

LAB Wheredms
C:Requestfile Ram: >env:dmsDrawer TITLE "Where to UnDmS"
c:dms write $dmsfile to $dmsDrawer

skip again back

lab endit
endcli

END
