Candidate-7-Pro/FrmInput1.vb
2021-09-10 14:15:23 +02:00

61 lines
2.5 KiB
VB.net

Public Class FrmInput1
Private Sub CmdAnnul_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdAnnul.Click
TmrCaR.Stop() REM arret du timer
FrmEdit.Close() REM ferme toutes les pages précédentes
FrmNouv.Close()
Me.Close() REM ferme la page courante
FrmAccueil.Show() REM retour a la page d'accueil (show)
End Sub
Private Sub TmrCaR_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TmrCaR.Tick
LblCaR.Tag -= 1 REM décremente le temps
REM condition d'affichage:
If LblCaR.Tag <= 1 Then
LblCaR.Text = "Vous disposez de " & LblCaR.Tag & " seconde."
End If
If LblCaR.Tag < 60 And LblCaR.Tag <> 1 Then
LblCaR.Text = "Vous disposez de " & LblCaR.Tag & " secondes."
End If
If LblCaR.Tag <= 10 Then
LblCaR.ForeColor = Color.Red
End If
If LblCaR.Tag <= 0 Then REM temps écoulé
TmrCaR.Stop() REM arret du timer
LblCaR.Text = "Le temps impartie est écoulé."
MsgBox("Le temps impartie est écoulé. L'inscription a échoué.", MsgBoxStyle.Exclamation, "Echec")
Me.Hide() REM cache feuille courante
FrmAccueil.Show() REM retour a l'accueil
End If
End Sub
Private Sub FrmIsc2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
LblCaR.Tag = 60 REM initialisation du timer
If FrmAccueil.Boule = False Then REM false == inscription
TmrCaR.Start() REM lancement du timer
Me.Text = "Assistant création de candidature (2/4)"
'Lbl1.Text = "Renseignez votre identité ici :"
'CmdPre.Visible = False
'LblCaR.Visible = True
End If
If FrmAccueil.Boule = True Then REM true == édition
Me.Text = "Assistant édition de candidature (2/4)"
Lbl1.Text = "Editez l'identité du canditat ici :"
CmdPre.Visible = True
LblCaR.Visible = False
End If
End Sub
Private Sub CmdNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdNext.Click
Me.Hide() REM cache feuille courante
FrmInput2.Show() REM montre feuille ajout
TmrCaR.Stop() REM fin du timer
End Sub
Private Sub CmdPre_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdPre.Click
REM retour au fichier précédant
Me.Hide()
FrmEdit.Show()
End Sub
End Class