1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
| Private Sub ReceivedText(ByVal [text] As String)
If Me.TextBox6.InvokeRequired Then
Dim x As New SetTextCallback(AddressOf ReceivedText)
Me.Invoke(x, New Object() {(text)})
End If
data &= [text]
If InStr(data, "Data not received") Then
data = ""
TextBox6.Text = "Data lost" + vbNewLine
End If
If InStr(data, "Lab Location: S.429") Then
If InStr(data, "Temperatur Value") Then
If InStr(data, "Humidity Value") Then
If InStr(data, "Luminosity Value") Then
txt1 = 1
txt2 = 0
txt3 = 0
txt4 = 0
txt5 = 0
data2 = data
End If
End If
End If
End If
If InStr(data, "Lab Location: S.434") Then
If InStr(data, "Temperature Value") Then
If InStr(data, "Humidity Value") Then
If InStr(data, "Luminosity Value") Then
txt2 = 1
txt1 = 0
txt3 = 0
txt4 = 0
txt5 = 0
data2 = data
End If
End If
End If
End If
If InStr(data, "Lab Location: S.439") Then
If InStr(data, "Temperature Value") Then
If InStr(data, "Humidity Value") Then
If InStr(data, "Luminosity Value") Then
txt3 = 1
txt1 = 0
txt2 = 0
txt4 = 0
txt5 = 0
data2 = data
End If
End If
End If
End If
If InStr(data, "Lab Location: S.449") Then
If InStr(data, "Temperature Value") Then
If InStr(data, "Humidity Value") Then
If InStr(data, "Luminosity Value") Then
txt4 = 1
txt1 = 0
txt2 = 0
txt3 = 0
txt5 = 0
data2 = data
End If
End If
End If
End If
If InStr(data, "Lab Location: S.368") Then
If InStr(data, "Temperature Value") Then
If InStr(data, "Humidity Value") Then
If InStr(data, "Luminosity Value") Then
txt5 = 1
txt1 = 0
txt2 = 0
txt3 = 0
txt4 = 0
data2 = data
End If
End If
End If
End If
If InStr(LuminosityValue, "Luminosity Value") > 1 Then
PictureBox2.Image = System.Drawing.Bitmap.FromFile("C:\Users\wdl1\Desktop\Project Example\Development of SMART Lab\SMART Lab\GUI\GUI\My Project\S.439_ON.JPG")
ElseIf InStr(LuminosityValue, "Luminosity Value") < 1 Then
PictureBox2.Image = System.Drawing.Bitmap.FromFile("C:\Users\wdl1\Desktop\Project Example\Development of SMART Lab\SMART Lab\GUI\GUI\My Project\S.439_OFF.JPG")
End If |