Code : Tout sélectionner
;---------------------------------
;-FENETRE PRINCIPALE
;---------------------------------
If OpenWindow(#WinMain,0,0,1014, 718, #PROGRAMNAME, #PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_ScreenCentered|#PB_Window_MinimizeGadget)
AddKeyboardShortcut(#WinMain, #PB_Shortcut_Control | #PB_Shortcut_O, 1)
AddKeyboardShortcut(#WinMain, #PB_Shortcut_Control | #PB_Shortcut_N, 2)
AddKeyboardShortcut(#WinMain, #PB_Shortcut_Control | #PB_Shortcut_S, 3)
;AddKeyboardShortcut(#WinMain, #PB_Shortcut_Control | #PB_Shortcut_I, 4)
AddKeyboardShortcut(#WinMain, #PB_Shortcut_Control | #PB_Shortcut_P, 5)
AddKeyboardShortcut(#WinMain, #PB_Shortcut_Control | #PB_Shortcut_Q, 7)
AddKeyboardShortcut(#WinMain, #PB_Shortcut_Control | #PB_Shortcut_G, 8)
AddKeyboardShortcut(#WinMain, #PB_Shortcut_Control | #PB_Shortcut_L, 11)
AddKeyboardShortcut(#WinMain, #PB_Shortcut_Control | #PB_Shortcut_R, 12)
AddKeyboardShortcut(#WinMain, #PB_Shortcut_Control | #PB_Shortcut_H, 15)
If CreateImageMenu(0, WindowID(#WinMain)) ;{
MenuTitle("Fichier")
MenuItem( 1, "Ouvrir une évaluation"+Chr(9)+"Ctrl+O", Image8)
MenuItem( 2, "Nouvelle évaluation"+Chr(9)+"Ctrl+N", Image5)
MenuBar()
MenuItem( 3, "Enregistrer l'évaluation courante"+Chr(9)+"Ctrl+S", Image7)
MenuBar()
MenuItem( 5, "Ouvrir une image"+Chr(9)+"Ctrl+P",Image32)
MenuBar()
MenuItem( 7, "Quitter"+Chr(9)+"Ctrl+Q", Image1)
MenuTitle("Edition")
MenuItem(8, "Grille d'évaluation"+Chr(9)+"Ctrl+G",Image2)
MenuItem(9, "Déclaration moins de 5000 personnes",Image2)
MenuItem(10, "Déclaration plus de 5000 personnes",Image2)
MenuTitle("?")
MenuItem(11, "Logigramme procédure de déclaration"+Chr(9)+"Ctrl+L",Image2)
MenuItem(12, "Référentiel National des M.S.C."+Chr(9)+"Ctrl+R",Image2)
MenuBar()
MenuItem(13, "A propos",Image0)
MenuBar()
MenuItem(14, "Vérifier mise à jour",Image6)
MenuBar()
MenuItem(15, "Ouvrir l'aide"+Chr(9)+"Ctrl+H",Image31)
;}
EndIf
;-PANEL
PanelGadget(#PANEL, 2, 2, WindowWidth(#WinMain)-4, WindowHeight(#WinMain)-45) ;{
AddGadgetItem(#PANEL, -1, "Grille d'évaluation du RIS",Image3) ;{
TextGadget(#Txt_GrilleEvalOpen, 10, 7, 60, 15, "Evaluation :")
StringGadget(#Strg_GrilleEvalOpen, 70, 5, 400, 20,"",#PB_String_UpperCase)
GadgetToolTip(#Strg_GrilleEvalOpen,"Nommez cette évaluation si vous souhaitez l'enregistrer")
ButtonGadget(#BTN_SaveGrilleEval,475, 5, 65, 20,"Enregistrer")
GadgetToolTip(#BTN_SaveGrilleEval,"Enregistrer cette évaluation")
ButtonGadget(#BTN_screenshot,545, 5, 50, 20,"Image")
GadgetToolTip(#BTN_screenshot,"Enregistrer une image jpeg de cette évaluation")
TextGadget(#Txt_GrilleEval, 600, 7, 365, 15, "")
FrameGadget(#Frame_P2, 10, 30, 980, 145, "Indicateur P2") ;{
TextGadget(#Txt_P2, 30, 45, 300, 15, "Activité du rassemblement, choisir le niveau")
SetGadgetFont(#Txt_P2,Font0)
TextGadget(#Txt_OptP2_1, 30, 65, 700, 15, "Option 1 = Public assis: spectacle, cérémonie culturelle, réunion publique, restauration, rendez-vous sportif ,,,")
SetGadgetColor(#Txt_OptP2_1, #PB_Gadget_FrontColor, RGB(62, 193, 69))
TextGadget(#Txt_OptP2_2, 30, 85, 700, 15, "Option 2 = Public debout: cérémonie culturelle, réunion publique, restauration, exposition, foire, salon, comice agricole ,,,")
SetGadgetColor(#Txt_OptP2_2, #PB_Gadget_FrontColor, RGB(85, 155, 213))
TextGadget(#Txt_OptP2_3, 30, 105, 700, 15, "Option 3 = Public debout: spectacle avec public statique, fête foraine, rendez-vous sportif avec protection du public par rapport à l'évenement ,,,")
SetGadgetColor(#Txt_OptP2_3, #PB_Gadget_FrontColor, RGB(228, 151, 69))
TextGadget(#Txt_OptP2_4, 30, 125, 700, 45, "Option 4 = Public debout: spectacle avec public dynamique,danse, feria, fête votive, carnaval, spectacle de rue, grande parade, rendez-vous sportif sans protection du public par rapport à l'évenement ,,, Evenement se deroulant sur plusieurs jours avec présence permanente du public: hébergement sur site ou à proximité")
SetGadgetColor(#Txt_OptP2_4, #PB_Gadget_FrontColor, RGB(233, 63, 69))
OptionGadget(#OptP2_1, 780, 65, 150, 20, "Option 1 - Risque Faible")
OptionGadget(#OptP2_2, 780, 85, 150, 20, "Option 2 - Risque Modéré")
OptionGadget(#OptP2_3, 780, 105, 150, 20, "Option 3 - Risque Moyen")
OptionGadget(#OptP2_4, 780, 125, 150, 20, "Option 4 - Risque Elevé")
SetGadgetState(#OptP2_1, 1) ;}
FrameGadget(#Frame_E1, 10, 175, 980, 160, "Indicateur E1") ;{
TextGadget(#Txt_E1, 30, 190, 500, 15, "Caractéristiques de l'environnement ou de l'accessibilité du site, choisir le niveau")
SetGadgetFont(#Txt_E1,Font0)
TextGadget(#Txt_OptE1_1, 30, 210, 700, 15, "Option 1 = Structures permanentes: bâtiment, salle en dur,.. Voies publiques, rues, avec accès dégagés. Conditions d'accès aisés")
SetGadgetColor(#Txt_OptE1_1, #PB_Gadget_FrontColor, RGB(62, 193, 69))
TextGadget(#Txt_OptE1_2, 30, 230, 700, 30, "Option 2 = Structures non permanentes: gradins, tribunes, chapiteaux, ,,,Espaces naturels: surface <= 2 hectares."+ #CRLF$+"Brancardage: 150m < longueur <= 300m. Terrain en pente sur plus de 100m")
SetGadgetColor(#Txt_OptE1_2, #PB_Gadget_FrontColor, RGB(85, 155, 213))
TextGadget(#Txt_OptE1_3, 30, 265, 700, 30, "Option 3 = Espaces naturels: 2 ha < surface <= 5 ha. Brancardage: 300m < longueur <= 600m. Terrain en pente sur plus de 150m."+ #CRLF$+"Autres conditions d'accès difficiles")
SetGadgetColor(#Txt_OptE1_3, #PB_Gadget_FrontColor, RGB(228, 151, 69))
TextGadget(#Txt_OptE1_4, 30, 300, 700, 30, "Option 4 = Espaces naturels: surface > 5 ha. Brancardage: longueur > 600m. Terrain en pente sur plus de 300m. Autres conditions d'accès difficiles: Talus, escaliers, voies d'accès non carrossables, ,,,Progression des secours rendue difficile par la présence du public.")
SetGadgetColor(#Txt_OptE1_4, #PB_Gadget_FrontColor, RGB(233, 63, 69))
OptionGadget(#OptE1_1, 780, 210, 150, 20, "Option 1 - Risque Faible")
OptionGadget(#OptE1_2, 780, 235, 150, 20, "Option 2 - Risque Modéré")
OptionGadget(#OptE1_3, 780, 265, 150, 20, "Option 3 - Risque Moyen")
OptionGadget(#OptE1_4, 780, 295, 150, 20, "Option 4 - Risque Elevé")
SetGadgetState(#OptE1_1, 1) ;}
FrameGadget(#Frame_E2, 10, 335, 490, 150, "Indicateur E2") ;{
TextGadget(#Txt_E2, 30, 355, 400, 15, "Délais d'intervention des secours publics, choisir le délai")
SetGadgetFont(#Txt_E2,Font0)
OptionGadget(#OptE2_1, 30, 380, 300, 20, "Temps inférieur ou égal à 10 minutes")
OptionGadget(#OptE2_2, 30, 405, 300, 20, "Temps supérieur à 10 mn et inférieur ou égal à 20 mn")
OptionGadget(#OptE2_3, 30, 430, 300, 20, "Temps supérieur à 20 mn et inférieur ou égal à 30 mn")
OptionGadget(#OptE2_4, 30, 455, 300, 20, "Temps supérieur à 30 mn")
SetGadgetState(#OptE2_1, 1) ;}
FrameGadget(#Frame_RIS, 505, 335, 485, 150, "Calcul du RIS");{
TextGadget(#Txt_RIS_P2, 530, 357, 85, 15, "Indicateur P2:")
StringGadget(#Strg_RIS_P2, 620, 355, 70, 20, "0.25",#PB_String_ReadOnly)
SetGadgetFont(#Strg_RIS_P2,Font0)
TextGadget(#Txt_RIS_E1, 530, 382, 85, 15, "Indicateur E1:")
StringGadget(#Strg_RIS_E1, 620, 380, 70, 20, "0.25",#PB_String_ReadOnly)
SetGadgetFont(#Strg_RIS_E1,Font0)
TextGadget(#Txt_RIS_E2, 530, 407, 85, 15, "Indicateur E2:")
StringGadget(#Strg_RIS_E2, 620, 405, 70, 20, "0.25",#PB_String_ReadOnly)
SetGadgetFont(#Strg_RIS_E2,Font0)
TextGadget(#Txt_RIS_P1, 530, 432, 85, 15, "Effectif prévu P1:")
StringGadget(#Strg_RIS_P1, 620, 430, 70, 20, "",#PB_String_Numeric)
SetGadgetFont(#Strg_RIS_P1,Font0)
GadgetToolTip(#Strg_RIS_P1,"Saisir l'effectif prévisible déclaré du public, P1 ")
TextGadget(#Txt_RIS_P, 530, 457, 85, 15, "Valeur de P:")
StringGadget(#Strg_RIS_P, 620, 455, 70, 20, "",#PB_String_ReadOnly)
SetGadgetFont(#Strg_RIS_P,Font0)
TextGadget(#Txt_RIS_Vali, 730, 357, 200, 15, "Indice total de risque:")
SetGadgetFont(#Txt_RIS_Vali,Font0)
StringGadget(#Strg_RIS_Vali, 920, 355, 60, 20, "",#PB_String_ReadOnly)
SetGadgetFont(#Strg_RIS_Vali,Font0)
SetGadgetColor(#Strg_RIS_Vali, #PB_Gadget_FrontColor, RGB(221, 49, 69))
TextGadget(#Txt_RIS_Auto, 730, 382, 200, 15, "Ratio d'Intervenants Secouristes:")
SetGadgetFont(#Txt_RIS_Auto,Font0)
StringGadget(#Strg_RIS_Auto, 920, 380, 60, 20, "",#PB_String_ReadOnly)
SetGadgetFont(#Strg_RIS_Auto,Font0)
SetGadgetColor(#Strg_RIS_Auto, #PB_Gadget_FrontColor, RGB(221, 49, 69))
TextGadget(#Txt_TypeDPS, 730, 435, 200, 15, "Type de DPS correspondant:")
SetGadgetFont(#Txt_TypeDPS,Font0)
StringGadget(#Strg_TypeDPS, 730, 455, 250, 20, "",#PB_String_ReadOnly)
SetGadgetColor(#Strg_TypeDPS, #PB_Gadget_FrontColor, RGB(177, 55, 69))
SetGadgetFont(#Strg_TypeDPS,Font0)
;}
TextGadget(#Txt_ResultRIS, 10, 495, 800, 15, "Dispositif prévisionnel de secours à mettre en place en fonction du RIS (déterminé par les données que vous avez saisies)")
SetGadgetFont(#Txt_ResultRIS,Font0)
SetGadgetColor(#Txt_ResultRIS, #PB_Gadget_FrontColor, RGB(90, 120, 213))
ImageGadget(#DPS_Result, 10, 525, 800, 120, 0)
FrameGadget(#Frame_Ref, 820, 490, 170, 150, "Documents PDF") ;{
ButtonGadget(#BTN_Referentiel,825, 505, 160, 25,"Consulter le référentiel national");,#PB_Button_MultiLine)
ButtonGadget(#BTN_Declar_Moins5000,825, 530, 160, 25,"Remplir déclaration - de 5000")
ButtonGadget(#BTN_Declar_Plus5000,825, 555, 160, 25,"Remplir déclaration + de 5000")
ButtonGadget(#BTN_Fiche_Eval,825, 580, 160, 25,"Remplir grille d'évaluation")
ButtonGadget(#BTN_Logigramme,825, 605, 160, 25,"Consulter le logigramme")
;}
;}
AddGadgetItem(#PANEL, -1,"Comment est calculé le RIS", Image4) ;{
ButtonGadget(#BTN_Img10, 10, 10, 140, 20,"Indice total de risque",#PB_Button_Toggle)
ButtonGadget(#BTN_Img11, 150, 10, 140, 20,"Ratio des intervenants",#PB_Button_Toggle)
ButtonGadget(#BTN_Img12, 290, 10, 120, 20,"Règles applicables",#PB_Button_Toggle)
ButtonGadget(#BTN_Img13, 410, 10, 140, 20,"R I S -> Type de DPS",#PB_Button_Toggle)
ButtonGadget(#BTN_ImgActiv, 550, 10, 140, 20,"Activités du rassemblement",#PB_Button_Toggle)
ButtonGadget(#BTN_ImgEnvir, 690, 10, 100, 20,"Environnement",#PB_Button_Toggle)
ButtonGadget(#BTN_ImgDelai, 790, 10, 120, 20,"Délais d'intervention",#PB_Button_Toggle)
ImageGadget(#Img_info, 10, 40, 100, 80, Image10)
;}
AddGadgetItem(#PANEL, -1,"Mes Evaluations", Image8) ;{
ButtonImageGadget(#BtnDisplay, 5, 2, 25, 25, Image25)
GadgetToolTip(#BtnDisplay,"Mode d'affichage")
TextGadget(#Text_Currentfolder,40,5,100,20,"Répertoire courant:")
TextGadget(#Text_namefolder,140,5,600,22,"Mes Evaluations")
SetGadgetFont(#Text_namefolder,Font0)
;-Explorateur
PanelWidth = GetGadgetAttribute(#PANEL, #PB_Panel_ItemWidth)
PanelHeight = GetGadgetAttribute(#PANEL, #PB_Panel_ItemHeight)
ExplorerListGadget(#explorerlist,5, 30, PanelWidth - 10, PanelHeight - 55, RepDPS$ +"*ini",#PB_Explorer_NoDriveRequester | #PB_Explorer_AutoSort|#PB_Explorer_MultiSelect|#PB_Explorer_NoDirectoryChange|#PB_Explorer_NoParentFolder|#PB_Explorer_AlwaysShowSelection|#PB_Explorer_GridLines|#PB_Explorer_FullRowSelect )
SetGadgetItemAttribute(#explorerlist, 0, #PB_Explorer_ColumnWidth, 600, 0) ; nom
SetGadgetItemAttribute(#explorerlist, 0, #PB_Explorer_ColumnWidth, 100, 1) ; taille
SetGadgetItemAttribute(#explorerlist, 0, #PB_Explorer_ColumnWidth, 150, 2) ; type
SetGadgetItemAttribute(#explorerlist, 0, #PB_Explorer_ColumnWidth, 120, 3) ; date
StringGadget(#String_pathfolder,5,PanelHeight - 20,900,20,GetGadgetText(#explorerlist),#PB_String_ReadOnly)
TextGadget(#Text_countitems,905,PanelHeight - 20,95,20,"",#PB_Text_Border|#PB_Text_Center)
;}
AddGadgetItem(#PANEL, -1,"Mes Evaluations Images", Image32) ;{
PanelWidth = GetGadgetAttribute(#PANEL, #PB_Panel_ItemWidth)
PanelHeight = GetGadgetAttribute(#PANEL, #PB_Panel_ItemHeight)
ButtonImageGadget(#BtnDisplayImg, 5, 2, 25, 25, Image25)
GadgetToolTip(#BtnDisplayImg,"Mode d'affichage")
TextGadget(#Text_CurrentfolderImg,40,5,100,20,"Répertoire courant:")
TextGadget(#Text_namefolderImg,140,5,600,22,"Mes Evaluations Images")
SetGadgetFont(#Text_namefolderImg,Font0)
;-Explorateur images
ExplorerListGadget(#explorerlistImg,5, 30, PanelWidth - 10, PanelHeight - 55, RepDPSimg$ +"*jpeg",#PB_Explorer_NoDriveRequester | #PB_Explorer_AutoSort|#PB_Explorer_MultiSelect|#PB_Explorer_NoDirectoryChange|#PB_Explorer_NoParentFolder|#PB_Explorer_AlwaysShowSelection|#PB_Explorer_GridLines|#PB_Explorer_FullRowSelect )
SetGadgetItemAttribute(#explorerlistImg, 0, #PB_Explorer_ColumnWidth, 600, 0) ; nom
SetGadgetItemAttribute(#explorerlistImg, 0, #PB_Explorer_ColumnWidth, 100, 1) ; taille
SetGadgetItemAttribute(#explorerlistImg, 0, #PB_Explorer_ColumnWidth, 100, 2) ; type
SetGadgetItemAttribute(#explorerlistImg, 0, #PB_Explorer_ColumnWidth, 120, 3) ; date
StringGadget(#String_pathfolderImg,5,PanelHeight - 20,900,20,GetGadgetText(#explorerlistImg),#PB_String_ReadOnly)
TextGadget(#Text_countitemsImg,905,PanelHeight - 20,95,20,"",#PB_Text_Border|#PB_Text_Center)
;}
;}
CloseGadgetList()
;-Menus Popup explorer
HPopUpExplorateur = CreatePopupImageMenu(#PopUp_Explorateur) ;{
If HPopUpExplorateur
MenuItem(#Menu_Explorateur_Open,"Ouvrir le fichier",Image26)
MenuBar()
MenuItem(#Menu_Explorateur_Property, "Propriétés",Image30)
MenuBar()
MenuItem(#Menu_Explorateur_Delete,"Supprimer définitivement",Image24)
MenuItem(#Menu_Explorateur_RecycleBin,"Envoyer à la corbeille",Image23)
EndIf
;}
;-Menu affichage
HPopUpDisplayMode = CreatePopupMenu(#PopUp_DisplayMode) ;{
If HPopUpDisplayMode
MenuItem(#Menu_DisplayMode_Large,"Grandes icônes")
MenuItem(#Menu_DisplayMode_Small,"Petites icônes")
MenuItem(#Menu_DisplayMode_Liste,"Mode liste")
MenuItem(#Menu_DisplayMode_Detail,"Détails")
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Detail,1) ; mode détails par défaut
EndIf
;}
;-Menus Popup explorer Img
HPopUpExplorateurImg = CreatePopupImageMenu(#PopUp_ExplorateurImg) ;{
If HPopUpExplorateurImg
MenuItem(#Menu_Explorateur_OpenImg,"Ouvrir l'image",Image35)
MenuBar()
MenuItem(#Menu_Explorateur_PropertyImg, "Propriétés de l'image",Image34)
MenuBar()
MenuItem(#Menu_Explorateur_DeleteImg,"Supprimer définitivement",Image24)
MenuItem(#Menu_Explorateur_RecycleBinImg,"Envoyer à la corbeille",Image23)
EndIf
;}
;-Menu affichage Images
HPopUpDisplayModeImg = CreatePopupMenu(#PopUp_DisplayModeImg) ;{
If HPopUpDisplayModeImg
MenuItem(#Menu_DisplayMode_LargeImg,"Grandes icônes")
MenuItem(#Menu_DisplayMode_SmallImg,"Petites icônes")
MenuItem(#Menu_DisplayMode_ListeImg,"Mode liste")
MenuItem(#Menu_DisplayMode_DetailImg,"Détails")
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_DetailImg,1) ; mode détails par défaut
EndIf
;}
;-Statusbar
If CreateStatusBar(#StatusDPS, WindowID(#WinMain)) ;{
AddStatusBarField(#PB_Ignore)
AddStatusBarField(#PB_Ignore)
AddStatusBarField(25)
EndIf
StatusBarText(#StatusDPS, 0, "Date : "+Time_Date(FormatDate("%dd/%mm/%yyyy", Date())), #PB_StatusBar_Raised)
StatusBarText(#StatusDPS, 1, #PROGRAMNAME +" "+ #COPYRIGHT, #PB_StatusBar_Right | #PB_StatusBar_Raised)
StatusBarImage(#StatusDPS, 2, Image0)
;}
;- mise à jour des infos de base
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetActiveGadget(#Strg_GrilleEvalOpen)
SetGadgetState(#BTN_Img10,1)
NombreElements(#explorerlist,#Text_countitems)
NombreElements(#explorerlistImg,#Text_countitemsImg)
;---------------------------------
;-Boucle d'évènements
;---------------------------------
Repeat
MainEvent = WaitWindowEvent()
Select MainEvent
;---Event Menus
Case #PB_Event_Menu
Select EventMenu()
Case 1 ;{
Evalname$ = OpenFileRequester("Ouvrir une évaluation", RepDPS$, "Fichiers de paramètres|*.ini", 0)
If Evalname$
Open_Evaluation(Evalname$)
SetGadgetText(#Strg_GrilleEvalOpen, GetFilePart(Evalname$,#PB_FileSystem_NoExtension))
SetGadgetState(#PANEL,0)
EndIf ;}
Case 2 ;{
If GetGadgetText(#Strg_GrilleEvalOpen) <> ""
SaveAs = MessageRequester("Enregistrer","Voulez-vous d'abord sauvegarder les données actuelles ? Si oui utilisez la commande { Enregistrer l'évaluation courante }", #MB_ICONQUESTION|#PB_MessageRequester_YesNo)
If SaveAs = 6
ElseIf SaveAs = 7
New_Eval()
EndIf
EndIf ;}
Case 3 ;{
Evalname$ = GetGadgetText(#Strg_GrilleEvalOpen)
If Evalname$
If FileSize(RepDPS$ + Evalname$ +".ini") <> -1
Save = MessageRequester("Enregistrer","Le fichier existe déjà."+#CRLF$+"Voulez-vous le remplacer ?", #MB_ICONQUESTION|#PB_MessageRequester_YesNoCancel)
If Save = 6
If Save_Evaluation(Evalname$) = 1
MessageRequester("Enregistrement","L'évaluation "+Evalname$+" a bien été enregistrée",#MB_ICONINFORMATION|#PB_MessageRequester_Ok)
New_Eval()
EndIf
ElseIf Save = 7
Else
EndIf
ElseIf FileSize(RepDPS$ + Evalname$ +".ini") = -1
If Save_Evaluation(Evalname$) = 1
MessageRequester("Enregistrement","L'évaluation "+Evalname$+" a bien été enregistrée",#MB_ICONINFORMATION|#PB_MessageRequester_Ok)
New_Eval()
EndIf
EndIf
Else
MessageRequester("Enregistrement","Vous devez donner un nom à l'évaluation",#MB_ICONINFORMATION|#PB_MessageRequester_Ok)
SetActiveGadget(#Strg_GrilleEvalOpen)
EndIf ;}
; Case 4
Case 5 ;{
ImgOpen$ = OpenFileRequester("Ouvrir une image d'évaluation",RepDPSimg$,"Fichiers images|*.jpeg", 0)
If ImgOpen$
If ShellExecute_(0,"open",ImgOpen$,0,0,1) = 0
MessageRequester("Image évaluation", "Impossible d'ouvrir l'image sélectionnée!", #MB_ICONEXCLAMATION)
EndIf
EndIf
;}
; Case 6
Case 7 : CloseWindow(#WinMain) : End
Case 8 ;{
If FileSize(Grille_Eval$) <> -1
RunProgram(Grille_Eval$)
Else
MessageRequester("Erreur", "Le fichier est introuvable.", #MB_ICONEXCLAMATION)
EndIf ;}
Case 9 ;{
If FileSize(Declar_moins5000$) <> -1
RunProgram(Declar_moins5000$)
Else
MessageRequester("Erreur", "Le fichier est introuvable.", #MB_ICONEXCLAMATION)
EndIf ;}
Case 10 ;{
If FileSize(Declar_plus5000$) <> -1
RunProgram(Declar_plus5000$)
Else
MessageRequester("Erreur", "Le fichier est introuvable.", #MB_ICONEXCLAMATION)
EndIf ;}
Case 11 ;{
If FileSize(Logigramme$) <> -1
RunProgram(Logigramme$)
Else
MessageRequester("Erreur", "Le fichier est introuvable.", #MB_ICONEXCLAMATION)
EndIf ;}
Case 12 ;{
If FileSize(Referentiel$) <> -1
RunProgram(Referentiel$)
Else
MessageRequester("Erreur", "Le fichier est introuvable.", #MB_ICONEXCLAMATION)
EndIf ;}
Case 13 : InfoAuteur()
Case 14 ;{
If RunProgram("https://wolforan.com/logiciels-wolforan-logeditor.html") = 0
MessageRequester("Connexion...", "Impossible de se connecter au site. Vérifiez l'état de votre econnexion.", #MB_ICONEXCLAMATION)
EndIf ;}
Case 15 : ShellExecute_(0,"open",GetCurrentDirectory()+"Eval-DPS Help.chm",0,0,1)
Case #Menu_DisplayMode_Large ;{
SetGadgetAttribute(#explorerlist, #PB_Explorer_DisplayMode,#PB_Explorer_LargeIcon)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Large,1)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Small,0)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Liste,0)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Detail,0)
;}
Case #Menu_DisplayMode_Small ;{
SetGadgetAttribute(#explorerlist, #PB_Explorer_DisplayMode,#PB_Explorer_SmallIcon)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Large,0)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Small,1)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Liste,0)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Detail,0)
;}
Case #Menu_DisplayMode_Liste ;{
SetGadgetAttribute(#explorerlist, #PB_Explorer_DisplayMode,#PB_Explorer_List)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Large,0)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Small,0)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Liste,1)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Detail,0)
;}
Case #Menu_DisplayMode_Detail ;{
SetGadgetAttribute(#explorerlist, #PB_Explorer_DisplayMode,#PB_Explorer_Report)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Large,0)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Small,0)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Liste,0)
SetMenuItemState(#PopUp_DisplayMode,#Menu_DisplayMode_Detail,1)
;}
Case #Menu_DisplayMode_LargeImg ;{
SetGadgetAttribute(#explorerlistImg, #PB_Explorer_DisplayMode,#PB_Explorer_LargeIcon)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_LargeImg,1)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_SmallImg,0)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_ListeImg,0)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_DetailImg,0)
;}
Case #Menu_DisplayMode_SmallImg ;{
SetGadgetAttribute(#explorerlistImg, #PB_Explorer_DisplayMode,#PB_Explorer_SmallIcon)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_LargeImg,0)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_SmallImg,1)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_ListeImg,0)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_DetailImg,0)
;}
Case #Menu_DisplayMode_ListeImg ;{
SetGadgetAttribute(#explorerlistImg, #PB_Explorer_DisplayMode,#PB_Explorer_List)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_LargeImg,0)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_SmallImg,0)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_ListeImg,1)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_DetailImg,0)
;}
Case #Menu_DisplayMode_DetailImg ;{
SetGadgetAttribute(#explorerlistImg, #PB_Explorer_DisplayMode,#PB_Explorer_Report)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_LargeImg,0)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_SmallImg,0)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_ListeImg,0)
SetMenuItemState(#PopUp_DisplayModeImg,#Menu_DisplayMode_DetailImg,1)
;}
Case #Menu_Explorateur_Open ;{
If CountGadgetItems(#explorerlist) <> 0
For i = 0 To CountGadgetItems(#explorerlist)-1
If GetGadgetItemState(#explorerlist, i) & #PB_Explorer_Selected
NomFichier$ = GetGadgetText(#explorerlist)+GetGadgetItemText(#explorerlist, i )
Open_Evaluation(NomFichier$)
SetGadgetText(#Strg_GrilleEvalOpen, GetFilePart(NomFichier$,#PB_FileSystem_NoExtension))
SetGadgetState(#PANEL,0)
EndIf
Next i
EndIf ;}
Case #Menu_Explorateur_Delete ;{
If CountGadgetItems(#explorerlist) <>0
Suppr = MessageRequester("SUPPRESSION DEFINITIVE","Êtes vous sûr(e) de vouloir continuer ?"+Chr(13)+"Si oui, vous ne pourrez revenir en arrière !",#MB_ICONEXCLAMATION | #PB_MessageRequester_YesNo)
If Suppr = 6
For i = 0 To CountGadgetItems(#explorerlist)-1
If GetGadgetItemState(#explorerlist, i) & #PB_Explorer_Selected
NomFichier$ = GetGadgetText(#explorerlist)+GetGadgetItemText(#explorerlist, i )
Resultat = FileSize(NomFichier$)
If Resultat <> -1
DeleteFile(NomFichier$ ,#PB_FileSystem_Force)
NombreElements(#explorerlist,#Text_countitems)
EndIf
EndIf
Next i
ElseIf Suppr = 7
EndIf
EndIf
;}
Case #Menu_Explorateur_RecycleBin ;{
For i = 0 To CountGadgetItems(#explorerlist)-1
If GetGadgetItemState(#explorerlist, i) & #PB_Explorer_Selected
NomFichier$ = GetGadgetText(#explorerlist)+GetGadgetItemText(#explorerlist, i )
If FileSize(NomFichier$) <> -1
DeleteFileToRecycleBin(NomFichier$)
EndIf
EndIf
Next i
NombreElements(#explorerlist,#Text_countitems)
;}
Case #Menu_Explorateur_Property ;{
For i = 0 To CountGadgetItems(#explorerlist)-1
If GetGadgetItemState(#explorerlist, i) & #PB_Explorer_Selected
NomFichierSource$ = GetGadgetText(#explorerlist)+GetGadgetItemText(#explorerlist, i )
FileProperty(NomFichierSource$)
EndIf
Next i
;}
Case #Menu_Explorateur_OpenImg ;{
If CountGadgetItems(#explorerlistImg) <>0
For i = 0 To CountGadgetItems(#explorerlistImg)-1
If GetGadgetItemState(#explorerlistImg, i) & #PB_Explorer_Selected
NomFichier$ = GetGadgetText(#explorerlistImg)+GetGadgetItemText(#explorerlistImg, i )
ShellExecute_(0,"open",NomFichier$,0,0,1)
EndIf
Next i
EndIf ;}
Case #Menu_Explorateur_DeleteImg ;{
If CountGadgetItems(#explorerlistImg) <>0
Suppr = MessageRequester("SUPPRESSION DEFINITIVE","Êtes vous sûr(e) de vouloir continuer ?"+Chr(13)+"Si oui, vous ne pourrez revenir en arrière !",#MB_ICONEXCLAMATION | #PB_MessageRequester_YesNo)
If Suppr = 6
For i = 0 To CountGadgetItems(#explorerlistImg)-1
If GetGadgetItemState(#explorerlistImg, i) & #PB_Explorer_Selected
NomFichier$ = GetGadgetText(#explorerlistImg)+GetGadgetItemText(#explorerlistImg, i )
Resultat = FileSize(NomFichier$)
If Resultat <> -1 ;And Resultat <> -2
DeleteFile(NomFichier$ ,#PB_FileSystem_Force)
NombreElements(#explorerlistImg,#Text_countitemsImg)
EndIf
EndIf
Next i
ElseIf Suppr = 7
EndIf
EndIf
;}
Case #Menu_Explorateur_RecycleBinImg ;{
For i = 0 To CountGadgetItems(#explorerlistImg)-1
If GetGadgetItemState(#explorerlistImg, i) & #PB_Explorer_Selected
NomFichier$ = GetGadgetText(#explorerlistImg)+GetGadgetItemText(#explorerlistImg, i )
If FileSize(NomFichier$) <> -1
DeleteFileToRecycleBin(NomFichier$)
EndIf
EndIf
Next i
NombreElements(#explorerlistImg,#Text_countitemsImg)
;}
Case #Menu_Explorateur_PropertyImg ;{
For i = 0 To CountGadgetItems(#explorerlistImg)-1
If GetGadgetItemState(#explorerlistImg, i) & #PB_Explorer_Selected
NomFichierSource$ = GetGadgetText(#explorerlistImg)+GetGadgetItemText(#explorerlistImg, i )
FileProperty(NomFichierSource$)
EndIf
Next i
;}
EndSelect
Case #PB_Event_Gadget
Select EventGadget()
Case #LinkID1 ;{
If RunProgram("https://wolforan.com") = 0
MessageRequester("Connexion...", "Impossible de se connecter au site", #MB_ICONEXCLAMATION)
EndIf
;}
Case #LinkID2 ;{
If RunProgram("mailto:support@wolforan.fr ?subject=Besoin d'aide avec "+#PROGRAMNAME) = 0
MessageRequester("Messagerie...", "Impossible d'utiliser votre messagerie!", #MB_ICONEXCLAMATION)
EndIf
;}
Case #CloseInfoAuteur ;{
CloseWindow(#Win_InfoAuteur)
DisableWindow(#WinMain,#False)
;}
Case #OptP2_1 ;{
SetGadgetText(#Strg_RIS_P2,"0.25")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
Case #OptP2_2
SetGadgetText(#Strg_RIS_P2,"0.30")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
Case #OptP2_3
SetGadgetText(#Strg_RIS_P2,"0.35")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
Case #OptP2_4
SetGadgetText(#Strg_RIS_P2,"0.40")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
;}
Case #OptE1_1 ;{
SetGadgetText(#Strg_RIS_E1,"0.25")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
Case #OptE1_2
SetGadgetText(#Strg_RIS_E1,"0.30")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
Case #OptE1_3
SetGadgetText(#Strg_RIS_E1,"0.35")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
Case #OptE1_4
SetGadgetText(#Strg_RIS_E1,"0.40")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
;}
Case #OptE2_1 ;{
SetGadgetText(#Strg_RIS_E2,"0.25")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
Case #OptE2_2
SetGadgetText(#Strg_RIS_E2,"0.30")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
Case #OptE2_3
SetGadgetText(#Strg_RIS_E2,"0.35")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
Case #OptE2_4
SetGadgetText(#Strg_RIS_E2,"0.40")
SetGadgetText(#Strg_RIS_Vali,Calcul_i())
SetGadgetText(#Strg_RIS_P,Calcul_P())
Calcul_RIS()
;}
Case #Strg_RIS_P1
Select EventType()
Case #PB_EventType_Change
Calcul_RIS()
NewP$ = Calcul_P() : SetGadgetText(#Strg_RIS_P,NewP$)
EndSelect
Case #BTN_SaveGrilleEval ;{
Evalname$ = GetGadgetText(#Strg_GrilleEvalOpen)
If Evalname$
If FileSize(RepDPS$ + Evalname$ +".ini") <> -1
Save = MessageRequester("Enregistrer","Le fichier existe déjà."+#CRLF$+"Voulez-vous le remplacer ?", #MB_ICONQUESTION|#PB_MessageRequester_YesNoCancel)
If Save = 6
If Save_Evaluation(Evalname$) = 1
MessageRequester("Enregistrement","L'évaluation "+Evalname$+" a bien été enregistrée",#MB_ICONINFORMATION|#PB_MessageRequester_Ok)
New_Eval()
EndIf
ElseIf Save = 7
Else
EndIf
ElseIf FileSize(RepDPS$ + Evalname$ +".ini") = -1
If Save_Evaluation(Evalname$) = 1
MessageRequester("Enregistrement","L'évaluation "+Evalname$+" a bien été enregistrée",#MB_ICONINFORMATION|#PB_MessageRequester_Ok)
New_Eval()
EndIf
EndIf
Else
MessageRequester("Enregistrement","Vous devez donner un nom à l'évaluation",#MB_ICONINFORMATION|#PB_MessageRequester_Ok)
SetActiveGadget(#Strg_GrilleEvalOpen)
EndIf ;}
Case #Strg_GrilleEvalOpen
Select EventType()
Case #PB_EventType_Change
SetGadgetText(#Txt_GrilleEval,"")
EndSelect
Case #Btn_screenshot ;{
ImgName$ = GetGadgetText(#Strg_GrilleEvalOpen)
If ImgName$ > ""
PhotoFile$ = RepDPSimg$+ImgName$+"_"+FormatDate("%yyyy%mm%dd_%hh%ii%ss",Date())+".jpeg"
If CaptureJPEG(PhotoFile$) <> 0
OpenImg = MessageRequester("Afficher l'image","Souhaitez vous ouvrir l'image créée ?",#PB_MessageRequester_YesNo|#MB_ICONQUESTION)
If OpenImg = 6
ShellExecute_(0,"open",PhotoFile$,0,0,1)
ElseIf OpenImg = 7
EndIf
Else
MessageRequester("Capture d'écran","Une erreur est survenue lors de la création de l'image.",#MB_ICONERROR)
EndIf
ElseIf ImgName$ = ""
SImgName$ = InputRequester("Image","Donnez un nom à l'image","")
If SImgName$ > ""
PhotoFile$ = RepDPSimg$+SImgName$+"_"+FormatDate("%yyyy%mm%dd_%hh%ii%ss",Date())+".jpeg"
If CaptureJPEG(PhotoFile$) <> 0
OpenImg = MessageRequester("Afficher l'image","Souhaitez vous ouvrir l'image créée ?",#PB_MessageRequester_YesNo|#MB_ICONQUESTION)
If OpenImg = 6
ShellExecute_(0,"open",PhotoFile$,0,0,1)
ElseIf OpenImg = 7
EndIf
Else
MessageRequester("Capture d'écran","Une erreur est survenue lors de la création de l'image.",#MB_ICONERROR)
EndIf
EndIf
EndIf
;}
;---Boutons Documents
Case #BTN_Referentiel ;{
If FileSize(Referentiel$) <> -1
RunProgram(Referentiel$)
Else
MessageRequester("Erreur", "Le fichier est introuvable.", #MB_ICONEXCLAMATION)
EndIf ;}
Case #BTN_Declar_Moins5000 ;{
If FileSize(Declar_moins5000$) <> -1
RunProgram(Declar_moins5000$)
Else
MessageRequester("Erreur", "Le fichier est introuvable.", #MB_ICONEXCLAMATION)
EndIf ;}
Case #BTN_Declar_Plus5000 ;{
If FileSize(Declar_plus5000$) <> -1
RunProgram(Declar_plus5000$)
Else
MessageRequester("Erreur", "Le fichier est introuvable.", #MB_ICONEXCLAMATION)
EndIf ;}
Case #BTN_Fiche_Eval ;{
If FileSize(Grille_Eval$) <> -1
RunProgram(Grille_Eval$)
Else
MessageRequester("Erreur", "Le fichier est introuvable.", #MB_ICONEXCLAMATION)
EndIf ;}
Case #BTN_Logigramme ;{
If FileSize(Logigramme$) <> -1
RunProgram(Logigramme$)
Else
MessageRequester("Erreur", "Le fichier est introuvable.", #MB_ICONEXCLAMATION)
EndIf ;}
;---Boutons Calcul du RIS
Case #BTN_Img10 : SetGadgetState(#Img_info, Image10) ;{
SetGadgetState(#BTN_Img11,0)
SetGadgetState(#BTN_Img12,0)
SetGadgetState(#BTN_Img13,0)
SetGadgetState(#BTN_ImgActiv,0)
SetGadgetState(#BTN_ImgEnvir,0)
SetGadgetState(#BTN_ImgDelai,0) ;}
Case #BTN_Img11 : SetGadgetState(#Img_info, Image11) ;{
SetGadgetState(#BTN_Img10,0)
SetGadgetState(#BTN_Img12,0)
SetGadgetState(#BTN_Img13,0)
SetGadgetState(#BTN_ImgActiv,0)
SetGadgetState(#BTN_ImgEnvir,0)
SetGadgetState(#BTN_ImgDelai,0) ;}
Case #BTN_Img12 : SetGadgetState(#Img_info, Image12) ;{
SetGadgetState(#BTN_Img10,0)
SetGadgetState(#BTN_Img11,0)
SetGadgetState(#BTN_Img13,0)
SetGadgetState(#BTN_ImgActiv,0)
SetGadgetState(#BTN_ImgEnvir,0)
SetGadgetState(#BTN_ImgDelai,0) ;}
Case #BTN_Img13 : SetGadgetState(#Img_info, Image13) ;{
SetGadgetState(#BTN_Img10,0)
SetGadgetState(#BTN_Img11,0)
SetGadgetState(#BTN_Img12,0)
SetGadgetState(#BTN_ImgActiv,0)
SetGadgetState(#BTN_ImgEnvir,0)
SetGadgetState(#BTN_ImgDelai,0) ;}
Case #BTN_ImgActiv : SetGadgetState(#Img_info, Image18) ;{
SetGadgetState(#BTN_Img10,0)
SetGadgetState(#BTN_Img11,0)
SetGadgetState(#BTN_Img12,0)
SetGadgetState(#BTN_Img13,0)
SetGadgetState(#BTN_ImgEnvir,0)
SetGadgetState(#BTN_ImgDelai,0) ;}
Case #BTN_ImgEnvir : SetGadgetState(#Img_info, Image19) ;{
SetGadgetState(#BTN_Img10,0)
SetGadgetState(#BTN_Img11,0)
SetGadgetState(#BTN_Img12,0)
SetGadgetState(#BTN_Img13,0)
SetGadgetState(#BTN_ImgActiv,0)
SetGadgetState(#BTN_ImgDelai,0) ;}
Case #BTN_ImgDelai : SetGadgetState(#Img_info, Image20) ;{
SetGadgetState(#BTN_Img10,0)
SetGadgetState(#BTN_Img11,0)
SetGadgetState(#BTN_Img12,0)
SetGadgetState(#BTN_Img13,0)
SetGadgetState(#BTN_ImgActiv,0)
SetGadgetState(#BTN_ImgEnvir,0) ;}
Case #BtnDisplay
DisplayPopupMenu(#PopUp_DisplayMode,WindowID(#WinMain))
Case #BtnDisplayImg
DisplayPopupMenu(#PopUp_DisplayModeImg,WindowID(#WinMain))
Case #explorerlist ;{
Select EventType()
Case #PB_EventType_RightClick
PosEx = GetGadgetState(#explorerlist)
If PosEX >= 0
Resultat = GetGadgetItemState(#explorerlist, PosEX)
If Resultat & #PB_Explorer_File
filename$ = GetGadgetItemText(#explorerlist,PosEX ,0)
EndIf
EndIf
DisplayPopupMenu(#PopUp_Explorateur,WindowID(#WinMain))
Case #PB_EventType_LeftDoubleClick
PosEx = GetGadgetState(#explorerlist)
If PosEX >= 0
Resultat = GetGadgetItemState(#explorerlist, PosEX)
If Resultat & #PB_Explorer_File
Evalname$ = GetGadgetItemText(#explorerlist,PosEX ,0)
Open_Evaluation(RepDPS$ + Evalname$)
SetGadgetText(#Strg_GrilleEvalOpen, GetFilePart(Evalname$,#PB_FileSystem_NoExtension))
SetGadgetState(#PANEL, 0)
EndIf
EndIf
Case #PB_EventType_Change
Path$ = GetGadgetText(#explorerlist)
SetGadgetText(#String_pathfolder,Path$)
DirUp.s = x_getparentpathpart(Path$)
NombreElements(#explorerlist,#Text_countitems)
PosEx = GetGadgetState(#explorerlist)
If PosEX >= 0
Resultat = GetGadgetItemState(#explorerlist, PosEX)
If Resultat & #PB_Explorer_Directory
name$ = GetGadgetItemText(#explorerlist,PosEX ,0)
SetGadgetText(#Text_namefolder, name$)
EndIf
EndIf
EndSelect ;}
Case #explorerlistImg ;{
Select EventType()
Case #PB_EventType_RightClick ;{
PosEx = GetGadgetState(#explorerlistImg)
If PosEX >= 0
Resultat = GetGadgetItemState(#explorerlistImg, PosEX)
If Resultat & #PB_Explorer_File
filename$ = GetGadgetItemText(#explorerlistImg,PosEX ,0)
EndIf
EndIf
DisplayPopupMenu(#PopUp_ExplorateurImg,WindowID(#WinMain)) ;}
Case #PB_EventType_LeftDoubleClick ;{
PosEx = GetGadgetState(#explorerlistImg)
If PosEX >= 0
Resultat = GetGadgetItemState(#explorerlistImg, PosEX)
If Resultat & #PB_Explorer_File
Imagename$ = GetGadgetItemText(#explorerlistImg,PosEX ,0)
ShellExecute_(0,"open",RepDPSimg$ + Imagename$,0,0,1)
EndIf
EndIf ;}
Case #PB_EventType_Change ;{
Path$ = GetGadgetText(#explorerlistImg)
SetGadgetText(#String_pathfolderImg,Path$)
DirUp.s = x_getparentpathpart(Path$)
NombreElements(#explorerlistImg,#Text_countitemsImg)
PosEx = GetGadgetState(#explorerlistImg)
If PosEX >= 0
Resultat = GetGadgetItemState(#explorerlistImg, PosEX)
If Resultat & #PB_Explorer_Directory
name$ = GetGadgetItemText(#explorerlistImg,PosEX ,0)
SetGadgetText(#Text_namefolderImg, name$)
EndIf
EndIf ;}
EndSelect ;}
EndSelect
;---Fermeture
Case #PB_Event_CloseWindow
Select EventWindow()
Case #WinMain
End
EndSelect
EndSelect
ForEver
EndIf