Guest User

Untitled

a guest
Jan 18th, 2013
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 4.29 KB | None | 0 0
  1. Imports System.Net
  2. Public Class Form1
  3.     Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
  4.         Try
  5.             Process.Start(My.Application.Info.DirectoryPath.ToString & "\Wow.exe")
  6.             Application.Exit()
  7.         Catch ex As Exception
  8.             MsgBox("CANNOT FIND WOW.EXE PLEASE CHECK FILE DIRECTORY!", MsgBoxStyle.Critical)
  9.         End Try
  10.  
  11.  
  12.         Try
  13.             My.Computer.FileSystem.WriteAllText(My.Application.Info.DirectoryPath.ToString & "\Data\enUS\realmlist.wtf", "set realmlist *****", False)
  14.             MsgBox("Realmlist is changed!", MsgBoxStyle.Information)
  15.         Catch ex As Exception
  16.             MsgBox("Cannot find realmlist, please contact administrator for more help", MsgBoxStyle.Critical)
  17.  
  18.         End Try
  19.  
  20.         If My.Computer.FileSystem.DirectoryExists(My.Application.Info.DirectoryPath.ToString & "\Cache") Then
  21.             Try
  22.                 My.Computer.FileSystem.DeleteDirectory(My.Application.Info.DirectoryPath.ToString & "\Cache", FileIO.DeleteDirectoryOption.DeleteAllContents)
  23.                 MsgBox("Cache Cleared!", MsgBoxStyle.Information)
  24.             Catch ex As Exception
  25.                 MsgBox("CANNOT FIND CACHE PLEASE CHECK FILE DIRECTORY!", MsgBoxStyle.Critical)
  26.             End Try
  27.         End If
  28.     End Sub
  29.  
  30.     Private Sub PictureBox1_MouseEnter(sender As Object, e As EventArgs) Handles PictureBox1.MouseEnter
  31.         PictureBox1.BackgroundImage = My.Resources.Play_hover
  32.     End Sub
  33.  
  34.     Private Sub PictureBox1_MouseLeave(sender As Object, e As EventArgs) Handles PictureBox1.MouseLeave
  35.         PictureBox1.BackgroundImage = My.Resources.Play_nonclick
  36.     End Sub
  37.  
  38.     Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles PictureBox4.Click
  39.         System.Diagnostics.Process.Start("WEBSITE")
  40.     End Sub
  41.  
  42.     Private Sub PictureBox4_MouseEnter(sender As Object, e As EventArgs) Handles PictureBox4.MouseEnter
  43.         PictureBox4.BackgroundImage = My.Resources.home_hover
  44.     End Sub
  45.  
  46.     Private Sub PictureBox4_MouseLeave(sender As Object, e As EventArgs) Handles PictureBox4.MouseLeave
  47.         PictureBox4.BackgroundImage = My.Resources.Home_nonclick
  48.     End Sub
  49.  
  50.     Private Sub PictureBox5_Click(sender As Object, e As EventArgs) Handles PictureBox5.Click
  51.         System.Diagnostics.Process.Start("DOATE SITE")
  52.     End Sub
  53.  
  54.     Private Sub PictureBox5_MouseEnter(sender As Object, e As EventArgs) Handles PictureBox5.MouseEnter
  55.         PictureBox5.BackgroundImage = My.Resources.Donate_hover
  56.     End Sub
  57.  
  58.     Private Sub PictureBox5_MouseLeave(sender As Object, e As EventArgs) Handles PictureBox5.MouseLeave
  59.         PictureBox5.BackgroundImage = My.Resources.Donate_nonclick
  60.     End Sub
  61.  
  62.  
  63.  
  64.     Private Sub CheckForUpdateToolStripMenuItem_Click(sender As Object, e As EventArgs)
  65.         CheckForUpdates()
  66.     End Sub
  67.  
  68.     Public Sub CheckForUpdates()
  69.  
  70.  
  71.     End Sub
  72.  
  73.     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  74.         Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("VERSION.TEXT should also be here ")
  75.  
  76.         Dim response As System.Net.HttpWebResponse = request.GetResponse()
  77.         Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
  78.         Dim newestversion As String = sr.ReadToEnd()
  79.         Dim currentversion As String = Application.ProductVersion
  80.         If newestversion.Contains(currentversion) Then
  81.  
  82.         Else
  83.             MsgBox("There is a new update we will download it now for you.")
  84.             System.Diagnostics.Process.Start("UPDATE LINK SHOULD BE HERE BUT REMOVED CUZ OF NEEDING HELP")
  85.         End If
  86.     End Sub
  87.  
  88.     Private Sub PictureBox6_Click(sender As Object, e As EventArgs) Handles PictureBox6.Click
  89.         Me.Close()
  90.     End Sub
  91.  
  92.     Private Sub PictureBox6_MouseEnter(sender As Object, e As EventArgs) Handles PictureBox6.MouseEnter
  93.         PictureBox6.BackgroundImage = My.Resources.x_button_Hover
  94.     End Sub
  95.  
  96.     Private Sub PictureBox6_MouseLeave(sender As Object, e As EventArgs) Handles PictureBox6.MouseLeave
  97.         PictureBox6.BackgroundImage = My.Resources.x_button_nonclick
  98.     End Sub
  99.  
  100.     Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click
  101.  
  102.     End Sub
  103. End Class
Advertisement
Add Comment
Please, Sign In to add comment