Candidate-7-Pro/FrmInput2.vb
2021-09-10 14:11:11 +02:00

96 lines
3.8 KiB
VB.net

Public Class FrmInput2
Dim tme() As String = {"Allemand", "Anglais", "Astronomie", "Biologie", "Espagnole", "Français", "Géographie", "Géologie", "Histoire", "Mathématique", "Philosohpie", "Russe"}
Dim tmo() As String = {"Allemand", "Anglais", "Astronomie", "Espagnole", "Histoire", "Russe"}
Dim tmf() As String = {"Lancer", "Natation", "Saut"}
Dim treg() As String = {"Auvergne", "Bordelais", "Bretagne", "Morvan", "Nord", "Normandie", "Paris", "Poitou"}
Private Sub FrmIsc3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If FrmAccueil.Boule = False Then
Me.Text = "Assistant création de candidature (3/4)"
TmrCaR.Start()
LblCaR.Tag = 60 + 15
RBno.Checked = True
'Me.Text = "Assistant inscription (3/4)"
'CmdDelet.Visible = False
'CmdPre.Visible = False
'LblCaR.Visible = True
End If
If FrmAccueil.Boule = True Then
Me.Text = "Assistant édition de candidature (3/4)"
CmdDelet.Visible = True
CmdPre.Visible = True
LblCaR.Visible = False
End If
End Sub
Private Sub CmdAnnul_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdAnnul.Click
TmrCaR.Stop()
FrmEdit.Close()
FrmNouv.Close()
FrmInput1.Close()
Me.Close()
FrmAccueil.Show()
End Sub
Private Sub TmrCaR_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TmrCaR.Tick
LblCaR.Tag -= 1
If LblCaR.Tag <= 1 Then
LblCaR.Text = "Vous disposez de " & LblCaR.Tag & " seconde restante."
End If
If LblCaR.Tag > 61 Then
LblCaR.Text = "Vous disposez d'une minute et " & LblCaR.Tag - 60 & " secondes restantes."
End If
If LblCaR.Tag = 61 Then
LblCaR.Text = "Vous disposez d'une minute et " & LblCaR.Tag - 60 & " seconde restante."
End If
If LblCaR.Tag <= 60 And LblCaR.Tag <> 1 Then
LblCaR.Text = "Vous disposez de " & LblCaR.Tag & " secondes restantes."
End If
If LblCaR.Tag <= 10 Then
LblCaR.ForeColor = Color.Red
End If
If LblCaR.Tag <= 0 Then
TmrCaR.Stop()
LblCaR.Text = "Le temps impartie est écoulée."
MsgBox("Le temps impartie est écoulé. L'inscription a échoué.", MsgBoxStyle.Exclamation, "Echec")
End
End If
End Sub
Private Sub CmdNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdNext.Click
TmrCaR.Stop()
Me.Hide()
FrmInput3.Show()
End Sub
Private Sub CmdDelet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdDelet.Click
Dim quit As Integer
quit = MsgBox("Vous êtes sur le point de supprimer une candidature. Voulez-vous continuer ?", MsgBoxStyle.YesNo + MsgBoxStyle.Question, "Suppression d'un candidat")
If quit = 6 Then
MsgBox("Le Candidat a bien été supprimé.", MsgBoxStyle.Information, "Information")
FrmEdit.Close()
FrmNouv.Close()
FrmInput1.Close()
Me.Close()
FrmAccueil.Show()
End If
End Sub
Private Sub CmdPre_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdPre.Click
Me.Hide()
FrmInput1.Show()
End Sub
Private Sub RBno_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RBno.CheckedChanged, RBYes.CheckedChanged
If RBno.Checked Then
RBYes.Checked = False
GBFact.Visible = False
End If
If RBYes.Checked Then
RBno.Checked = False
GBFact.Visible = True
End If
End Sub
End Class