/* interface pour report de bugs / suggestions */ /* par iri - http://www.irizone.net - juin 2004 */ typeof win = ObjWin;; typeof pseudo = ObjText;; typeof mail = ObjText;; typeof myOS = ObjText;; typeof voyager = ObjText;; typeof memory = ObjText;; typeof vdhdms = ObjText;; typeof display = ObjText;; typeof nameSite = ObjText;; typeof comments = ObjText;; typeof buttonjpeg = ObjButton;; typeof file = P;; defcom Csend = send S S;; defcom Cview = view;; /* fun [] I */ fun verifjpg()= if file != nil then let _LDjpeg _channel file -> bmp in if bmp == nil then (_DLGMessageBox _channel win "ERROR !" (_loc this "errorFile" nil) 0; set file = nil; _DSbitmap bmp; 0) else (_DSbitmap bmp; 0) else 0;; /* fun [openBox I P] I */ fun _openFile(dlg, u, p)= set file = p; verifjpg; _SETbuttonName buttonjpeg strcat strcat (_loc this "jpegonly" nil) " - " _PtoScol file; 0;; /* fun [ObjButton I] I */ fun cbOpen(btn, u)= _DLGrflopen _DLGOpenFile _channel win nil nil "jpeg\0*.jpg\0\0" @_openFile 0 ;; /* fun [ObjButton I I I [P r1]] I */ fun cbFiles(btn, u, x, y, files)= let files -> [p next] in set file = p; verifjpg; _SETbuttonName buttonjpeg strcat strcat (_loc this "jpegonly" nil) " - " _PtoScol file; 0;; /* fun [OBjButton I] I */ fun cbOk(btn, u)= let linebuild (_GETtext pseudo):: (_GETtext mail):: (_GETtext myOS):: (_GETtext voyager):: (_GETtext memory):: (_GETtext vdhdms):: (_GETtext display):: (_GETtext nameSite):: (_GetFileNameFromP file):: nil -> p in _DMSsend this Csend [p _GETtext comments]; if file != nil then _DMSupload this _GetFileNameFromP file _getpack file nil else 0;; /* fun [ObjButton I] I */ fun viewComments(btn, u)= _DMSsend this Cview [];; /* fun [] S */ fun searchPseudo()= let _getpack _checkpack "locked/conf/3dlogin/login.conf" -> name in /* login 3d */ if name == nil then DMSlogin else name;; /* fun [] S */ fun searchMail()= let _getress "DefaultEmail" -> email in if email == nil then (_loc this "entermail" nil) else email;; /* fun [] S */ fun searchOS()= let _GETosVersion - 256 -> n in if n == 1 then "MS Windows 95" else if n == 2 then "MS Windows 98" else if n == 3 then "MS Windows Me" else if n == 4 then "MS Windows NT4" else if n == 5 then "MS Windows 2000" else if n == 6 then "MS Windows XP" else if n == 7 then "MS windows version ?" else if n == 8 then "Mac OS" else if n == 9 then "Unix or U-L" else if _platform == 0 then "win" else if (_platform == 1) || (_platform == 2) then "unix" else if _platform == 3 then "mac" else "unknown";; /* fun [] S */ fun searchVoyager()= strcatn (itoa _version)::" "::_versionname::nil;; /* fun [] S */ fun searchDhdms()= itoa _DHDMSgetVersion;; /* fun [] S */ fun searchDisplay()= if MX3hardware then strcat strcat (_loc this "hardware" nil) " " _getress "Wiz3d" else (_loc this "software" nil);; /* fun [[ObjWin I I I I] S] I */ fun _resize(x,s)= let x->[wn x y w h] in ( _SIZEwindow win w h x y; ); _PAINTwindow win; 0;; fun _end(a)= _DMSdelete this;; fun _destroyevent(a, b)= _DSwindow win;; fun _paint(a, b)= 0;; /* fun [] I */ fun createInterface()= let _DMSgetZone this "debug" @_end @_resize nil -> [wn x y wZone hZone] in ( set win = if wn == nil then _CRwindow _channel DMSwin nil nil 500 480 WN_MENU _DMSgetName this else _CRwindow _channel wn x y wZone hZone WN_CHILDINSIDE|WN_NOCAPTION|WN_NOBORDER _DMSgetName this; _CBwinDestroy win @_destroyevent 0; _CBwinPaint win @_paint 0; let _GETwindowPositionSize win -> [_ _ w h] in ( _CRtext _channel win 5 5 w-10 20 ET_BORDER (_loc this "title" nil); _CRtext _channel win 5 30 80 20 ET_BORDER (_loc this "login" nil); _CRtext _channel win 5 55 80 20 ET_BORDER (_loc this "mail" nil); _CRtext _channel win 5 80 80 20 ET_BORDER (_loc this "OS" nil); _CRtext _channel win 5 105 80 20 ET_BORDER (_loc this "memory" nil); _CRtext _channel win 5 130 80 20 ET_BORDER (_loc this "voyager" nil); _CRtext _channel win 5 155 80 20 ET_BORDER (_loc this "dhdms" nil); _CRtext _channel win 5 180 80 20 ET_BORDER (_loc this "display" nil); _CRtext _channel win 5 205 80 20 ET_BORDER (_loc this "sitename" nil); _CRtext _channel win 5 230 w-10 20 ET_BORDER (_loc this "comments" nil); _CRtext _channel win 5 380 w-10 20 ET_BORDER (_loc this "joined" nil); set pseudo = _CReditLine _channel win 90 30 w-95 20 ET_DOWN searchPseudo; set mail = _CReditLine _channel win 90 55 w-95 20 ET_DOWN searchMail; set myOS = _CRtext _channel win 90 80 w-95 20 ET_DOWN searchOS; set memory = _CReditLine _channel win 90 105 w-95 20 ET_DOWN|ET_NUMBER "?"; set voyager = _CRtext _channel win 90 130 w-95 20 ET_DOWN searchVoyager; set vdhdms = _CRtext _channel win 90 155 w-95 20 ET_DOWN searchDhdms; set display = _CRtext _channel win 90 180 w-95 20 ET_DOWN searchDisplay; set nameSite = _CRtext _channel win 90 205 w-95 20 ET_DOWN DMSname; set comments = _CReditText _channel win 5 255 w-10 120 ET_DOWN|ET_HSCROLL|ET_VSCROLL ""; set buttonjpeg = _CRbutton _channel win 5 405 w-10 40 PB_DRAGDROP (_loc this "jpegonly" nil); _CBbutton buttonjpeg @cbOpen 0; _CBbuttonDropFile buttonjpeg @cbFiles 0; _CBbutton _CRbutton _channel win 5 455 80 20 0 (_loc this "view" nil) @viewComments 0; _CBbutton _CRbutton _channel win 90 455 w-95 20 0 (_loc this "send" nil) @cbOk 0; _PAINTwindow win; ) ); 0;; /* fun [S] I */ fun IniDMI(param)= 0;; /* fun [] I */ fun __retour()= _DLGMessageBox _channel win "ERROR !" (_loc this "errorMsg" nil) 0; 0;; fun _closeView(wn, t)= _DStext t; _DSwindow wn;; fun __comments(param)= let _CRwindow _channel win 0 0 400 400 WN_MENU "Debug - View" -> winView in let _CRtext _channel winView 0 0 400 400 ET_HSCROLL|ET_VSCROLL|ET_DOWN param -> text in ( _CBwinDestroy winView @_closeView text; 0 );; fun __start()= createInterface; 0;;