;***************************************************
dialog sms_prefer {
  title "Настройки"
  size -1 -1 169 114
  option dbu
  edit "", 1, 49 32 109 10
  edit "", 10, 49 42 109 10
  edit "", 11, 49 52 109 10
  edit "", 12, 49 62 109 10
  edit "", 13, 49 72 109 10
  edit "", 14, 49 82 109 10
  button "Сохранить и выйти", 15, 59 95 59 12, default ok
  button "Выйти", 16, 121 95 37 12, cancel
  text "Имя или ник*", 2, 9 33 34 8
  text "Сайт", 3, 9 43 13 8
  text "E-mail", 4, 9 53 14 8
  text "ICQ", 5, 9 63 10 8
  text "Irc сеть", 6, 9 73 20 8
  text "Эти данные будут использованы при отправке добавленных вами операторов на сайт", 7, 8 13 149 16
  text "Канал", 9, 9 83 16 8
  box "Обо мне", 8, 4 4 160 105
}
;***************************************************
alias -l sms_prefer_load {
  if ($2 == $null) return
  did -o $dname $2 1 $readini($nofile($script) $+ option.ini,about_me,$1)
}
;***************************************************
alias -l sms_prefer_save {
  if ($2 == $null) return
  writeini " $+ $nofile($script) $+ option.ini $+ " about_me $1 $2
}
;***************************************************
on 1:dialog:sms_prefer:init:*:{
  sms_prefer_load name 1
  sms_prefer_load site 10
  sms_prefer_load e-mail 11
  sms_prefer_load icq 12
  sms_prefer_load irc 13
  sms_prefer_load chan 14
}
;***************************************************
on 1:dialog:sms_prefer:sclick:*:{
  if ($did == 15) {
    remini  " $+ $nofile($script) $+ option.ini $+ " about_me
    sms_prefer_save name $replace($did(1),$chr(32),$chr(160))
    sms_prefer_save site $did(10)
    sms_prefer_save e-mail $did(11)
    sms_prefer_save icq $did(12)
    sms_prefer_save irc $did(13)
    sms_prefer_save chan $did(14)
  } 
}
;***************************************************
on 1:dialog:sms_prefer:close:*:{
  if (($dialog(sms_dialog) == $null) && ($dialog(sms_add_user) == $null) && ($dialog(sms_log) == $null) && ($dialog(sms_extra) == $null) && ($dialog(sms_adds) == $null) && ($dialog(sms_upgrade) == $null)) .unload -rs sms_other.mrc
  .unload -rs sms_prefer.mrc
}
