Commit 88bd6cd6 authored by Michael Alexander's avatar Michael Alexander
Browse files

tradebox done

parent 4e8f8fd4
......@@ -34,133 +34,31 @@ Partial Class Tradebox
'
'TradeboxPanel
'
Me.TradeboxPanel.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.TradeboxPanel.AutoScroll = True
Me.TradeboxPanel.AutoSize = True
Me.TradeboxPanel.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.[Single]
Me.TradeboxPanel.ColumnCount = 5
Me.TradeboxPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.52083!))
Me.TradeboxPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 49.47917!))
Me.TradeboxPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 99.0!))
Me.TradeboxPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 113.0!))
Me.TradeboxPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 170.0!))
Me.TradeboxPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 125.0!))
Me.TradeboxPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 75.0!))
Me.TradeboxPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 125.0!))
Me.TradeboxPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 75.0!))
Me.TradeboxPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 75.0!))
Me.TradeboxPanel.Controls.Add(Me.Label5, 4, 0)
Me.TradeboxPanel.Controls.Add(Me.Label4, 3, 0)
Me.TradeboxPanel.Controls.Add(Me.Label3, 2, 0)
Me.TradeboxPanel.Controls.Add(Me.Label2, 1, 0)
Me.TradeboxPanel.Controls.Add(Me.Label1, 0, 0)
Me.TradeboxPanel.Location = New System.Drawing.Point(12, 12)
Me.TradeboxPanel.MaximumSize = New System.Drawing.Size(560, 450)
Me.TradeboxPanel.Name = "TradeboxPanel"
Me.TradeboxPanel.RowCount = 1
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
Me.TradeboxPanel.Size = New System.Drawing.Size(560, 30)
Me.TradeboxPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30.0!))
Me.TradeboxPanel.Size = New System.Drawing.Size(573, 34)
Me.TradeboxPanel.TabIndex = 0
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(391, 1)
Me.Label5.Location = New System.Drawing.Point(408, 1)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(23, 13)
Me.Label5.TabIndex = 6
......@@ -169,16 +67,16 @@ Partial Class Tradebox
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(277, 1)
Me.Label4.Location = New System.Drawing.Point(332, 1)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(99, 13)
Me.Label4.Size = New System.Drawing.Size(59, 26)
Me.Label4.TabIndex = 4
Me.Label4.Text = "Number Demanded"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(177, 1)
Me.Label3.Location = New System.Drawing.Point(206, 1)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(82, 13)
Me.Label3.TabIndex = 3
......@@ -187,7 +85,7 @@ Partial Class Tradebox
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(91, 1)
Me.Label2.Location = New System.Drawing.Point(130, 1)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(47, 26)
Me.Label2.TabIndex = 1
......
......@@ -19,20 +19,148 @@ Public Class Tradebox
Dim recvjson As New TradeboxJSONRecv
recvjson = JsonConvert.DeserializeObject(Of TradeboxJSONRecv)(recv)
MsgBox(recv)
If (recvjson.status = "ok") Then
TradeboxPanel.RowCount += recvjson.Offers.Length
TradeboxPanel.RowStyles.Add(New RowStyle(SizeType.Absolute, 20))
For i As Integer = 0 To recvjson.Offers.Length - 1
TradeboxPanel.RowCount += 1
TradeboxPanel.RowStyles.Add(New RowStyle(SizeType.Absolute, 125.0F))
'kol 1
Dim PicBox As New PictureBox
Select Case recvjson.Offers(i)(0)
Case 0
PicBox.Image = My.Resources.Honey
Case 1
PicBox.Image = My.Resources.Herbs
Case 2
PicBox.Image = My.Resources.Clay
Case 3
PicBox.Image = My.Resources.Mineral
Case 4
PicBox.Image = My.Resources.Potion
Case 5
PicBox.Image = My.Resources.Incense
Case 6
PicBox.Image = My.Resources.Gems
Case 7
PicBox.Image = My.Resources.LifeElixir
Case 8
PicBox.Image = My.Resources.ManaCrystal
Case 9
PicBox.Image = My.Resources.PhilosopherStone
End Select
PicBox.Height = 125
PicBox.Width = 125
PicBox.SizeMode = PictureBoxSizeMode.StretchImage
TradeboxPanel.Controls.Add(PicBox, 0, i + 1)
'kol 2
Dim NumOfferedLabel As New Label
NumOfferedLabel.Text = recvjson.Offers(i)(1)
TradeboxPanel.Controls.Add(NumOfferedLabel, 1, i + 1)
For i As Integer = 0 To recvjson.Offers.Length
Dim PicBox As New PictureBox
TradeboxPanel.Controls.Add(PicBox, 0, i + 1)
'kol 3
Dim PicBox2 As New PictureBox
Select Case recvjson.Offers(i)(2)
Case 0
PicBox2.Image = My.Resources.Honey
Case 1
PicBox2.Image = My.Resources.Herbs
Case 2
PicBox2.Image = My.Resources.Clay
Case 3
PicBox2.Image = My.Resources.Mineral
Case 4
PicBox2.Image = My.Resources.Potion
Case 5
PicBox2.Image = My.Resources.Incense
Case 6
PicBox2.Image = My.Resources.Gems
Case 7
PicBox2.Image = My.Resources.LifeElixir
Case 8
PicBox2.Image = My.Resources.ManaCrystal
Case 9
PicBox2.Image = My.Resources.PhilosopherStone
End Select
PicBox2.Height = 125
PicBox2.Width = 125
PicBox2.SizeMode = PictureBoxSizeMode.StretchImage
TradeboxPanel.Controls.Add(PicBox2, 2, i + 1)
'kol 4
Dim NumDemandedLabel As New Label
NumDemandedLabel.Text = recvjson.Offers(i)(3)
TradeboxPanel.Controls.Add(NumDemandedLabel, 3, i + 1)
'kol 5
Dim Btn As New Button
Btn.Width = 100
Btn.Height = 30
If recvjson.Offers(i)(4) = False Then
Btn.Text = "Cancel Offer"
AddHandler Btn.Click, AddressOf CancelOffer
Else
Btn.Text = "Fetch Offer"
AddHandler Btn.Click, AddressOf Fetch
End If
Btn.Tag = recvjson.Offers(i)(5)
Btn.Visible = True
TradeboxPanel.Controls.Add(Btn, 4, i + 1)
Next
Else
MsgBox("Unknown error occured!")
End If
End Sub
Private Sub Fetch(ByVal Sendr As Object, ByVal e As EventArgs)
Dim Btn As Button
Btn = CType(Sendr, Button)
GlobalVariables.NETWORK = New NetIO
Dim request As New FetchItemJSONSend
Dim recv As String
request.offer_token = Btn.Tag
recv = NETWORK.SendRecv(request)
Dim recvjson As New FetchItemJSONRecv
recvjson = JsonConvert.DeserializeObject(Of FetchItemJSONRecv)(recv)
If (recvjson.status = "ok") Then
MsgBox("Item fetched!")
Me.Close()
ElseIf (recvjson.status = "fail") Then
MsgBox(recvjson.description)
Else
MsgBox("Unknown error occured!")
End If
End Sub
Private Sub CancelOffer(ByVal Sendr As Object, ByVal e As EventArgs)
Dim Btn As Button
Btn = CType(Sendr, Button)
GlobalVariables.NETWORK = New NetIO
Dim request As New CancelOfferJSONSend
Dim recv As String
request.offer_token = Btn.Tag
recv = NETWORK.SendRecv(request)
Dim recvjson As New CancelOfferJSONRecv
recvjson = JsonConvert.DeserializeObject(Of CancelOfferJSONRecv)(recv)
If (recvjson.status = "ok") Then
MsgBox("Offer cancelled!")
Me.Close()
ElseIf (recvjson.status = "fail") Then
MsgBox(recvjson.description)
Else
MsgBox("Unknown error occured!")
End If
End Sub
End Class
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment