-
Notifications
You must be signed in to change notification settings - Fork 1
/
ReDelimIt.vb
27 lines (23 loc) · 1 KB
/
ReDelimIt.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Imports System.IO
Public Class ReDelimIt
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim res = OpenFileDialog1.ShowDialog
If res = Windows.Forms.DialogResult.OK Then
txtFile.Text = OpenFileDialog1.FileName
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If String.IsNullOrEmpty(txtDelim.Text) OrElse String.IsNullOrEmpty(txtFile.Text) Then
MsgBox("Both enter both a file path and a delimiter.")
Else
Dim ouputpath = txtFile.Text & ".delim"
Try
Redelimiter.Redelimit(txtDelim.Text, chkHeaders.Checked, chkAddKey.Checked, txtFile.Text, ouputpath)
Catch ex As Exception
MsgBox("Error: " & ex.Message)
End Try
frmSuccess.Show()
frmSuccess.txtOutputPath.Text = "test"
End If
End Sub
End Class