Advertisement
Guest User

Launcer + Auto-Updater TIBIA

a guest
Sep 13th, 2014
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. Imports System.Net
  2. Public Class Form1
  3. WithEvents webclient1 As New WebClient
  4. WithEvents webclient2 As New WebClient
  5. Dim versaoatal As String = "1.1"
  6. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  7. System.Diagnostics.Process.Start("http://gameselementary.net/")
  8. End Sub
  9.  
  10. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  11. System.Diagnostics.Process.Start("http://gameselementary.net//index.php/p/v/shop")
  12. End Sub
  13.  
  14. Private Sub webclient2_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles webclient2.DownloadProgressChanged
  15. ProgressBar1.Maximum = e.TotalBytesToReceive
  16. ProgressBar1.Value = e.BytesReceived
  17.  
  18. End Sub
  19.  
  20. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  21. Dim versaodosite As String = webclient1.DownloadString("http://gameselementary.net/nova.php")
  22.  
  23. If versaodosite > versaoatal Then
  24. MessageBox.Show("Atualizando")
  25. webclient2.DownloadFileAsync(New Uri("http://gameselementary.net/setup.exe"), "C:\PokemonOrigins\setup.exe")
  26. System.Diagnostics.Process.Start("C:\PokemonOrigins\setup.exe")
  27. Close()
  28. End If
  29. If versaodosite = versaoatal Then
  30. MessageBox.Show("Seu Client já está Atualizado")
  31. System.Diagnostics.Process.Start("C:\PokemonOrigins\Otclient.exe")
  32. Close()
  33. End If
  34. End Sub
  35. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement