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
| <Serializable()>
Public Class clsVideoData
Implements ISerializable, IDeserializationCallback
<NonSerialized()> Private Shared _Container As PictureBox
<NonSerialized()> Private Shared _ListBox As ListBox
<NonSerialized()> Private Shared _ContainerVideo As PictureBox
<NonSerialized()> Private Shared _ComboBoxLogo As ComboBox
' Informations generales sur la video
Private Shared _NbFrames As Integer
Private Shared _Fps As Integer
Private Shared _Durée As Double
Private Shared _AverageFrame As Double
Private Shared _SARWidht As Integer
Private Shared _SARHeight As Integer
Private Shared _SCGx As Integer
Private Shared _SCGy As Integer
Private Shared _SCGxTl As Integer
Private Shared _SCGyTl As Integer
Private _Cuts As New clsCuts
Private _Crops As New clsCrops
Private _Logo As New clsLogo
<NonSerialized()> Private Shared _Logos As New clsLogos
#Region "ISerializable Members and déserialisable constructor"
' Serialisation et déserialisation personnalisée :
Private Sub GetObjectData(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext) Implements System.Runtime.Serialization.ISerializable.GetObjectData
' propriétés a serializer
info.AddValue("NbFrames", _NbFrames)
info.AddValue("Fps", _Fps)
info.AddValue("Durée", _Durée)
info.AddValue("AverageFrame", _AverageFrame)
info.AddValue("SARWidht", _SARWidht)
info.AddValue("SARHeight", _SARHeight)
info.AddValue("SCGXtl", _SCGxTl)
info.AddValue("SCGYtl", _SCGyTl)
info.AddValue("Cuts", _Cuts)
info.AddValue("Crops", _Crops)
info.AddValue("Logo", _Logo)
End Sub
Public Sub New(info As SerializationInfo, context As StreamingContext)
' Propriétés a deserializer
_NbFrames = DirectCast(info.GetValue("NbFrames", GetType(Integer)), Integer)
_Fps = DirectCast(info.GetValue("Fps", GetType(Integer)), Integer)
_Durée = DirectCast(info.GetValue("Durée", GetType(Double)), Double)
_AverageFrame = DirectCast(info.GetValue("AverageFrame", GetType(Double)), Double)
_SARWidht = DirectCast(info.GetValue("SARWidht", GetType(Integer)), Integer)
_SARHeight = DirectCast(info.GetValue("SARHeight", GetType(Integer)), Integer)
_SCGxTl = DirectCast(info.GetValue("SCGXtl", GetType(Integer)), Integer)
_SCGyTl = DirectCast(info.GetValue("SCGYtl", GetType(Integer)), Integer)
_Cuts = DirectCast(info.GetValue("Cuts", GetType(clsCuts)), clsCuts)
_Crops = DirectCast(info.GetValue("Crops", GetType(clsCrops)), clsCrops)
_Logo = DirectCast(info.GetValue("Logo", GetType(clsLogo)), clsLogo)
End Sub
Private Sub OnDeserialization(ByVal sender As Object) Implements System.Runtime.Serialization.IDeserializationCallback.OnDeserialization
' Procedure pour restaurer les objets qui n'ont pas pu être sérializé
' ......
End Sub
#End Region
.....
End Class |
Partager