Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub ImportToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ImportToolStripMenuItem.Click
- Try
- If ofDialog.ShowDialog = DialogResult.OK Then
- For Each file As String In ofDialog.FileNames
- Dim vehicles As New XmlDocument()
- vehicles.Load(file)
- Using items As XmlNodeList = vehicles.DocumentElement.SelectNodes("/CVehicleModelInfoVarGlobal/Kits/Item")
- For Each item As XmlNode In items
- Dim kitname As String = item.SelectSingleNode("kitName").InnerText
- Dim id As String = item.SelectSingleNode("id").Attributes(0).Value
- Dim temp() As String = Split(kitname, "_", -1)
- Dim vehName As String = temp(1)
- Dim kittype As String = item.SelectSingleNode("kitType").InnerText
- AddItem(id, vehName, kitname, kittype)
- Next
- End Using
- Next
- End If
- Catch ex As Exception
- MsgBox(ex.Message & " " & ex.StackTrace, MsgBoxStyle.Critical, "VKID Tool")
- End Try
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement