1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| 'Traitement de SIMAGE
'plage de S : +6.00 à -11.00 bornes comprises
traitement de la valeur de ajouts
Dim ajouts As Double
Select Case .valS
Case Is > -6 ' entre -5.99 et +6.00
ajouts = 0
Case Is > -7 ' entre -6.00 et -6.99
ajouts = 0.25
Case Is > -8.5 ' entre -7.00 et -8.49
ajouts = 0.5
Case Is > -9.5 ' entre -8.50 et -9.49
ajouts = 0.75
Case Is > -10.5 ' entre -9.49 et -10.49
ajouts = 1
Case Else ' entre -10.50 et -11.00
ajouts = 1.25
End Select
If S.Text < "0" And C.Text < "0" Then
SIMAGE.Text = (.valS + ajouts).ToString("0.00")
'on passe en VERT si ajout <> 0
If ajouts <> 0 Then
SIMAGE.BackColor = Color.DarkGreen
LabelWL.Visible = True
RectangleShapeWL.Visible = True
Else
SIMAGE.BackColor = Color.LightSlateGray
LabelWL.Visible = False
RectangleShapeWL.Visible = False
End If
End If
If S.Text < "0" And C.Text = "0" Then
SIMAGE.Text = (.valS + ajouts).ToString("0.00")
'on passe en VERT si ajout <> 0
If ajouts <> 0 Then
SIMAGE.BackColor = Color.DarkGreen
LabelWL.Visible = True
RectangleShapeWL.Visible = True
Else
SIMAGE.BackColor = Color.LightSlateGray
LabelWL.Visible = False
RectangleShapeWL.Visible = False
End If
End If |
Partager