Type TextAtCoord(Name As String, Text As String, X As Float, Y As Float, W As Float, H As Float)
' ...
DocImageTexts.Initialize
For Each k As String In DocRapEngMap.Keys
Dim TextPart() As String = Regex.Split("~", LookupADefault(sqlActiveDb, $"SELECT dval1||'~'||dval2 FROM motordoc WHERE poskey='${k}'"$, "0~nil"))
Dim tc As TextAtCoord
tc.Initialize
tc.Name = k
tc.Text = Starter.loc.Localize(TextPart(1))
' --> https://www.mobilefish.com/services/record_mouse_coordinates/record_mouse_coordinates.php
Dim PixRefValue As Int = 610 ' x,y values for Image 610x610pix
Select Case TextPart(0).Replace(".0", "")
Case 0
DocImageTexts.Put("k0", tc)
Case 1
tc.X = 10 /PixRefValue
tc.Y = 153 /PixRefValue
tc.W = 160 /PixRefValue
tc.H = 68 /PixRefValue
DocImageTexts.Put("k1", tc)
Case 2
tc.X = 414 /PixRefValue
tc.Y = 110 /PixRefValue
tc.W = 200 /PixRefValue
tc.H = 36 /PixRefValue
DocImageTexts.Put("k2", tc)
Case 3
tc.X = 333 /PixRefValue
tc.Y = 51 /PixRefValue
tc.W = 277 /PixRefValue
tc.H = 36 /PixRefValue
DocImageTexts.Put("k3", tc)
Case 4
tc.X = 218 /PixRefValue
tc.Y = 7 /PixRefValue
tc.W = 390 /PixRefValue
tc.H = 36 /PixRefValue
DocImageTexts.Put("k4", tc)
Case 5
tc.X = 477 /PixRefValue
tc.Y = 196 /PixRefValue
tc.W = 135 /PixRefValue
tc.H = 112 /PixRefValue
DocImageTexts.Put("k5", tc)
Case 6
tc.X = 418 /PixRefValue
tc.Y = 426 /PixRefValue
tc.W = 194 /PixRefValue
tc.H = 68 /PixRefValue
DocImageTexts.Put("k6", tc)
End Select
Next
'...
For Each v As View In c0tab4BackPanel.GetAllViewsRecursive
If v Is Label Then
Dim labelX As Label = v
If labelX.Tag & "!" <> "!" Then
Dim tc As TextAtCoord = Starter.md.DocImageTexts.Get("k" & labelX.Tag)
If tc <> Null Then
labelX.Text = tc.Text
labelX.Left = c0tab4ImageView1.Left + tc.X * c0tab4ImageView1.Width
labelX.Top = c0tab4ImageView1.Top + tc.Y * c0tab4ImageView1.Width
labelX.Width = tc.W * c0tab4ImageView1.Width
labelX.Height = tc.H * c0tab4ImageView1.Width
labelX.TextSize = 12
labelX.Tag = tc
End If
End If
End If
Next
'....