15.07.2013 Views

Microsoft Visual Basic - Encyclopaedia Gentium Boni

Microsoft Visual Basic - Encyclopaedia Gentium Boni

Microsoft Visual Basic - Encyclopaedia Gentium Boni

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

frmDictionnaires - 1<br />

Private Sub btnQuitter_Click()<br />

Unload Me<br />

End Sub<br />

Public Sub btnRechercher_Click()<br />

Dim mot$<br />

msg = Replace(frmDictionnaires.txtRecherche.Text, ",", "", 1)<br />

If frmDictionnaires.txtRecherche.Text = "" Then Exit Sub<br />

'If cboEncyclo.Text = "KJD" Then<br />

' mot = txtRecherche.Text<br />

' Call LireKJVD(mot)<br />

' Exit Sub<br />

'End If<br />

'If cboEncyclo.Text = "CBC" Then<br />

' mot = txtRecherche.Text<br />

' Call LireCBC(mot)<br />

' Exit Sub<br />

'End If<br />

frmParse2.Text1.Text = ""<br />

' définition des variables<br />

Dim lfile As Long 'Lecture<br />

Dim ofile As String 'Fichier à ouvrir<br />

Dim chercher$, reference$<br />

Dim dico$<br />

mot = frmDictionnaires.txtRecherche.Text<br />

lfile = FreeFile<br />

' conditions pour les différents fichiers<br />

If cboEncyclo.Text = "Easton" Then<br />

mot = LCase(mot)<br />

dico = "easton.txt"<br />

ElseIf cboEncyclo.Text = "Smith" Then<br />

dico = "smith.txt"<br />

ElseIf cboEncyclo.Text = "ISBE" Then<br />

dico = "isbe.txt"<br />

ElseIf cboEncyclo.Text = "Hitchcock" Then<br />

dico = "hitch.txt"<br />

ElseIf cboEncyclo.Text = "ATSBD" Then<br />

RechercherATSBD (mot)<br />

Exit Sub<br />

ElseIf cboEncyclo.Text = "Webster" Then<br />

RechercherWebster (mot)<br />

Exit Sub<br />

ElseIf cboEncyclo.Text = "Nuttall" Then<br />

RechercherNuttall (mot)<br />

Exit Sub<br />

ElseIf cboEncyclo.Text = "Wace" Then<br />

RechercherWace (mot)<br />

Exit Sub<br />

End If<br />

' affectation du fichier à ouvrir<br />

ofile = App.Path & "\modules\dictionnaires\" & dico<br />

If dico = "isbe.txt" Then<br />

mot = UCase(mot)<br />

End If<br />

If cboEncyclo.Text = "Easton" Or cboEncyclo.Text = "Smith" Then<br />

premierelettre = UCase(Left(mot, 1))<br />

mot = premierelettre & Mid(mot, 2, Len(mot))<br />

End If<br />

reference = "\" & mot & "\"<br />

Open ofile For Input As #lfile<br />

Do<br />

Line Input #lfile, ligne<br />

If Left(ligne, Len(reference)) = reference Then ' pour que le mot recherché soit exact<br />

'affectation du verset du fichier à la variable<br />

frmParse2.Text1.Text = frmParse2.Text1.Text & ligne<br />

Do<br />

Line Input #lfile, ligne

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!