Bonjour à tous,
J'ai besoin d'excecuter du code dans la classe clsAudioStreamsDataOut au moment ou j'ecrits comme avec la ligne de code ci-dessous. Je pensais utiliser le Set de la propriété Item mais celui-ci n'est pas appelé, c'est l'accesseur Get qui est appelé. En clair l'accesseur Set n'est jamais appelé ?!!!! Je ne vois vraiment pas comment je peux faire.
La propriété Item(index) me sert à accéder (en lecture/ecriture) directement aux propriétés des objects clsAudioData. _ListeofAudioStreamsDataOut est une ArrayList qui contient la liste des objets clsAudioData.


Ligne de code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
ThisVideo.MediaData.AudioStreamsDataOut.Item(i).Codec = "MP3"
Ma Classe :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
<Serializable()>
    Public Class clsAudioStreamsDataOut
        Private _ListeOfAudioDataOut As New ArrayList
 
        Public Sub New()
 
        End Sub
 
        Public ReadOnly Property Items As ArrayList
            Get
                Return _ListeOfAudioDataOut
            End Get
            'Set(ByVal value As SortedList)
            '    _SortedListeOfClips = value
            'End Set
        End Property
        Public Property Item(ByVal index As Integer) As clsAudioData
            Get
                 Return CType(_ListeOfAudioDataOut(index), clsAudioData)
            End Get
            Set(ByVal value As clsAudioData)
            _ListeOfAudioDataOut.Item(index) = value
            End Set
        End Property
 Public Sub Add(ByVal AudioData As clsAudioData)
            Dim _AudioData As New clsAudioData
            _AudioData.StreamID = AudioData.StreamID
            _AudioData.Codec = AudioData.Codec
            _AudioData.Language = AudioData.Language
 
            _ListeOfAudioDataOut.Add(AudioData)
  End Sub
End Class
 
 <Serializable()>
    Public Class clsAudioData
        Private _StreamID As Integer
        Private _Codec As String
        Private _Language As String
 
        Public Sub New()
 
        End Sub
 
         Public Property StreamID As Integer
            Get
                Return _StreamID
            End Get
            Set(ByVal value As Integer)
                _StreamID = value
            End Set
        End Property
        Public Property Codec As String
            Get
                Return _Codec
            End Get
            Set(ByVal value As String)
                _Codec = value
            End Set
        End Property
        Public Property Language As String
            Get
                Return _Language
            End Get
            Set(ByVal value As String)
                _Language = value
            End Set
        End Property
    End Class
Si vous avez une idée sur ce problème franchement ça m'aiderais énormément.