With My.Application.Log.DefaultFileLogWriter
.Flush()
My.Forms.FormLog.LogTextFromFile = .FullLogFileName
End With
My.Forms.FormLog.ShowDialog()
Public WriteOnly Property LogTextFromFile() As String
Set(ByVal value As String)
Dim _text As String = ""
Using _stream As FileStream = File.Open(value, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
Dim _buffer As Byte() = New Byte(_stream.Length) {}
Dim _encoding As UTF8Encoding = New UTF8Encoding(True, True)
Do While _stream.Read(_buffer, 0, _buffer.Length) > 0
_text = _text + _encoding.GetString(_buffer)
Loop
End Using
Dim _lines = Strings.Split(_text, vbCrLf)
Array.Reverse(_lines)
TLog.Text = Join(_lines, vbCrLf).Replace(vbNullChar, "*")
End Set
End Property
Comments
0 B
|👍
/👎
0 B
|👍
/👎