Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Dim $memo[100]
Dim $heure[100]
Dim $min[100]
Global $nombredememo, $anne, $mois, $jours, $heure, $min, $date, $memo
$memoactuel = 1
$nombredememo = 1
#region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 516, 245, 215, 170)
Global $Button1 = GUICtrlCreateButton("<", 8, 16, 97, 169)
GUICtrlSetFont(-1, 90, 400, 0, "MS Sans Serif")
Global $Group1 = GUICtrlCreateGroup("Informations", 128, 8, 265, 177)
Global $Label1 = GUICtrlCreateLabel("Memo :", 144, 64, 48, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
Global $Label2 = GUICtrlCreateLabel("Date :", 144, 120, 39, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
Global $Label3 = GUICtrlCreateLabel("", 208, 122, 152, 17)
Global $Label5 = GUICtrlCreateLabel($memo, 208, 64, 132, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $Button3 = GUICtrlCreateButton("Nouveau", 128, 200, 81, 33)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
Global $Button4 = GUICtrlCreateButton("Modifier", 221, 200, 81, 33)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
Global $Button5 = GUICtrlCreateButton("Supprimer", 312, 200, 81, 33)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
Global $Button2 = GUICtrlCreateButton(">", 416, 16, 97, 169)
GUICtrlSetFont(-1, 90, 400, 0, "MS Sans Serif")
Global $Label4 = GUICtrlCreateLabel($memoactuel & "/" & $nombredememo, 464, 208, 42, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If $memoactuel > 1 Then
$memoactuel = $memoactuel - 1
GUICtrlSetData($Label4, $memoactuel & "/" & $nombredememo)
GUICtrlSetData($Label5, $memo[$memoactuel])
GUICtrlSetData($Label3, $heure[$memoactuel] & $min[$memoactuel])
EndIf
Case $Button2
If $memoactuel < $nombredememo Then
$memoactuel = $memoactuel + 1
GUICtrlSetData($Label3, $heure[$memoactuel]& $min[$memoactuel])
GUICtrlSetData($Label4, $memoactuel & "/" & $nombredememo)
GUICtrlSetData($Label5, $memo[$memoactuel])
EndIf
Case $Button3
GUISetState(@SW_HIDE, $Form1)
#region ### START Koda GUI section ### Form=
Local $Form2 = GUICreate("Form2", 170, 120, 569, 315)
Local $Label21 = GUICtrlCreateLabel("Memo :", 16, 8, 56, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
Local $Input21 = GUICtrlCreateInput("", 88, 8, 73, 21)
Local $Label22 = GUICtrlCreateLabel("Heure :", 16, 48, 56, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
Local $Button2c = GUICtrlCreateButton("Annuler", 16, 80, 57, 33)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
Local $Buttonaj = GUICtrlCreateButton("Ajouter", 96, 80, 57, 33)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
Local $Input22 = GUICtrlCreateInput("", 88, 48, 25, 21)
Local $Label23 = GUICtrlCreateLabel("h", 117, 54, 11, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
Local $Input23 = GUICtrlCreateInput("", 130, 48, 25, 21)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Buttonaj
$nombredememo = $nombredememo + 1
GUICtrlSetData($Label4, $memoactuel & "/" & $nombredememo)
$memo[$nombredememo] = GUICtrlRead($Input21)
$heure[$nombredememo] = GUICtrlRead($Input22)
$min[$nombredememo] = GUICtrlRead($Input23)
ExitLoop
EndSwitch
WEnd
GUIDelete($Form2)
GUISetState(@SW_SHOW, $Form1)
EndSwitch
WEnd