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.

fctLireFlaviusJosephe - 1<br />

Public Function LireFJ(livre, chapitre, verset)<br />

Dim cherche$, ofile$, lfile%, ligne$, recherhche$<br />

frmBible.lblchapitre = livre & " " & chapitre & ":" & verset<br />

If frmBible.cboVersion.Text = "Flavius Josèphe" Then<br />

frmBible.txtPassage.FontSize = 14<br />

frmBible.txtPassage.Font = "Bwgrkn"<br />

Else<br />

frmBible.txtPassage.FontSize = 12<br />

frmBible.txtPassage.Font = "Times"<br />

End If<br />

If frmBible.cboVersion.Text = "Flavius Josèphe" Then<br />

ofile = App.Path & "\modules\JOS\jos.txt"<br />

Else<br />

ofile = App.Path & "\modules\JOS\joe.txt"<br />

End If<br />

lfile = FreeFile<br />

If livre = "Antiquités judaïques" Then<br />

chercher = "Ant"<br />

ElseIf livre = "Guerre des Juifs" Then<br />

chercher = "Jwr"<br />

ElseIf livre = "Vie de FJ" Then<br />

chercher = "Lif"<br />

ElseIf livre = "Contre Apion" Then<br />

chercher = "Apn"<br />

End If<br />

recherche = Trim(chercher & " " & chapitre & ":" & verset & " ")<br />

Open ofile For Input As #lfile<br />

Do<br />

Line Input #lfile, ligne<br />

If Left(ligne, Len(recherche)) = recherche Then<br />

frmBible.txtPassage.Text = Mid(ligne, Len(recherche) + 1, Len(ligne))<br />

Do<br />

Line Input #lfile, ligne<br />

If Mid(ligne, 1, Len(chercher)) = chercher Then Exit Function<br />

frmBible.txtPassage.Text = frmBible.txtPassage.Text & ligne<br />

Loop<br />

End If<br />

Loop While Not EOF(lfile)<br />

lose<br />

rmBible.txtPassage.Text = Replace(frmBible.txtPassage.Text, "~", ",")<br />

nd Function

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

Saved successfully!

Ooh no, something went wrong!