Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Open Source PokeNet Launcher Coded by -DefaulT
- 'Copyright (C) 2011 -DefaulT - PokeNet
- 'Distributed Through RaGEZONE & http://pocket-monsuta.co.cc/
- 'This program is free software; you can redistribute it and/or
- 'modify it under the terms of the GNU General Public License
- 'as published by the Free Software Foundation; either version 2
- 'of the License, or (at your option) any later version.
- 'This program is distributed in the hope that it will be useful,
- 'but WITHOUT ANY WARRANTY; without even the implied warranty of
- 'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- 'GNU General Public License for more details.
- 'You should have received a copy of the GNU General Public License
- 'along with this program; if not, write to the Free Software
- 'Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Imports Nini.Config
- Imports System.IO
- Public Class Form1
- ' Dragging form w/o borders :D
- #Region " ClientAreaMove Handling "
- Const WM_NCHITTEST As Integer = &H84
- Const HTCLIENT As Integer = &H1
- Const HTCAPTION As Integer = &H2
- Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
- Select Case m.Msg
- Case WM_NCHITTEST
- MyBase.WndProc(m)
- If m.Result = HTCLIENT Then m.Result = HTCAPTION
- Case Else
- MyBase.WndProc(m)
- End Select
- End Sub
- #End Region
- 'Loading all the INI files etc.
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- 'Loading Images
- Dim play1 As String = poke.Configs("IMAGES").Get("Play")
- Dim play2 As String = poke.Configs("IMAGES").Get("Play2")
- Dim website1 As String = poke.Configs("IMAGES").Get("Website")
- Dim website2 As String = poke.Configs("IMAGES").Get("Website2")
- Dim forums As String = poke.Configs("IMAGES").Get("Forums")
- Dim forums2 As String = poke.Configs("IMAGES").Get("Forums2")
- Dim background As String = poke.Configs("IMAGES").Get("Background")
- Dim close1 As String = poke.Configs("IMAGES").Get("Close")
- Dim close2 As String = poke.Configs("IMAGES").Get("Close2")
- 'Loading Possitions
- Dim playx As String = poke.Configs("POSITIONS").Get("PlayX")
- Dim playy As String = poke.Configs("POSITIONS").Get("PlayY")
- Dim websitex As String = poke.Configs("POSITIONS").Get("WebsiteX")
- Dim websitey As String = poke.Configs("POSITIONS").Get("WebsiteY")
- Dim forumsx As String = poke.Configs("POSITIONS").Get("ForumsX")
- Dim forumsy As String = poke.Configs("POSITIONS").Get("ForumsY")
- Dim closex As String = poke.Configs("POSITIONS").Get("CloseX")
- Dim closey As String = poke.Configs("POSITIONS").Get("CloseY")
- Dim webbrowserx As String = poke.Configs("POSITIONS").Get("WebbrowserX")
- Dim webbrowsery As String = poke.Configs("POSITIONS").Get("WebbrowserY")
- Dim progressbar1x As String = poke.Configs("POSITIONS").Get("Progressbar1X")
- Dim progressbar1y As String = poke.Configs("POSITIONS").Get("Progressbar1Y")
- Dim progressbar2x As String = poke.Configs("POSITIONS").Get("Progressbar2X")
- Dim progressbar2y As String = poke.Configs("POSITIONS").Get("Progressbar2Y")
- Dim label1x As String = poke.Configs("POSITIONS").Get("Label1X")
- Dim label1y As String = poke.Configs("POSITIONS").Get("Label1Y")
- Dim label2x As String = poke.Configs("POSITIONS").Get("Label2X")
- Dim label2y As String = poke.Configs("POSITIONS").Get("Label2Y")
- 'Loading Sizes
- Dim webwidth As String = poke.Configs("SIZES").Get("WebsiteWidth")
- Dim webheight As String = poke.Configs("SIZES").Get("WebsiteHeight")
- Dim forumwidth As String = poke.Configs("SIZES").Get("ForumsWidth")
- Dim forumsheight As String = poke.Configs("SIZES").Get("ForumsHeight")
- Dim playwidth As String = poke.Configs("SIZES").Get("PlayWidth")
- Dim playheight As String = poke.Configs("SIZES").Get("PlayHeight")
- Dim browserwidth As String = poke.Configs("SIZES").Get("WebbrowserWidth")
- Dim browserheight As String = poke.Configs("SIZES").Get("WebbrowserHeight")
- Dim basewidth As String = poke.Configs("SIZES").Get("BaseWidth")
- Dim baseheight As String = poke.Configs("SIZES").Get("BaseHeight")
- Dim closewidth As String = poke.Configs("SIZES").Get("CloseWidth")
- Dim closeheight As String = poke.Configs("SIZES").Get("CloseHeight")
- Dim pb1width As String = poke.Configs("SIZES").Get("Progressbar1Width")
- Dim pb1height As String = poke.Configs("SIZES").Get("Progressbar1Height")
- Dim pb2width As String = poke.Configs("SIZES").Get("Progressbar2Width")
- Dim pb2height As String = poke.Configs("SIZES").Get("Progressbar2Height")
- 'Loading Links
- Dim weblink As String = poke.Configs("LINKS").Get("Website")
- Dim forumlink As String = poke.Configs("LINKS").Get("Forums")
- Dim newslink As String = poke.Configs("LINKS").Get("News")
- 'Loading Shell Information
- Dim jshell As String = poke.Configs("MISC").Get("Shell")
- 'Set up the update info
- Dim Update As New IniConfigSource("update.ini")
- Dim u As String = Update.Configs("UPDATE").Get("UpdateINI")
- Dim p As String = My.Computer.FileSystem.CurrentDirectory + "\"
- Dim u2 As String = Update.Configs("UPDATE").Get("UpdateINI2")
- Dim u3 As String = Update.Configs("UPDATE").Get("PostUpdateINI")
- Dim rev1 As String = Update.Configs("REV").Get("New")
- Dim rev2 As String = Update.Configs("REV").Get("Old")
- 'Getting update info
- 'Show on UI
- Label1.Text = "Starting Up..."
- If rev1 > rev2 Then
- If System.IO.File.Exists(p + "pokenet.ini") = True Then
- System.IO.File.Delete(p + "pokenet.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u, _
- p + "pokenet.ini")
- End If
- If rev1 = rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u3, _
- p + "update.ini")
- 'Change progressbars and update the label
- ProgressBar1.Value = 100
- ProgressBar2.Value = 10
- Label2.Text = "10%"
- ElseIf rev1 > rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u2, _
- p + "update.ini")
- 'Change progressbars and update the label
- ProgressBar1.Value = 100
- ProgressBar2.Value = 10
- Label2.Text = "10%"
- End If
- 'Download patches if there is any
- Dim patch1 As String = Update.Configs("UPDATE").Get("PatchFiles1")
- Dim patch2 As String = Update.Configs("UPDATE").Get("PatchFiles2")
- Dim patch3 As String = Update.Configs("UPDATE").Get("PatchFiles3")
- Dim patch4 As String = Update.Configs("UPDATE").Get("PatchFiles4")
- Dim patch5 As String = Update.Configs("UPDATE").Get("PatchFiles5")
- Dim patch6 As String = Update.Configs("UPDATE").Get("PatchFiles6")
- Dim patch7 As String = Update.Configs("UPDATE").Get("PatchFiles7")
- Dim patch8 As String = Update.Configs("UPDATE").Get("PatchFiles8")
- Dim patch9 As String = Update.Configs("UPDATE").Get("PatchFiles9")
- Dim patch10 As String = Update.Configs("UPDATE").Get("PatchFiles10")
- Dim pstatus1 As String = Update.Configs("UPDATE").Get("Patch1")
- Dim pstatus2 As String = Update.Configs("UPDATE").Get("Patch2")
- Dim pstatus3 As String = Update.Configs("UPDATE").Get("Patch3")
- Dim pstatus4 As String = Update.Configs("UPDATE").Get("Patch4")
- Dim pstatus5 As String = Update.Configs("UPDATE").Get("Patch5")
- Dim pstatus6 As String = Update.Configs("UPDATE").Get("Patch6")
- Dim pstatus7 As String = Update.Configs("UPDATE").Get("Patch7")
- Dim pstatus8 As String = Update.Configs("UPDATE").Get("Patch8")
- Dim pstatus9 As String = Update.Configs("UPDATE").Get("Patch9")
- Dim pstatus10 As String = Update.Configs("UPDATE").Get("Patch10")
- Dim extention1 As String = Update.Configs("UPDATE").Get("Patch1Extention")
- Dim extention2 As String = Update.Configs("UPDATE").Get("Patch2Extention")
- Dim extention3 As String = Update.Configs("UPDATE").Get("Patch3Extention")
- Dim extention4 As String = Update.Configs("UPDATE").Get("Patch4Extention")
- Dim extention5 As String = Update.Configs("UPDATE").Get("Patch5Extention")
- Dim extention6 As String = Update.Configs("UPDATE").Get("Patch6Extention")
- Dim extention7 As String = Update.Configs("UPDATE").Get("Patch7Extention")
- Dim extention8 As String = Update.Configs("UPDATE").Get("Patch8Extention")
- Dim extention9 As String = Update.Configs("UPDATE").Get("Patch9Extention")
- Dim extention10 As String = Update.Configs("UPDATE").Get("Patch10Extention")
- If pstatus1 = "Enabled" Then
- Label1.Text = "Downloading Patch..."
- ProgressBar1.Value = 0
- If System.IO.File.Exists(p + extention1) = True Then
- System.IO.File.Delete(p + extention1)
- End If
- My.Computer.Network.DownloadFile _
- (patch1, _
- p + extention1)
- If rev1 > rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u3, _
- p + "update.ini")
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 20
- Label2.Text = "20%"
- Label1.Text = "Patching Complete"
- 'Update rev.
- Update.Configs("REV").Set("Old", rev1)
- ' Save the INI file
- Update.Save()
- 'Double Check
- If rev1 > rev2 Then
- MsgBox("Error updating revisions")
- End If
- End If
- ElseIf pstatus2 = "Enabled" Then
- ProgressBar1.Value = 0
- Label1.Text = "Downloading Patch..."
- If System.IO.File.Exists(p + extention2) = True Then
- System.IO.File.Delete(p + extention2)
- End If
- My.Computer.Network.DownloadFile _
- (patch2, _
- p + extention2)
- If rev1 > rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u3, _
- p + "update.ini")
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 30
- Label2.Text = "30%"
- Label1.Text = "Patching Complete"
- 'Update rev.
- Update.Configs("REV").Set("Old", rev1)
- ' Save the INI file
- Update.Save()
- 'Double Check
- If rev1 > rev2 Then
- MsgBox("Error updating revisions")
- End If
- End If
- ElseIf pstatus3 = "Enabled" Then
- Label1.Text = "Downloading Patch..."
- ProgressBar1.Value = 0
- If System.IO.File.Exists(p + extention3) = True Then
- System.IO.File.Delete(p + extention3)
- End If
- My.Computer.Network.DownloadFile _
- (patch3, _
- p + extention3)
- If rev1 > rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u3, _
- p + "update.ini")
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 40
- Label2.Text = "40%"
- Label1.Text = "Patching Complete"
- 'Update rev.
- Update.Configs("REV").Set("Old", rev1)
- ' Save the INI file
- Update.Save()
- 'Double Check
- If rev1 > rev2 Then
- MsgBox("Error updating revisions")
- End If
- End If
- ElseIf pstatus4 = "Enabled" Then
- ProgressBar1.Value = 0
- Label1.Text = "Downloading Patch..."
- If System.IO.File.Exists(p + extention4) = True Then
- System.IO.File.Delete(p + extention4)
- End If
- My.Computer.Network.DownloadFile _
- (patch4, _
- p + extention4)
- If rev1 > rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u3, _
- p + "update.ini")
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 50
- Label2.Text = "50%"
- Label1.Text = "Patching Complete"
- 'Update rev.
- Update.Configs("REV").Set("Old", rev1)
- ' Save the INI file
- Update.Save()
- 'Double Check
- If rev1 > rev2 Then
- MsgBox("Error updating revisions")
- End If
- End If
- ElseIf pstatus5 = "Enabled" Then
- ProgressBar1.Value = 0
- Label1.Text = "Downloading Patch..."
- If System.IO.File.Exists(p + extention5) = True Then
- System.IO.File.Delete(p + extention5)
- End If
- My.Computer.Network.DownloadFile _
- (patch5, _
- p + extention5)
- If rev1 > rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u3, _
- p + "update.ini")
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 60
- Label2.Text = "60%"
- Label1.Text = "Patching Complete"
- 'Update rev.
- Update.Configs("REV").Set("Old", rev1)
- ' Save the INI file
- Update.Save()
- 'Double Check
- If rev1 > rev2 Then
- MsgBox("Error updating revisions")
- End If
- End If
- ElseIf pstatus6 = "Enabled" Then
- ProgressBar1.Value = 0
- Label1.Text = "Downloading Patch..."
- If System.IO.File.Exists(p + extention6) = True Then
- System.IO.File.Delete(p + extention6)
- End If
- My.Computer.Network.DownloadFile _
- (patch6, _
- p + extention6)
- If rev1 > rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u3, _
- p + "update.ini")
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 70
- Label2.Text = "70%"
- Label1.Text = "Patching Complete"
- 'Update rev.
- Update.Configs("REV").Set("Old", rev1)
- ' Save the INI file
- Update.Save()
- 'Double Check
- If rev1 > rev2 Then
- MsgBox("Error updating revisions")
- End If
- End If
- ElseIf pstatus7 = "Enabled" Then
- ProgressBar1.Value = 0
- Label1.Text = "Downloading Patch..."
- If System.IO.File.Exists(p + extention7) = True Then
- System.IO.File.Delete(p + extention7)
- End If
- My.Computer.Network.DownloadFile _
- (patch7, _
- p + extention7)
- If rev1 > rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u3, _
- p + "update.ini")
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 80
- Label2.Text = "80%"
- Label1.Text = "Patching Complete"
- 'Update rev.
- Update.Configs("REV").Set("Old", rev1)
- ' Save the INI file
- Update.Save()
- 'Double Check
- If rev1 > rev2 Then
- MsgBox("Error updating revisions")
- End If
- End If
- ElseIf pstatus8 = "Enabled" Then
- ProgressBar1.Value = 0
- Label1.Text = "Downloading Patch..."
- If System.IO.File.Exists(p + extention8) = True Then
- System.IO.File.Delete(p + extention8)
- End If
- My.Computer.Network.DownloadFile _
- (patch8, _
- p + extention8)
- If rev1 > rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u3, _
- p + "update.ini")
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 90
- Label2.Text = "90%"
- Label1.Text = "Patching Complete"
- 'Update rev.
- Update.Configs("REV").Set("Old", rev1)
- ' Save the INI file
- Update.Save()
- 'Double Check
- If rev1 > rev2 Then
- MsgBox("Error updating revisions")
- End If
- End If
- ElseIf pstatus9 = "Enabled" Then
- ProgressBar1.Value = 0
- Label1.Text = "Downloading Patch..."
- If System.IO.File.Exists(p + extention9) = True Then
- System.IO.File.Delete(p + extention9)
- End If
- My.Computer.Network.DownloadFile _
- (patch9, _
- p + extention9)
- If rev1 > rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u3, _
- p + "update.ini")
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 95
- Label2.Text = "95%"
- Label1.Text = "Patching Complete"
- 'Update rev.
- Update.Configs("REV").Set("Old", rev1)
- ' Save the INI file
- Update.Save()
- 'Double Check
- If rev1 > rev2 Then
- MsgBox("Error updating revisions")
- End If
- ElseIf pstatus10 = "Enabled" Then
- ProgressBar1.Value = 0
- Label1.Text = "Downloading Patch..."
- If System.IO.File.Exists(p + extention10) = True Then
- System.IO.File.Delete(p + extention10)
- End If
- My.Computer.Network.DownloadFile _
- (patch10, _
- p + extention10)
- If rev1 > rev2 Then
- If System.IO.File.Exists(p + "update.ini") = True Then
- System.IO.File.Delete(p + "update.ini")
- End If
- My.Computer.Network.DownloadFile _
- (u3, _
- p + "update.ini")
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 100
- Label2.Text = "100%"
- Label1.Text = "Patching Complete"
- 'Update rev.
- Update.Configs("REV").Set("Old", rev1)
- ' Save the INI file
- Update.Save()
- 'Double Check
- If rev1 > rev2 Then
- MsgBox("Error updating revisions")
- End If
- Else
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 100
- Label2.Text = "100%"
- Label1.Text = "Patching Complete"
- End If
- End If
- End If
- 'Update the progress
- ProgressBar1.Value = 100
- ProgressBar2.Value = 100
- Label2.Text = "100%"
- Label1.Text = "Patching Complete"
- Dim newupdate As New IniConfigSource("Update.ini")
- 'Update rev.
- newupdate.Configs("REV").Set("Old", rev1)
- ' Save the INI file
- newupdate.Save()
- 'Setting Images
- 'Background
- Dim client1 As New System.Net.WebClient()
- Dim stream1 As New System.IO.MemoryStream()
- Dim data1 As Byte() = client1.DownloadData(background)
- client1.Dispose()
- stream1.Write(data1, 0, data1.Length)
- Me.BackgroundImage = Image.FromStream(stream1)
- 'Play Buttons
- Dim client2 As New System.Net.WebClient()
- Dim stream2 As New System.IO.MemoryStream()
- Dim data2 As Byte() = client2.DownloadData(play1)
- client2.Dispose()
- stream2.Write(data2, 0, data2.Length)
- PictureBox4.Image = Image.FromStream(stream2)
- 'Website Buttons
- Dim client4 As New System.Net.WebClient()
- Dim stream4 As New System.IO.MemoryStream()
- Dim data4 As Byte() = client4.DownloadData(website1)
- client4.Dispose()
- stream4.Write(data4, 0, data4.Length)
- PictureBox2.Image = Image.FromStream(stream4)
- 'Forum Buttons
- Dim client6 As New System.Net.WebClient()
- Dim stream6 As New System.IO.MemoryStream()
- Dim data6 As Byte() = client6.DownloadData(forums)
- client6.Dispose()
- stream6.Write(data6, 0, data6.Length)
- PictureBox3.Image = Image.FromStream(stream6)
- 'Close Buttons
- Dim client8 As New System.Net.WebClient()
- Dim stream8 As New System.IO.MemoryStream()
- Dim data8 As Byte() = client8.DownloadData(close1)
- client8.Dispose()
- stream8.Write(data8, 0, data8.Length)
- PictureBox1.Image = Image.FromStream(stream8)
- 'Setting Positions
- 'Play Button
- PictureBox4.Location = New Point(playx, playy)
- 'Website Button
- PictureBox2.Location = New Point(websitex, websitey)
- 'Forum Button
- PictureBox3.Location = New Point(forumsx, forumsy)
- 'Close Button
- PictureBox1.Location = New Point(closex, closey)
- 'Webbrowser
- WebBrowser1.Location = New Point(webbrowserx, webbrowsery)
- 'Progressbar1
- ProgressBar1.Location = New Point(progressbar1x, progressbar1y)
- 'Progressbar2
- ProgressBar2.Location = New Point(progressbar2x, progressbar2y)
- 'Label1
- Label1.Location = New Point(label1x, label1y)
- 'Label2
- Label2.Location = New Point(label2x, label2y)
- 'Setting Sizes
- 'Website Button
- PictureBox2.Size = New Size(webwidth, webheight)
- 'Forums Button
- PictureBox3.Size = New Size(forumwidth, forumsheight)
- 'Play Button
- PictureBox4.Size = New Size(playwidth, playheight)
- 'Webbrowser
- WebBrowser1.Size = New Size(browserwidth, browserheight)
- 'Form
- Me.Size = New Size(basewidth, baseheight)
- 'Close Button
- PictureBox1.Size = New Size(closewidth, closeheight)
- 'Progressbar1
- ProgressBar1.Size = New Size(pb1width, pb1height)
- 'Progressbar2
- ProgressBar2.Size = New Size(pb2width, pb2height)
- 'Setting News
- WebBrowser1.Navigate(newslink)
- End Sub
- 'Close Button Click
- Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
- Me.Close()
- End Sub
- 'Close Button Mouse Hover
- Private Sub PictureBox1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseHover
- 'Ini information for the picture
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- Dim close2 As String = poke.Configs("IMAGES").Get("Close2")
- Dim client10 As New System.Net.WebClient()
- Dim stream10 As New System.IO.MemoryStream()
- Dim data10 As Byte() = client10.DownloadData(close2)
- client10.Dispose()
- stream10.Write(data10, 0, data10.Length)
- PictureBox1.Image = Image.FromStream(stream10)
- End Sub
- 'Close Button Mouse Leave
- Private Sub PictureBox1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseLeave
- 'Ini information for the picture
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- Dim close1 As String = poke.Configs("IMAGES").Get("Close")
- Dim client11 As New System.Net.WebClient()
- Dim stream11 As New System.IO.MemoryStream()
- Dim data11 As Byte() = client11.DownloadData(close1)
- client11.Dispose()
- stream11.Write(data11, 0, data11.Length)
- PictureBox1.Image = Image.FromStream(stream11)
- End Sub
- 'Website Button Click
- Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox2.Click
- 'Ini information for the link
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- Dim weblink As String = poke.Configs("LINKS").Get("Website")
- 'Opens the default webbrowser
- Process.Start(weblink)
- End Sub
- 'Website Button Mouse Hover
- Private Sub PictureBox2_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox2.MouseHover
- 'Ini information for the picture
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- Dim website2 As String = poke.Configs("IMAGES").Get("Website2")
- Dim client12 As New System.Net.WebClient()
- Dim stream12 As New System.IO.MemoryStream()
- Dim data12 As Byte() = client12.DownloadData(website2)
- client12.Dispose()
- stream12.Write(data12, 0, data12.Length)
- PictureBox2.Image = Image.FromStream(stream12)
- End Sub
- 'Website Button Mouse Leave
- Private Sub PictureBox2_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox2.MouseLeave
- 'Ini information for the picture
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- Dim website1 As String = poke.Configs("IMAGES").Get("Website")
- Dim client13 As New System.Net.WebClient()
- Dim stream13 As New System.IO.MemoryStream()
- Dim data13 As Byte() = client13.DownloadData(website1)
- client13.Dispose()
- stream13.Write(data13, 0, data13.Length)
- PictureBox2.Image = Image.FromStream(stream13)
- End Sub
- 'Forums Button Click
- Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox3.Click
- 'Ini information for the link
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- Dim forumlink As String = poke.Configs("LINKS").Get("Forums")
- 'Opens the default webbrowser
- Process.Start(forumlink)
- End Sub
- 'Forums Button Hover
- Private Sub PictureBox3_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox3.MouseHover
- 'Ini information for the picture
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- Dim forums2 As String = poke.Configs("IMAGES").Get("Forums2")
- Dim client14 As New System.Net.WebClient()
- Dim stream14 As New System.IO.MemoryStream()
- Dim data14 As Byte() = client14.DownloadData(forums2)
- client14.Dispose()
- stream14.Write(data14, 0, data14.Length)
- PictureBox3.Image = Image.FromStream(stream14)
- End Sub
- 'Forums Button Leave
- Private Sub PictureBox3_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox3.MouseLeave
- 'Ini information for the picture
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- Dim forums1 As String = poke.Configs("IMAGES").Get("Forums")
- Dim client15 As New System.Net.WebClient()
- Dim stream15 As New System.IO.MemoryStream()
- Dim data15 As Byte() = client15.DownloadData(forums1)
- client15.Dispose()
- stream15.Write(data15, 0, data15.Length)
- PictureBox3.Image = Image.FromStream(stream15)
- End Sub
- 'Play Button Click
- Private Sub PictureBox4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox4.Click
- 'Ini information for the shell
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- Dim jshell As String = poke.Configs("MISC").Get("Shell")
- Shell(jshell)
- End Sub
- 'Play Button Hover
- Private Sub PictureBox4_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox4.MouseHover
- 'Ini information for the picture
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- Dim play2 As String = poke.Configs("IMAGES").Get("Play2")
- Dim client16 As New System.Net.WebClient()
- Dim stream16 As New System.IO.MemoryStream()
- Dim data16 As Byte() = client16.DownloadData(play2)
- client16.Dispose()
- stream16.Write(data16, 0, data16.Length)
- PictureBox4.Image = Image.FromStream(stream16)
- End Sub
- 'Play Button Leave
- Private Sub PictureBox4_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox4.MouseLeave
- 'Ini information for the picture
- 'Getting config info
- Dim poke As New IniConfigSource("pokenet.ini")
- Dim play1 As String = poke.Configs("IMAGES").Get("Play")
- Dim client17 As New System.Net.WebClient()
- Dim stream17 As New System.IO.MemoryStream()
- Dim data17 As Byte() = client17.DownloadData(play1)
- client17.Dispose()
- stream17.Write(data17, 0, data17.Length)
- PictureBox4.Image = Image.FromStream(stream17)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement