14-10-17, 07:27 PM
أخد الخلول لتنفيذ ما تريده هو الفكرة التالية:
أفترض أنك تستطيع أن تقرأ جميع التكست من الداتا بيز و تستطيع تحويلها الي مصفوفة String
هنا عليك ان تجمع حميع التكست في المصفوفة و تقوم بتحويلها الي تكست واحد كالتالي
المتغير textToAnimate يمثل التكست الذي يجب عرضه في شريط الأخبار
أفترض أنك تستطيع أن تقرأ جميع التكست من الداتا بيز و تستطيع تحويلها الي مصفوفة String
هنا عليك ان تجمع حميع التكست في المصفوفة و تقوم بتحويلها الي تكست واحد كالتالي
PHP كود :
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim list As String() = New String() {"visual basic", "visual C#", "visual C++"}
Dim indent As String = " "
Dim func As Func(Of String, String) = Function(s) indent + s + indent
Dim textToAnimate As String = String.Empty
Dim i As Integer = 0
While i < list.Length
Dim toIndnet As String = list(i)
If TryIndent(func) Then
textToAnimate += func(toIndnet)
End If
i += 1
End While
End Sub
Private Function TryIndent(func As Func(Of String, String)) As Boolean
Dim source As String = Nothing
Return TryIndent(source, func)
End Function
Private Function TryIndent(ByRef source As String, func As Func(Of String, String)) As Boolean
While func IsNot Nothing
Dim src As String = source
Dim dest As String = func(src)
If src = dest Then
Exit While
End If
If src <> dest Then
Return True
End If
End While
Return False
End Function
End Class
المتغير textToAnimate يمثل التكست الذي يجب عرضه في شريط الأخبار
Retired

