1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Dim coo_lambert As String
Dim words() As String
Dim debut_coog As Integer = TextBox1.Text.IndexOf("Coordonnees :")
If debut_coog = 0 Then
coo_lambert = "non renseigné" 'ici coordonnnes n'a pas été detecté
Else
debut_coog = debut_coog + 13
Dim fin_coog As Integer = TextBox1.Text.IndexOf(ControlChars.NewLine, debut_coog)
If fin_coog = 0 Then
coo_lambert = "inconnue" 'ici la fin de ligne n'est pas détecté
Else
Dim longeur_coog As Integer = fin_coog - debut_coog
coo_lambert = TextBox1.Text.Substring(debut_coog, longeur_coog) 'ici j'ai trouvé les valeurs de coordonées
Label1.Text = coo_lambert 'affiche les coordonnées lambert en entier
words = coo_lambert.Split(New String() {}, StringSplitOptions.RemoveEmptyEntries) 'coupes les lambert en 2 (X;Y)
TextBox2.Text = words(0) 'affiche la premiére coordonnée
TextBox3.Text = words(1) 'affiche la seconde coordonnée
Label2.Text = debut_coog
'ici instruction de conversion
'realisation de la carte
End If
End If |
Partager