Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Commit

Permalink
Added SteamCMD check and Bat Clear after recreation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon Grünewald committed Dec 28, 2015
1 parent 1ceb13d commit 64fb6a3
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion SteamCMDui/Form1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Public Class Form1

Public Function SteamWebApiAppList(Type As String)

'JSON Steam API AppID reader

Dim RW As Integer = 1
Dim SteamGameInfoObject As SteamAPIJSONResult = JsonConvert.DeserializeObject(Of SteamAPIJSONResult)(jsonSource)

Expand Down Expand Up @@ -72,6 +74,16 @@ Public Class Form1

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

'SteamCMD Check

If Not My.Computer.FileSystem.FileExists(My.Application.Info.DirectoryPath + "\SteamCMD.exe") Then

MsgBox("Please put this Programm in the same folder as SteamCMD", MsgBoxStyle.OkOnly & MsgBoxStyle.Critical, "Error")

Application.Exit()

End If

'Prepare Stuff for the programm

SaveFileDialog1.Filter = "Batch File|*.bat"
Expand Down Expand Up @@ -130,6 +142,8 @@ Public Class Form1

Try

Debug.Print(TempString)

Process.Start(New ProcessStartInfo(My.Application.Info.DirectoryPath + "\SteamCMD.exe", TempString))

Catch ex As Exception
Expand Down Expand Up @@ -326,9 +340,23 @@ Public Class Form1

TempString = "SteamCMD.exe " + TempString + vbCrLf

'Write in file

If My.Computer.FileSystem.FileExists(SaveFileDialog1.FileName) Then

Try

My.Computer.FileSystem.DeleteFile(SaveFileDialog1.FileName)

Catch ex As Exception

MsgBox(ex.Message)

End Try
End If

Try

'Write in file
My.Computer.FileSystem.WriteAllText(SaveFileDialog1.FileName, TempString, True)

Catch ex As Exception
Expand Down

0 comments on commit 64fb6a3

Please sign in to comment.