on *:start:{  
  .dialog -ma tb tb
  .dialog -ma tyr tyr
  .dialog -ma tyl tyl  
  }

on *:connect: {
  update.tb
  title
  .timerlags 0 10 baglantine
}

on *:disconnect: {
  update.tb
  title
  .timerlags off 
}

on *:close:*: {
  update.tb
}


alias baglantine { 
  if ($server) {
    set %ticks $ticks
    .raw ping $scid($activecid).server
  }
}

alias update.tb {
  if (!$dialog(tb)) { halt }
  else {
    ;scid $activecid 
    if ($scid($activecid).status = connecting || $scid($activecid).status = connected ) { 
      did -o tb 1 3 +a 1 Baglan $chr(9) Bir Sunuya Bagli / Baglantiya Gecilmis | halt 
    } 
    if ($scid($activecid).status = disconnecting || $scid($activecid).status = disconnected ) { 
      did -o tb 1 3 +a 2 Baglan $chr(9) Bir Sunuya Bagli Degil / Baglantiya Gecilmemis | halt
    }
  }
}


dialog tb {
  size 0 0 $window(-1).x 17
  list 1, 2 2 2978 25, size
  icon scripting\ico\ico\7p.jpg
  option dbu,pixels
  ;box "" 12, 3 53 105 31
  ;box "" 13, 3 -3 531 63
  ;box "" 23, 108 53 213 31
  ;box "" 33, 320 53 213 31
  

  
}

on *:dialog:tb:*:*: {
  if ($devent == init) {
    mdx MarkDialog $dname
    mdx SetDialog $dname style
    mdx SetBorderStyle $dname 1 staticedge
   mdx SetFont $dname 1 Turkish 14 800 Arial
  mdx SetColor $dname 1,2,3,4 background %renkroo
  mdx SetColor $dname 1,2,3,4,5,6,7,8,9,10 text 8454143
  mdx SetFont $dname 3 +a 20 600 arial
  mdx SetColor $dname 2,3 textbg 8454143
    rebar HideToolbar .
    rebar Dock $dialog(tb).hwnd > top
    mdx SetBorderStyle 1
    mdx SetControlMDX $dname 1 toolbar wrap arrows nodivider noheader > $bars  
    mdx SetControlMDX $dname 73,77 Progressbar smooth > $ctl
    mdx SetControlMDX $dname 1 list flat wrap arrows autoarrange nosortheader icon extsel labeltip hottrack flatsb nodivider >  $wdx
    did -i $dname 1 1 setscheme $rgb(224,226,235) $rgb(224,226,235)
    did -i $dname 1 1 bmpsize  32 32
    did -i $dname 1 1 setimage icon large icons\0.ico
    did -i $dname 1 1 setimage icon large icons\1.ico
    did -i $dname 1 1 setimage icon large icons\2.ico
    did -i $dname 1 1 setimage icon large icons\2.ico
    did -i $dname 1 1 setimage icon large icons\3.ico
    did -i $dname 1 1 setimage icon large icons\tops.ico
    did -i $dname 1 1 setimage icon large icons\venom.ico
    did -i $dname 1 1 setimage icon large icons\ruya.ico
    did -i $dname 1 1 setimage icon large icons\tema.ico
    did -i $dname 1 1 setimage icon large icons\yazi.ico
    did -i $dname 1 1 setimage icon large icons\away.ico
    did -i $dname 1 1 setimage icon large icons\logs.ico
    did -i $dname 1 1 setimage icon large icons\mirc.ico
    did -i $dname 1 1 setimage icon large icons\10.ico
    did -i $dname 1 1 setimage icon large icons\media.ico
    did -i $dname 1 1 setimage icon large icons\yonay.ico
    did -a $dname 1 +a -
    did -a $dname 1 +a 1 $chr(32) Baglan $chr(9) Baglanti Ayarlari
    did -a $dname 1 +a - 
    did -a $dname 1 +a 4  $chr(32) Baglanti Menusu $chr(9) $+ Dialog Baglanti Paneli
    did -a $dname 1 +a -
    did -a $dname 1 +a 5  $chr(32) Ayarlar $chr(9) $+ Kanallar ve Favoriler
    did -a $dname 1 +a -
    did -a $dname 1 +a 6  $chr(32) Kanala Gir $chr(9) $+ Kanala Girme
    did -a $dname 1 +a -
    did -a $dname 1 +a 7  $chr(32) Korumalar $chr(9) $+ Korumalar ( Kisisel & Kanal )
    did -a $dname 1 +a -
    did -a $dname 1 +a 8  $chr(32) Araclar  $chr(9) $+ Program Ayarlari
    did -a $dname 1 +a -
    did -a $dname 1 +a 9  $chr(32) Gurunum $chr(9) $+ Gorunum Ayarlari
    did -a $dname 1 +a -

    did -a $dname 1 +a 10  $chr(32) Yazi Rengi $chr(9) $+ font ayarlari Renk
    did -a $dname 1 +a -

    did -a $dname 1 +a 11  $chr(32) Away Menuler $chr(9) $+ Mesgul Menusu
    did -a $dname 1 +a -

    did -a $dname 1 +a 12  $chr(32) Loglar $chr(9) $+ Yazi Kayitlari    
did -a $dname 1 +a -
 did -a $dname 1 +a 13  $chr(32) Hakkinda $chr(9) $+ Program Hakkinda Bilgi 
did -a $dname 1 +a -
   did -a $dname 1 +a 14  $chr(32) Forum $chr(9) $+ Forum Sitesi
    did -a $dname 1 +a -
  did -a $dname 1 +a 15  $chr(32) Radyo Ac  $chr(9) $+ Ozlem FM'e Baglar   
 did -a $dname 1 +a -
did -a $dname 1 +a 16  $chr(32) Cikis $chr(9) $+ Programi Kapatir 
   did -a $dname 1 +a -
  did -a $dname 1 +a 17 . . : : : Baslangic Saati : $time : : : . .
did -a $dname 1 +a -

    if ($appactive) { showmirc -s }
  }
  
  if $devent == sclick {
    if $did == 1 {
      if ($did($dname,1).sel = 3) {
        if ($scid($activecid).status == connecting) || ($scid($activecid).status == connected) || ($status == connected) { scid $activecid disconnect  | halt  }
        elseif ($status != connected) || ($scid($activecid).status == connected) { scid $activecid server  }
        update.tb
        did -f $dname 1
        scid $activecid window -a "status window"
      }
    }



       if ($did($dname,1).sel = 5) {
        /dialog -m baglanti baglanti
      }
      if ($did($dname,1).sel = 7) {
        /admin5
      }
      if ($did($dname,1).sel = 9) {
        /dialog -m join join
      }
      if ($did($dname,1).sel = 11) {
        /admin2
      }
      if ($did($dname,1).sel = 13) {
        /cpanel
      }
      if ($did($dname,1).sel = 15) {
        theme
      }
      if ($did($dname,1).sel = 17) {
        /dialog -m color color
      }
      if ($did($dname,1).sel = 19) {
        /admin4
      }
if ($did($dname,1).sel = 21) {
        /logs
}
      if ($did($dname,1).sel = 23) {
        /dialog -m yeni yeni
}
      if ($did($dname,1).sel = 25) {
         /run www.ozlemsohbet.com
}
      if ($did($dname,1).sel = 27) {  
 /j avrupa | Ozlem-Fm www.ozlemsohbet.com/radyo
 }
    

      if ($did($dname,1).sel = 29) {
        eminmi
      }

    }
  }
}


