Changes for issue #27

This commit is contained in:
Michael J. Seiferling
2016-02-02 10:29:28 -06:00
parent 47f4b0774d
commit 2fb18c5f19
7 changed files with 232 additions and 6 deletions
+16
View File
@@ -1,5 +1,6 @@
Imports GBM.My.Resources
Imports System.Net
Imports System.IO
Public Class mgrCommon
@@ -126,6 +127,21 @@ Public Class mgrCommon
oProcess.Start()
End Sub
'Save string as text file
Public Shared Sub SaveText(ByVal sText As String, ByVal sPath As String)
Dim oStream As StreamWriter
Try
If File.Exists(sPath) Then My.Computer.FileSystem.DeleteFile(sPath, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
oStream = New StreamWriter(sPath)
oStream.Write(sText)
oStream.Flush()
oStream.Close()
Catch ex As Exception
ShowMessage(mgrCommon_ErrorWritingTextFile, ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
'Handles no extra parameters
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
Dim oResult As MsgBoxResult