/* Info Client SCOL 1.0 */ defcom Cinfos=infos S;; // iri defcom Cgoto=goto S;; typeof win=ObjWin;; typeof text=ObjText;; typeof infos=ObjList;; typeof listinf=[S S r1];; fun adipbyname(l,n)= if l==nil then nil else let l->[name adr nxt] in if !strcmp name n then adr else adipbyname nxt n;; fun _contact(a,b,x,sel)= let adipbyname listinf sel -> s in if s!=nil then _on _masterchannel Cgoto [s] else nil;; fun __service(name,adr)= set listinf= [name adr listinf]; _ADDlist infos 0 name; _SELlist infos 0 ;; fun _refreshinfo(a,b)= /*_RSTcombo infos;*/ set listinf=nil; _on _channel Cinfos [_channelIP _channel] // iri old : _on _channel Cinfos [] ;; fun _destroyevent(x,y)=_closemachine;; fun main()= _SETdefaultFont _CRfont _channel 14 0 0 "arial"; set win=_CRwindow _channel nil 50 50 310 160 WN_MENU+WN_MINBOX "Informations"; _CBwinDestroy win @_destroyevent 0; set text=_CRtext _channel win 10 10 290 30 ET_BORDER strcat "Available Services on " _channelIP _channel; set infos=_CRlist _channel win 10 50 290 100 LB_DOWN+LB_VSCROLL; _CBlistDclick infos @_contact 0; _refreshinfo nil nil ;;