/* Trafic Editor - DMS - feb 98 - by Sylvain HUET */ /* Rev. Aug. '98 - by Marc BARILLEY */ typeof statfile=ObjText;; typeof statbutton = ObjButton;; typeof editWin = ObjWin;; fun _OpenStat(d,b,s)= let _PtoScol s -> name in if name==nil then nil else _SETtext statfile name;; fun browse(x,b)= let getPathFile _GETtext statfile "" -> [dir _] in _DLGrflopen _DLGOpenFile _channel editWin dir nil "Stat File (*.txt)\0*.txt\0\0" @_OpenStat 0;; fun load (l) = _SETtext statfile getInfo l "file"; 0;; fun save (filename, n)= ("file"::(_GETtext statfile)::nil):: ("action"::"show"::"show"::nil):: ("action"::"hide"::"hide"::nil):: ("action"::"register"::"register"::nil):: ("action"::"unregister"::"unregister"::nil):: ("eventC"::"shown"::"shown"::nil):: ("eventC"::"hidden"::"hidden"::nil):: ("zone"::"Trafic"::nil):: ("zoneC"::"Trafic"::nil):: nil;; fun IniEditor(s)= let startEditor _channel nil nil nil 315 30 WN_NORMAL EDITOR_NORMAL s "dms/admin/trafic/trafic.dmc" nil nil @load @save nil -> ed in ( set editWin = getEditWin ed; /* loc( _CRtext _channel editWin 5 5 50 20 ET_ALIGN_RIGHT "Stats File"; ) */ _CRtext _channel editWin 5 5 50 20 ET_ALIGN_RIGHT (_locEditor "460-TRAFIC-statsfile" nil); set statfile=_CReditLine _channel editWin 60 5 220 20 ET_DOWN+ET_AHSCROLL nil; set statbutton = _CBbutton _CRbuttonBitmap _channel editWin _LDbitmap _channel _checkpack "Dms/Admin/trafic/open.bmp" 285 5 25 20 0 @browse 0; if s==nil then nil else openDMI ed ); 0;;