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
| Public Sub trierBlocsWithContent(ByVal obj As Object)
Dim vTimeline As New TimeLine
vTimeline.TrieBloc()
vTimeline = CType(obj, TimeLine)
If Me.InvokeRequired Then
Me.Invoke(New MethodInvoker(AddressOf trierBlocsWithContent), vTimeline)
Else
Dim uc As UserControl1
uc = Me.Controls("uc" & vTimeline.ZoneID.ToString())
For i As Integer = 0 To vTimeline.Array_Bloc.Count - 1
Dim c_bloc As Bloc = CType(vTimeline.Array_Bloc.Item(i), Bloc)
If d_bloc.AddSeconds(CType(vTimeline.Array_Bloc.Item(i), Bloc).BlocDuration) >= Now Then
CType(vTimeline.Array_Bloc(i), Bloc).TrieContent()
For Each item As Content In CType(vTimeline.Array_Bloc(i), Bloc).Array_Content
uc.playContent(BinPath & item.MediaURL)
uc.SetBounds(uc.Location.X, uc.Location.Y, uc.Width, uc.Height, BoundsSpecified.All)
Thread.Sleep(1000) 'pause pendant la durée du media
d_content = d_content.AddSeconds(item.contentDuration)
Next
End If
d_bloc = d_bloc.AddSeconds(CType(vTimeline.Array_Bloc.Item(i), Bloc).BlocDuration)
Next
End If
End Sub |
Partager