Source informations

    Note :
    No note
    Category : Divers Classed Under : Alcoolemie, Alcool, Science Gambas Version : Gambas 2 Date of creation : 28/09/2010 Seen/Downloaded : 568 / 38

    Author : dodich



    Description (translated from French by google(tm))



    Description

    Mesurer son taux d'alcool dans le sang avec plusieurs facteurs (poids, sexe, repas, consommation, corpulence)

    Source

    • ' Gambas class file
    • STATIC A AS FLOAT ' Consommation biere
    • STATIC B AS FLOAT ' Consommation aperitif
    • STATIC C AS FLOAT ' Consommation vin
    • STATIC D AS FLOAT ' Consommation alcool fort
    • STATIC E AS FLOAT ' Total des consommations
    • STATIC S AS FLOAT ' variable alcool
    • STATIC P AS BYTE ' Poids
    • STATIC T AS FLOAT ' Taux
    • PUBLIC SUB _new()
    • S = 0.7
    • P = 70
    • END
    • PUBLIC SUB Form_Open()
    • END
    • PUBLIC FUNCTION Alcoolemie()
    • E = A + B + C + D
    • IF RadioButton1.Value = TRUE AND RadioButton3.Value = TRUE AND RadioButton7.Value = TRUE THEN S = 0.61 ' Homme Mince Ajeun
    • IF RadioButton1.Value = TRUE AND RadioButton4.Value = TRUE AND RadioButton7.Value = TRUE THEN S = 0.70 ' Homme Normal Ajeun
    • IF RadioButton1.Value = TRUE AND RadioButton5.Value = TRUE AND RadioButton7.Value = TRUE THEN S = 0.80 ' Homme Fort Ajeun
    • IF RadioButton1.Value = TRUE AND RadioButton3.Value = TRUE AND RadioButton6.Value = TRUE THEN S = 0.65 ' Homme Mine Ajeun
    • IF RadioButton1.Value = TRUE AND RadioButton4.Value = TRUE AND RadioButton6.Value = TRUE THEN S = 0.74 ' Homme Mine Ajeun
    • IF RadioButton1.Value = TRUE AND RadioButton5.Value = TRUE AND RadioButton6.Value = TRUE THEN S = 0.84 ' Homme Mine Ajeun
    • IF RadioButton2.Value = TRUE AND RadioButton3.Value = TRUE AND RadioButton7.Value = TRUE THEN S = 0.51 ' Homme Mince Ajeun
    • IF RadioButton2.Value = TRUE AND RadioButton4.Value = TRUE AND RadioButton7.Value = TRUE THEN S = 0.60 ' Homme Normal Ajeun
    • IF RadioButton2.Value = TRUE AND RadioButton5.Value = TRUE AND RadioButton7.Value = TRUE THEN S = 0.70 ' Homme Fort Ajeun
    • IF RadioButton2.Value = TRUE AND RadioButton3.Value = TRUE AND RadioButton6.Value = TRUE THEN S = 0.55 ' Homme Mine Ajeun
    • IF RadioButton2.Value = TRUE AND RadioButton4.Value = TRUE AND RadioButton6.Value = TRUE THEN S = 0.64 ' Homme Mine Ajeun
    • IF RadioButton2.Value = TRUE AND RadioButton5.Value = TRUE AND RadioButton6.Value = TRUE THEN S = 0.74 ' Homme Mine Ajeun
    • T = (E * 0.789) / (S * P) ' Formule alcoolemie
    • Label13.Text = Round(T, -2) & " g/l" ' Affichage du taux
    • END
    • PUBLIC SUB SpinBox2_Change()
    • A = (SpinBox2.Value * (SpinBox3.Value * 10)) * (SpinBox4.Value / 100)
    • END
    • PUBLIC SUB SpinBox3_Change()
    • A = (SpinBox2.Value * (SpinBox3.Value * 10)) * (SpinBox4.Value / 100)
    • END
    • PUBLIC SUB SpinBox4_Change()
    • A = (SpinBox2.Value * (SpinBox3.Value * 10)) * (SpinBox4.Value / 100)
    • END
    • PUBLIC SUB SpinBox5_Change()
    • B = (SpinBox5.Value * (SpinBox6.Value * 10)) * (SpinBox7.Value / 100)
    • END
    • PUBLIC SUB SpinBox6_Change()
    • B = (SpinBox5.Value * (SpinBox6.Value * 10)) * (SpinBox7.Value / 100)
    • END
    • PUBLIC SUB SpinBox7_Change()
    • B = (SpinBox5.Value * (SpinBox6.Value * 10)) * (SpinBox7.Value / 100)
    • END
    • PUBLIC SUB SpinBox8_Change()
    • C = (SpinBox8.Value * (SpinBox9.Value * 10)) * (SpinBox10.Value / 100)
    • END
    • PUBLIC SUB SpinBox9_Change()
    • C = (SpinBox8.Value * (SpinBox9.Value * 10)) * (SpinBox10.Value / 100)
    • END
    • PUBLIC SUB SpinBox10_Change()
    • C = (SpinBox8.Value * (SpinBox9.Value * 10)) * (SpinBox10.Value / 100)
    • END
    • PUBLIC SUB SpinBox11_Change()
    • D = (SpinBox11.Value * (SpinBox12.Value * 10)) * (SpinBox13.Value / 100)
    • END
    • PUBLIC SUB SpinBox12_Change()
    • D = (SpinBox11.Value * (SpinBox12.Value * 10)) * (SpinBox13.Value / 100)
    • END
    • PUBLIC SUB SpinBox13_Change()
    • D = (SpinBox11.Value * (SpinBox12.Value * 10)) * (SpinBox13.Value / 100)
    • END
    • PUBLIC SUB SpinBox1_Change()
    • P = SpinBox1.Value
    • END
    • PUBLIC SUB Button1_Click()
    • Alcoolemie()
    • END

    Conclusion

    Merci de commenter
    Ne soyez pas trop sévère c'est ma première source en Gambas

    The 5 last sources in the same category

    REDSHIFT par Prokopy
    ALCOOLEMIE par dodich
    GBBUGTRACKER, OUTIL POUR TRACER LES BUGS par linuxos
    GBEDITOR, UN PETIT EDITEUR POUR LE PROGRAMME DOKUWIKI par linuxos
    MICROCOMPTE par jean-yvon

    The 5 last sources of dodich

    ALCOOLEMIE

    Comments and opinions

    No comments yet.


    generated by gambas 2.99 in 0.0140 sec