dialog statbar {
title "statbar"
size -1 -1 1000 14
option dbu
list 1, -1 1 999 10, size
}
on *:dialog:statbar:*:*: {
if ($devent == init) {
;;set mdx info
dll $mdx SetMircVersion $version
dll $mdx MarkDialog $dname
dll $mdx SetControlMDX 1 StatusBar > $mdxe(bars.mdx)
dll $mdx SetBorderStyle $dname 1 noborder
;;set fonts
dll $mdx SetFont $dname 1 Verdana -9 400
;;create cells for the statbar
did -i $dname 1 1 setparts 113 285 430 585 10000
;;create icons
did -i $dname 1 1 seticon 0 small 0, $+ $imgdir(ram.ico)
did -i $dname 1 1 seticon 0 small 0, $+ $imgdir(cpu.ico)
did -i $dname 1 1 seticon 0 small 0, $+ $imgdir(network.ico)
did -i $dname 1 1 seticon 0 small 0, $+ $imgdir(mp3.ico)
did -i $dname 1 1 seticon 0 small 0, $+ $imgdir(upstream.ico)
did -i $dname 1 1 seticon 0 small 0, $+ $imgdir(downstream.ico)
;;write the text into it
did -i $dname 1 1 1 Network: $network
did -i $dname 1 2 1 CPU Usage: $cpuuse
did -i $dname 1 3 1 Ram Usage: $ramuse
did -i $dname 1 4 5 Up stream: $upstream
did -i $dname 1 5 6 Down stream: $downstream
did -i $dname 1 6 4 Current Mp3: $curMp3
;;dock stat bar
dll $dlldir(rebar.dll) Dock $dialog($dname).hwnd > bottom
;;start timer for updateing bar
/upstatbar
./timersbar 0 3 /upstatbar
}
if ($devent == close) {
dll $dlldir(rebar.dll) UnDock left
./timersbar off
}
}