Public ReadOnly Property Data() As String
Get
Return ReqState.Data.ToString
End Get
End Property
Case ReqEvent.SE_COMPLETED
ParseHtml(wr.Data)
wr = Nothing
Private Sub ParseHtml(ByVal inputString As String)
'MsgBox(inputString)
Dim r As System.Text.RegularExpressions.Regex
Dim m As System.Text.RegularExpressions.Match
Try
r = New Regex("go=([0-9a-z\.]*[0-9a-z\.]*)"">([a-zа-я\s]*)....(\(звуки\))*", RegexOptions.IgnoreCase Or RegexOptions.Compiled)
m = r.Match(inputString)
While m.Success
ColuminsAddItem(2, m.Groups(2).Value & " " & m.Groups(3).Value, m.Groups(1).Value)
m = m.NextMatch()
End While
Catch ex As ArgumentException
End Try
Public Sub ColuminsAddItem(ByVal Columin As Integer, ByVal LinkText As String, ByVal LinkTag As String)
'Добавление элемента в колоны
' Create a new Label
Dim x As New LinkLabel
x.Tag = LinkTag
x.Text = LinkText
x.ActiveLinkColor = System.Drawing.Color.GhostWhite
x.AutoSize = True
AddHandler x.MouseEnter, AddressOf AllLinks_MouseEnter
AddHandler x.MouseLeave, AddressOf AllLinks_MouseLeave
'Аргумент "Колонка"
Select Case Columin
Case 0
'Пользователи и NPC
x.Name = "UsersLabel" + UsersControlCount.ToString()
x.Location = UsersLocation
pnlUsers.Controls.Add(x)
UsersLocation.Y += 24
AddHandler x.Click, AddressOf UsersLinkHandler_LinkClicked
UsersControlCount += 1
'Предметы (в т.ч. с трупа)
Case 1
x.Name = "ItemsLabel" + ItemsControlCount.ToString()
x.Location = ItemsLocation
pnlItems.Controls.Add(x)
AddHandler x.Click, AddressOf ItemsLinkHandler_LinkClicked
ItemsLocation.Y += 24
ItemsControlCount += 1
'Локации
Case 2
x.Name = "LocationsLabel" + LocationsControlCount.ToString()
x.Location = LocationsLocation
pnlLocations.Controls.Add(x)
AddHandler x.Click, AddressOf LocationsLinkHandler_LinkClicked
LocationsLocation.Y += 24
LocationsControlCount += 1
'Трупы
Case 3
x.Name = "TrupsLabel" + TrupsControlCount.ToString()
x.Location = TrupsLocation
pnlTrups.Controls.Add(x)
AddHandler x.Click, AddressOf TrupsLinkHandler_LinkClicked
TrupsLocation.Y += 24
TrupsControlCount += 1
End Select
Private UsersControlCount, ItemsControlCount, LocationsControlCount, TrupsControlCount As Integer
Private UsersLocation, ItemsLocation, LocationsLocation, TrupsLocation As System.Drawing.Point
Controls created on one thread cannot be parented to a control on a different thread.
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 45