Code : Tout sélectionner
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.2.12.1
Author: SurPriseS
Script Function:
Entretien automobile.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
;--------- Include
#include <GUIConstants.au3>
;--------- Variable
;--------- GUI
GuiCreate ( " Entretien véhicule " , 700 , 425 ) ; fenêtre principale
GUISetState ( @SW_SHOW )
$bouton_gaz = GUICtrlCreateButton("Gasoil",10,10,185,40) ; Bouton gaz
GUICtrlSetFont($bouton_gaz , 24)
$bouton_entretien = GUICtrlCreateButton("Entretien",10,60,185,40) ; Bouton entretien
GUICtrlSetFont($bouton_entretien , 24)
$bouton_resum = GUICtrlCreateButton("Résumé",10,110,185,40) ; Bouton résumé
GUICtrlSetFont($bouton_resum , 24)
GUICtrlCreateGroup ( " Pavé numérique " , 10 , 160 , 185 , 260 ) ; Groupement pavé numérique
$bouton_1 = GUICtrlCreateButton("1",15,180,55,55) ; Bouton 1
GUICtrlSetFont($bouton_1, 24)
$bouton_2 = GUICtrlCreateButton("2",75,180,55,55) ; Bouton 2
GUICtrlSetFont($bouton_2 , 24)
$bouton_3 = GUICtrlCreateButton("3",135,180,55,55) ; Bouton 3
GUICtrlSetFont($bouton_3 , 24)
$bouton_4 = GUICtrlCreateButton("4",15,240,55,55) ; Bouton 4
GUICtrlSetFont($bouton_4, 24)
$bouton_5 = GUICtrlCreateButton("5",75,240,55,55) ; Bouton 5
GUICtrlSetFont($bouton_5 , 24)
$bouton_6 = GUICtrlCreateButton("6",135,240,55,55) ; Bouton 6
GUICtrlSetFont($bouton_6 , 24)
$bouton_7 = GUICtrlCreateButton("7",15,300,55,55) ; Bouton 7
GUICtrlSetFont($bouton_7, 24)
$bouton_8 = GUICtrlCreateButton("8",75,300,55,55) ; Bouton 8
GUICtrlSetFont($bouton_8 , 24)
$bouton_9 = GUICtrlCreateButton("9",135,300,55,55) ; Bouton 9
GUICtrlSetFont($bouton_9 , 24)
$bouton_0 = GUICtrlCreateButton("0",15,360,55,55) ; Bouton 0
GUICtrlSetFont($bouton_0, 24)
$bouton_virgule = GUICtrlCreateButton(",",75,360,55,55) ; Bouton virgule
GUICtrlSetFont($bouton_virgule , 24)
$bouton_entrer = GUICtrlCreateButton("«",135,360,55,55) ; Bouton entrer
GUICtrlSetFont($bouton_entrer , 24)
While 1
$msg = GUIGetMsg ( )
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $bouton_gaz
gaz()
Case $msg = $bouton_entretien
entretien()
EndSelect
WEnd
;--------- Fonction
Func gaz()
GUICtrlCreateGroup ( " Gasoil" , 205 , 10 , 490 , 410 ) ; Groupement pavé numérique
GUICtrlSetFont($bouton_gaz , 24)
$label_plein = GUICtrlCreateLabel("Ajouter un plein : ",220,40,170,25)
GUICtrlSetFont($label_plein , 16)
$combo_station = GUICtrlCreateCombo(" station ",220,100,170,25)
GUICtrlSetFont($combo_station , 24)
$input_prix = GUICtrlCreateInput("Tarif",400,30,200,50)
GUICtrlSetFont($input_prix , 24)
$input_litre = GUICtrlCreateInput("Litre",400,100,200,50)
GUICtrlSetFont($input_litre , 24)
$input_km = GUICtrlCreateInput("Km",400,170,200,50)
GUICtrlSetFont($input_km , 24)
$label_prix = GUICtrlCreateLabel(" €",600,40,40,40)
GUICtrlSetFont($label_prix , 24)
$label_litre = GUICtrlCreateLabel(" L",600,100,40,40)
GUICtrlSetFont($label_litre , 24)
$label_km = GUICtrlCreateLabel(" Km",600,180,80,80)
GUICtrlSetFont($label_km , 24)
$bouton_valid = GUICtrlCreateButton("Valider",220,170,170,50)
GUICtrlSetFont($bouton_valid , 24)
EndFunc
func entretien()
GUICtrlCreateGroup ( " blabla" , 205 , 10 , 490 , 410 ) ; Groupement pavé numérique
GUICtrlSetFont($bouton_gaz , 24)
$label_plein = GUICtrlCreateLabel("blilbili : ",220,40,170,25)
GUICtrlSetFont($label_plein , 16)
$combo_station = GUICtrlCreateCombo(" blouboubub ",220,100,170,25)
GUICtrlSetFont($combo_station , 24)
$input_prix = GUICtrlCreateInput("Targergerif",400,30,200,50)
GUICtrlSetFont($input_prix , 24)
$input_litre = GUICtrlCreateInput("blabla",400,100,200,50)
GUICtrlSetFont($input_litre , 24)
$input_km = GUICtrlCreateInput("ggg",400,170,200,50)
GUICtrlSetFont($input_km , 24)
$label_prix = GUICtrlCreateLabel(" g",600,40,40,40)
GUICtrlSetFont($label_prix , 24)
$label_litre = GUICtrlCreateLabel(" ffff",600,100,40,40)
GUICtrlSetFont($label_litre , 24)
$label_km = GUICtrlCreateLabel(" gggg",600,180,80,80)
GUICtrlSetFont($label_km , 24)
$bouton_valid = GUICtrlCreateButton("Valider",220,170,170,50)
GUICtrlSetFont($bouton_valid , 24)
endfunc