/* Count Editor - DMS - feb 98 - by Sylvain HUET */ /* Rev. Aug. '98 - by Marc BARILLEY */ var lastStatDir = "";; typeof statfile = ObjText;; typeof browseStatFileButton = ObjButton;; typeof editWin = ObjWin;; fun openStat (d,b, pack)= if pack==nil then nil else let _PtoScol pack -> name in { let getPathFile name "" -> [dir _] in set lastStatDir = dir; _SETtext statfile name };; fun browse(x,b)= _DLGrflopen _DLGOpenFile _channel editWin lastStatDir nil "Stat File (*.txt)\0*.txt\0\0" @openStat 0;; fun load (l) = let getInfo l "file" -> sfile in { _SETtext statfile sfile; let getPathFile sfile "" -> [dir _] in set lastStatDir = dir; }; 0;; fun save (filename, n)= ("file"::(_GETtext statfile)::nil):: ("action"::"show"::"show"::nil):: ("action"::"hide"::"hide"::nil):: ("action"::"hit"::nil):: ("eventC"::"shown"::nil):: ("eventC"::"hidden"::nil):: ("zone"::"Count"::nil):: ("zoneC"::"Count"::nil):: nil;; fun rflSizeEditWin (wn, blurp, w, h)= _SIZEtext statfile w-95 20 60 5; _SIZEbutton browseStatFileButton 25 20 w-30 5;; fun IniEditor (filename)= let startEditor _channel nil nil nil 315 30 WN_NORMAL EDITOR_NORMAL filename "dms/admin/count/count.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 "560-COUNTE-statsfile" nil); set statfile=_CReditLine _channel editWin 60 5 220 20 ET_DOWN+ET_AHSCROLL nil; set browseStatFileButton = _CBbutton _CRbuttonBitmap _channel editWin _LDbitmap _channel _checkpack "Dms/Admin/count/open.bmp" 285 5 25 20 0 @browse 0; _CBwinSize editWin @rflSizeEditWin 0; if filename==nil then nil else openDMI ed ); 0;;