1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
Private Sub Timer10_Tick(sender As Object, e As EventArgs) Handles Timer10.Tick
If client.Available > 0 Then
Dim t(client.Available - 1) As Byte
data.Read(t, 0, t.Length)
Dim typeD As String = System.Text.UTF7Encoding.UTF7.GetString(t)
TextBox32.Text = typeD
If typeD = "Rue" Then
Dim temp() As Byte = UTF7.GetBytes(ordre1 & vbCrLf)
data.Write(temp, 0, temp.Length)
TextBox32.Text = TextBox32.Text & " - " & ordre1
ElseIf typeD = "Ruelle" Then
Dim temp() As Byte = UTF7.GetBytes(ordre2 & vbCrLf)
data.Write(temp, 0, temp.Length)
TextBox32.Text = TextBox32.Text & " - " & ordre2
Else
MsgBox("Pas d'ordre transmis")
End If
End If
End Sub |