** ****************************************************************************************** * ** EndUser4gl : Exemple d'un langage de 4 ème génération ** ******************************************************************************************* ** ** EndUser4gl Ph Bergougnoux : DEMO ENDUSER 4GL ** ******************************************************************************************* GLOBAL #include "c:\EndUser4gl\4gl\hlp\IncludeSysEU\includesyseu.h" ** *************************************************************************************************************** ** Declare DATA : char,integer,LONG, FLOAT,DOUBLE,const_num,const_string table etc... ** *************************************************************************************************************** long : color1 ,color2 ; integer : exit_trans1,g_Langue :=0 , x,Ival,iLevel,itemTabCtl,y, ItemID,VT_VERTICAL1 :=27 ,VT_VERTICAL2 :=30,Drap :=FALSE ; integer : inverse := 1,noinverse :=0 ; char : text1:255,LabelText:255, szMsg:255 ,firstCar:1 , DirectorySysEndUser4gl:255 := "c:\EndUser4gl\4gl\bin\EndUser4gl.exe", Component:255 := " EndUser4gl : Bergougnoux Consulting \\n Adresse : 14 rue Jean Moulin \\n37550 St Avertin FRANCE\\n Fax : 00 33 2 47 28 58 19 THANK YOU FOR EVALUATING VERSION EndUser4gl www.enduser4gl.com Email : bergou@club-internet.fr "; char : Copyright:255 := " Copyright (c) 2001 EndUser4gl : Bergougnoux Consulting ,France Tous droits réservés Ph Bergougnoux. " ; char : file1:255 := "c:\EndUser4gl\4gl\hlp\instructionsQuery\" ,filePath:255; End_global ** ************************************************************* ** BEGIN PRG ** ************************************************************* Begin_Main EndUser4gl_Sp_Scrn_EndUser4gl(void); EndUser4gl_LanguePresent(void); EndUser4gl_Sp_Scrn_presentation(void); EndUser4gl_PresentationConfig(void); end_main /* *********************************************************************************************************** */ /* DISPLAY FLASH WINDOW */ /* *********************************************************************************************************** */ proc EndUser4gl_Sp_Scrn_EndUser4gl(void) begin_procedure Begin_splash WinExtendstyle : :WS_EX_DLGMODALFRAME Winstyle : :WS_OVERLAPPED & CENTERDIALOG 1,1, 720, 320, " EndUser 4 GL : PictureJpg ",UserDialog PictureJpg 1, 1, "c:\EndUser4gl\4gl\hlp\PgmJpg\enduser4gl.jpg",JpgEndUser1 End_splash ; ShowSplash (UserDialog: 4500) ; SetStatusDialog(UserDialog:SW_HIDE); end_procedure proc EndUser4gl_PresentationConfig(void) begin_procedure Local char : Frtext1:512:= "\\n\\n\\n\\n La présentation suivante du langage ENDUSER4gl va vous permettre de sélectionner des programmes EndUser4gl :\\n\\n" + "\\t - Query \\t: Interrogation guidée d'une base de donnée \\n \\t - Sql \\t\\t : Interrogation experte d'une base de donnée\\n \\t - Windows \\t:"+"Application fonctionnelle \\n \\t - Tri \\t\\t: Trier des fichiers *.txt ou *.doc\\n \\t - Report \\n \\t - Internet\\n\\n\\n"; char : Frtext2:512:=" Vous allez ainsi découvrir les syntaxes simples du langage, ses objectifs fonctionnels et l'emploi des standards Windows pour créer et éxécuter les programmes EndUser4gl" + " :\\n\\n \\t * Notepad.exe ou Write.exe pour créer les programmes Enduser4gl (ext.des fichiers .EU4glExe)\\n \\t"; char : Frtext3:512 :=" * Explorateur pour éxecuter les programmes EndUser4gl \\n \\n Configuration Mini :\\t Pentium II Ram 128Mo \\n Configuration idéale :\\t" + " Pentium III et + 128 Mo Ram et + (surtout pour les fonctions Queries,SQL et Tri)\\n\\n\\n Définitions écran pour la fonction \\"QUERY\\" : 1024 x 768.\\n Plateformes : Windows 95, 98, 2000 et NT.\\n\\n Merci pour cette évaluation et "+"vous rappelle que ENDUSER4gl est en BETA SITE(nouvelle Version).\\n\\n Ph Bergougnoux ", FrText :1124; char: Ustext1:512:= " \\n\\n\\n\\n the following presentation of the ENDUSER4gl language will enable you to select EndUser4gl programs: \\n\\n\\t - Query \\n \\t - Sql \\n \\t -"+" Windows \\n \\t - Sort \\n \\t - Report \\n \\t - Internet \\n\\n\\n You thus will discover simple syntaxes of the language, "+"its functional objectives "+" and the use of the Windows standards \\n to create and carry out the EndUser4gl programs : \\n \\t * Notepad.exe or Write.exe to create the Enduser4gl programs"; char: Ustext2:512:= " (ext .EU4glExe files) \\n \\t * Explorer for Run the EndUser4gl programs \\n \\n.Mini Configuration programs: \\t "+" Pentium II RAM 128Mo \\n Ideal Configuration programs: \\t Pentium III and + 128 Mo RAM an d+ (espcially for the functions Queries,SQL and Sort) \\n\\n"+"Screen definitions for the function \\"QUERY\\" "+" 1024 X 768. \\n\\n Platforms: Windows 95, 98, 2000 and NT "+"\\n\\n\\n Thank you for this evaluation and recalls you that ENDUSER4gl is in BETA SITE.(New Version) "+" \\n\\n PH Bergougnoux ", UsText:1124; integer : exit_transscreenNext :=0; end_Local begin_transaction : Trans1 Execute Transaction with exit_transscreennext != 1 begin_dialog BACKGROUNDHATCHBRUSH : HS_DIAGCROSS color(180,250,94) ** Backgroundcolor : color(255,192,0) **192,193,218) WinExtendstyle : :WS_EX_DLGMODALFRAME Winstyle : :WS_POPUP & CENTERDIALOG 1, 1, 800,600, "EndUser4gl 4 GL : Presentation Next Screen ",UserDialog ** Announce0 is Shadow/Ombre rectangle 12,1,683, 553, Announce0 Attribut : FillColor : 144,136,176 FrameColor : 144,136,176 Announce 10,1,680, 550, Announce1 Attribut : FillColor : 255,255,255 **183,255,0 **192,193,218 FrameColor : 0,0,0 **ShadowText : 1, 0 color(0,0,0) SetColorText : 0,0,0 DrawText : DT_LEFT SetFonts : 12,8,0,0,FW_EXTRABOLD,0,0,0,"Arial" ** SetFonts : 14,11,0,0,FW_NORMAL,0,0,0,"System" **"Times New Roman" Announce 12, 2,675, 40, Wtitle1 Attribut : FillColor : 144,136,176 FrameColor : 250,250,250 SetColorText : 185,50,90 DrawText : DT_CENTER SetFonts : 13,12,0,0,FW_EXTRABOLD,0,0,0,"Arial" rectangle 10,400, 680, 3, Line0 Attribut : FillColor : 255,255,0 FrameColor : 255,255,0 **rectangle 10,180, 680, 3, Line1 Attribut : ** FillColor : 255,0,0 FrameColor : 255,0,0 **rectangle 10,270, 680, 3, Line2 Attribut : ** FillColor : 0,255,0 FrameColor : 0,255,0 **rectangle 10,390, 680, 3, Line3 Attribut : ** FillColor : 0,0,255 FrameColor : 0,0,255 AnimateBmp 530,420 , "c:\enduser4gl\4gl\hlp\pgmBmp\band1.bmp",Bmp23 attribut : image : 5,24,150 Elliptical 100,450,90,90, Cercle1 Attribut : FillColor : 0,180,170 FrameColor : 0,0,0 ShadowText : -1, -3 color(255,255,255) SetColorText : 166, 69,111 DrawText : DT_CENTER SetFonts : 20,9,0,0,FW_EXTRABOLD,1,1,0,"Arial" PictureGif 100, 430, "c:\EndUser4gl\4gl\hlp\PgmGif\droite01.gif",GifEndUser1 ButtonRegionChild 100,450,90,90,ButtonQuit create : use Cursor "c:\EndUser4gl\4gl\hlp\PgmCursor\hand-l.cur" , info " Option @ next " PictureGif 15, 430, "c:\EndUser4gl\4gl\hlp\PgmGif\gifanimate\ani01.gif",GifEndUser2 PictureGif 230,480, "c:\EndUser4gl\4gl\hlp\PgmGif\baranimated\a038.gif",GifEndUser3 end_dialog Begin_Initialize setbkcolorgif(GifEndUser2:white); if( g_Langue = 1) ** 1 French then clear Frtext; StringConcat Frtext1,FrText2,Frtext3 to Frtext; SetWinTxt(Announce1: frtext); SetWinTxt(Wtitle1:"EndUser4gl :\\n Présentation des Applications EndUser4gl "); SetWinTxt(Cercle1:"Exit"); else StringConcat Ustext1,UsText2 to Ustext; SetWinTxt(Announce1: Ustext); SetWinTxt(Wtitle1:"EndUser4gl :\\n Presentation of the EndUser4gl Applications "); SetWinTxt(Cercle1:"Exit"); end_if; ** VT_VERTICAL = 27 orientation possible : 27 to 38 SetAttrTextOrientation (UserDialog:VT_VERTICAL1,noinverse,770,200,YELLOW,red," EndUser4gl ", 26,16,0,0,0,1,"Arial"); x:=680; SetAttrTextOrientation (UserDialog:36,noinverse,x,210,blue,YELLOW ," EndUser4gl ",12,8,0,0,0,1,"Arial"); x := x+20; end_Initialize **ActivAnimateBmp(Bmp23); OpenDialog(UserDialog) ; isOnSetCursor(ButtonQuit) returning (x); if( x Not_Void ) then DrawFocusRect(ButtonQuit); end_if; Begin /* Exit Transaction */ require GetPush(ButtonQuit ) returning (x); if( x Not_Void ) then SetStatusDialog(UserDialog:SW_HIDE); FreeMEmoryString(Frtext1,Frtext2,Frtext3); FreeMEmoryString(UStext1,Ustext2); DestroyAnimateGif(GifEndUser2,GifEndUser3); Exit_Pgm(); end_if; end_begin ; end_transaction ; end_procedure #include "c:\EndUser4gl\4gl\hlp\IncludeSysEU\LanguePresentation.EU4glExe" ** is : proc EndUser4gl_LanguePresent(void); #include "c:\EndUser4gl\4gl\hlp\IncludeSysEU\SplashPresentation.EU4glExe" ** is : proc EndUser4gl_Sp_Scrn_presentation(void);