Guest User

Untitled

a guest
Jun 21st, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. If Not ListBox1.SelectedIndex < 0 Then
  2. ListView.Items.Clear()
  3.  
  4. If Not File.Exists(My.Application.Info.DirectoryPath & "\Log.txt") = True Then
  5. My.Computer.FileSystem.OpenTextFileWriter(My.Application.Info.DirectoryPath & "\Log.txt", True)
  6. End If
  7.  
  8. Dim sr = New StreamReader(My.Application.Info.DirectoryPath & "\Log.txt")
  9. Dim LogDaten As String()
  10. LogDaten = sr.ReadToEnd.Split(ControlChars.CrLf)
  11. sr.Close()
  12.  
  13. For i As Integer = 0 To LogDaten.Length - 1
  14. If Not LogDaten(i).Length <= 1 Then
  15. Dim EinzelneDaten As String() = LogDaten(i).Split("~")
  16. If EinzelneDaten(0) = ListBox1.SelectedItem Then
  17.  
  18. Dim sr2 = New StreamReader(My.Application.Info.DirectoryPath & "\Projects\" & EinzelneDaten(0) & "\Log.txt")
  19. Dim LogDaten2 As String()
  20. LogDaten2 = sr2.ReadToEnd.Split(ControlChars.CrLf)
  21. sr2.Close()
  22.  
  23. Dim EinzelneDaten2 As String() = LogDaten2(i).Split("~")
  24.  
  25. If EinzelneDaten(0) = ListBox1.SelectedItem Then
  26. For j As Integer = 1 To LogDaten2.Length - 1
  27. SchreibeEinträge(EinzelneDaten2(0), EinzelneDaten2(1), EinzelneDaten2(2), EinzelneDaten2(3), EinzelneDaten2(4))
  28. Next
  29. End If
  30. End If
  31. End If
  32. Next
  33. End If
Add Comment
Please, Sign In to add comment