SHARE
TWEET

sad

a guest Aug 14th, 2016 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Class Form1
  2.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  3.         If My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec rec.cfg") Then
  4.             Label2.Text = "Current cfg: play"
  5.         ElseIf My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec play.cfg") Then
  6.             Label2.Text = "Current cfg: rec"
  7.         Else
  8.             Label2.Text = "Current cfg: none"
  9.         End If
  10.     End Sub
  11.     Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
  12.  
  13.     End Sub
  14.  
  15.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  16.         If My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec play.cfg") Then
  17.             My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec.cfg", "autoexec rec.cfg")
  18.             My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec play.cfg", "autoexec.cfg")
  19.             Label2.Text = "Current cfg: play"
  20.             MsgBox("Success! Cfg changed to the play cfg")
  21.         Else
  22.             MsgBox("Cfg already set")
  23.         End If
  24.     End Sub
  25.  
  26.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  27.         If My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec rec.cfg") Then
  28.             My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec.cfg", "autoexec play.cfg")
  29.             My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec rec.cfg", "autoexec.cfg")
  30.             Label2.Text = "Current cfg: rec"
  31.             MsgBox("Success! Cfg changed to the recording cfg")
  32.         Else
  33.             MsgBox("Cfg already set")
  34.         End If
  35.  
  36.     End Sub
  37.     Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
  38.  
  39.     End Sub
  40.  
  41.     Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
  42.         Process.Start("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg")
  43.     End Sub
  44. End Class
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top