Advertisement
Guest User

Untitled

a guest
Jan 28th, 2015
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.59 KB | None | 0 0
  1. Public Sub getClanLogo()
  2.         Try
  3.             Dim httpContent = New System.Net.WebClient().DownloadString("http://www.wa-sta.net/clan/profile/" & API.apireader.data.clan.id)
  4.             Dim MUSTER As New Regex("<div[^<>]*class=""service-wrapper""[^<>]*>(?<content>.*?)</div>") ' MUSTER FÜR ALLE <DIV> .. </DIV>-BLÖCKE")
  5.             Dim DIVTREFFER As MatchCollection = MUSTER.Matches(httpContent) ' <DIV> .. </DIV>-BLÖCKE FINDEN
  6.  
  7.             For Each TREFFER1 As Match In DIVTREFFER        ' DIE TREFFERLISTE DURCHLAUFEN UND ...
  8.                 clanlogo = TREFFER1.ToString  ' ... TREFFER EINZELN AUSGEBEN
  9.                 clanlogo = clanlogo.Substring(96)
  10.                 st = clanlogo.Split(Chr(34))
  11.                 clanlogo = st(0)
  12.                 st2 = clanlogo.Split(CChar(","))
  13.                 clanlogo = st2(1)
  14.                 Dim ms As New System.IO.MemoryStream(Convert.FromBase64String(clanlogo))
  15.                 Dim bmp As New Bitmap(ms)
  16.                 PictureBox2.Image = bmp
  17.  
  18.                 Dim sTooltip1 As SuperToolTip = New SuperToolTip
  19.                 Dim item1 As ToolTipItem = New ToolTipItem
  20.                 Dim item2 As ToolTipTitleItem = New ToolTipTitleItem
  21.                 item1.Image = ResizeImage(bmp, 0.5, 0.5, InterpolationMode.High)
  22.                 item2.Text = API.apireader.data.clan.name
  23.                 sTooltip1.Items.Add(item1)
  24.                 sTooltip1.Items.Add(item2)
  25.                 BarStaticItem2.SuperTip = sTooltip1
  26.                 haslogo = True
  27.                 Exit For
  28.             Next
  29.  
  30.         Catch ex As Exception
  31.  
  32.         End Try
  33.  
  34.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement