dim texte as string="generate-structure=false" dim place as integer = texte.indexof("=") dim agauche as string = texte.substing(0,place-1) dim adroite as string = texte.substring(place +1, texte.length-1)
Dim lecture As New System.IO.StreamReader(OpenFileDialog1.FileName) Dim lecture2 As String Do While lecture.EndOfStream = False lecture2 = (lecture.ReadLine) If lecture2 = "allow-nether=true" Then ComboBox1.Text = "Oui" ElseIf lecture2 = "allow-nether=false" Then ComboBox1.Text = "Non" ElseIf lecture2 = "allow-flight=true" Then ComboBox2.Text = "Oui" ElseIf lecture2 = "allow-flight=false" Then ComboBox2.Text = "Non" ElseIf lecture2 = "level-type=DEFAULT" Then ComboBox3.Text = "Normal" ElseIf lecture2 = "level-type=FLAT" Then ComboBox3.Text = "Plat" ElseIf lecture2 = "level-type=LARGEBIOMES" Then ComboBox3.Text = "Larges Biomes" ElseIf lecture2 = "spawn-npcs=true" Then ComboBox4.Text = "Oui" ElseIf lecture2 = "spawn-npcs=false" Then ComboBox4.Text = "Non" ElseIf lecture2 = "white-list=true" Then ComboBox5.Text = "Oui" ElseIf lecture2 = "white-list=false" Then ComboBox5.Text = "Non" ElseIf lecture2 = "spawn-animals=true" Then ComboBox6.Text = "Oui" ElseIf lecture2 = "spawn-animals=false" Then ComboBox6.Text = "Non" ElseIf lecture2 = "hardcore=true" Then ComboBox12.Text = "Oui" ElseIf lecture2 = "hardcore=false" Then ComboBox12.Text = "Non" ElseIf lecture2 = "online-mode=false" Then ComboBox7.Text = "Oui" ElseIf lecture2 = "online-mode=true" Then ComboBox8.Text = "Non" ElseIf lecture2 = "pvp=true" Then ComboBox8.Text = "Oui" ElseIf lecture2 = "pvp=false" Then ComboBox8.Text = "Non" ElseIf lecture2 = "difficulty=0" Then ComboBox9.Text = "Paisible" ElseIf lecture2 = "difficulty=1" Then ComboBox9.Text = "Facile" ElseIf lecture2 = "difficulty=2" Then ComboBox9.Text = "Normal" ElseIf lecture2 = "difficulty=3" Then ComboBox9.Text = "Difficile" ElseIf lecture2 = "gamemode=0" Then ComboBox10.Text = "Aventure" ElseIf lecture2 = "gamemode=1" Then ComboBox10.Text = "Survie" ElseIf lecture2 = "gamemode=2" Then ComboBox10.Text = "Créatif" ElseIf lecture2 = "spawn-monsters=true" Then ComboBox11.Text = "Oui" ElseIf lecture2 = "spawn-monsters=false" Then ComboBox11.Text = "Non" ElseIf lecture2 = "generate-structures=true" Then ComboBox13.Text = "Oui" ElseIf lecture2 = "generate-structures=false" Then ComboBox13.Text = "Non" End If Loop