Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- ComboBox1.Items.Add("low graphics")
- ComboBox1.Items.Add("medium graphics")
- ComboBox1.Items.Add("max graphics")
- If My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec rec.cfg") And My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec bad.cfg") Then
- Label2.Text = "Current cfg: medium graphics"
- ElseIf My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec mid.cfg") And My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec bad.cfg") Then
- Label2.Text = "Current cfg: max graphics"
- ElseIf My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec mid.cfg") And My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec rec.cfg") Then
- Label2.Text = "Current cfg: low graphics"
- Else
- Label2.Text = "Current cfg: none"
- End If
- End Sub
- Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- If ComboBox1.Text = "" Then
- MsgBox("Please choose a graphics config to install")
- Else
- If ComboBox1.Text = "low graphics" Then
- If Label2.Text = "Current cfg: medium graphics" Then
- If My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec bad.cfg") Then
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec.cfg", "autoexec mid.cfg")
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec bad.cfg", "autoexec.cfg")
- End If
- ElseIf Label2.Text = "Current cfg: max graphics" Then
- If My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec bad.cfg") Then
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec.cfg", "autoexec rec.cfg")
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec bad.cfg", "autoexec.cfg")
- End If
- End If
- Label2.Text = "Current cfg: low graphics"
- ElseIf ComboBox1.Text = "medium graphics" Then
- If Label2.Text = "Current cfg: low graphics" Then
- If My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec mid.cfg") Then
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec.cfg", "autoexec bad.cfg")
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec mid.cfg", "autoexec.cfg")
- End If
- ElseIf Label2.Text = "Current cfg: max graphics" Then
- If My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec mid.cfg") Then
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec.cfg", "autoexec rec.cfg")
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec mid.cfg", "autoexec.cfg")
- End If
- End If
- Label2.Text = "Current cfg: medium graphics"
- ElseIf ComboBox1.Text = "max graphics" Then
- If Label2.Text = "Current cfg: low graphics" Then
- If My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec rec.cfg") Then
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec.cfg", "autoexec bad.cfg")
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec rec.cfg", "autoexec.cfg")
- End If
- ElseIf Label2.Text = "Current cfg: medium graphics" Then
- If My.Computer.FileSystem.FileExists("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec rec.cfg") Then
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec.cfg", "autoexec mid.cfg")
- My.Computer.FileSystem.RenameFile("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg\autoexec rec.cfg", "autoexec.cfg")
- End If
- End If
- Label2.Text = "Current cfg: max graphics"
- End If
- MsgBox(ComboBox1.Text & " cfg set!")
- End If
- End Sub
- Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
- Process.Start("F:\Steam\SteamApps\common\Team Fortress 2\tf\cfg")
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement