FilterReader: Add new project
This commit is contained in:
25
GUIs.Test.TestGUI/frmFulltext.vb
Normal file
25
GUIs.Test.TestGUI/frmFulltext.vb
Normal file
@@ -0,0 +1,25 @@
|
||||
Imports DigitalData.Modules.FilterReader
|
||||
|
||||
Public Class frmFulltext
|
||||
Private Sub frmFulltext_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Dim oResult = OpenFileDialog1.ShowDialog()
|
||||
|
||||
If oResult = DialogResult.OK Then
|
||||
Dim oFileName = OpenFileDialog1.FileName
|
||||
|
||||
|
||||
Try
|
||||
Using oReader As New FilterReader(oFileName)
|
||||
Dim oContents = oReader.ReadToEnd()
|
||||
TextBox1.Text = oContents
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
TextBox1.Text = $"Fulltext could not be extracted!{vbNewLine}{ex.Message}"
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user