Kod: Kodu kopyalamak için üzerine çift tıklayın!
dialog pview {
title "oLd - Resim gösterici"
size -1 -1 105 28
option dbu
edit "", 2, 2 2 89 10, read autohs
button "!", 3, 94 2 9 10
button "search a directory", 4, 2 14 102 12
}
dialog search {
title "Search Query"
size -1 -1 118 88
option dbu
box "Preview", 1, 55 13 60 73
icon 2, 64 24 41 39
list 3, 2 15 50 71, size
button "browse", 4, 7 5 37 9
button "load", 5, 66 69 37 12
}
on *:dialog:search:sclick:4 {
set %folder $sdir($iif(%folder,%folder,C:),choose a folder)
did -r search 3
var %trash $findfile(%folder,*.jpg,serach,did -a search 3 $nopath($1-))
}
on *:dialog:search:sclick:3 {
did -g search 2 " $+ $findfile(%folder,$did(3).seltext,1) $+ "
}
on *:dialog:search:sclick:5 {
var %file " $+ $findfile(%folder,$did(3).seltext,1) $+ "
var %height $pic(%file).height
var %width $pic(%file).width
/window -padk +btl @picture 250 250 %width %height
drawpic @picture 0 0 %file
}
on *:dialog:search:close:* {
if ($window(@picture)) { window -c @picture }
}
on *:dialog:pview:sclick:3 {
var %file $sfile(*.jpg,select a picture,load)
if (%file) {
did -a pview 2 %file
var %height $pic(%file).height
var %width $pic(%file).width
/window -padk +btl @picture 250 250 %width %height
drawpic @picture 0 0 " $+ %file $+ "
}
}
on *:dialog:pview:sclick:4 {
if ($window(@picture)) { window -c @picture }
if (!$dialog(search)) { dialog -m search search }
else { dialog -v search search }
}
on *:dialog:pview:close:* {
if ($dialog(search)) { dialog -x search search }
if ($window(@picture)) { window -c @picture }
}
alias pview {
if (!$dialog(pview)) { dialog -m pview pview }
}
menu menubar {
picture viewer:/pview
}
sekmesine bas, oradan pcde bulunan dosyalardan diledigin resmi sec ve karsina istedigin sey cikacaktir.