violent_ken
Messages postés
1812
Date d'inscription
mardi 31 mai 2005
Statut
Membre
Dernière intervention
26 octobre 2010
2
14 févr. 2007 à 13:06
Violent Ken
TEST FIREFOX 2.0
'-------------------------------------------------------
'ajoute une entrée à l'historique, prend en paramètre
'-le rang de la nouvelle entrée (donc supprime tout ce qui est après)
'-l'historique
'-les datas
'-le type de nouvelle entrée
'-------------------------------------------------------
PublicSub AddHisto(ByVal lRang As Long, ByVal Undo As clsUndoItem, ByRef Histo() As clsUndoSubItem, _
ByVal tUndoType As UNDO_TYPE, OptionalByVal sData1 As String, OptionalByVal sData2 As String, _
OptionalByVal curData1 As Currency, OptionalByVal curData2 As Currency, _
OptionalByVal bytData1 As Byte, OptionalByVal bytData2 As Byte, OptionalByVal lngData1 As Long)
Dim x As Long
Dim y As Long
Dim s As String
'procède à la suppression de tout ce qui est après lRang
'lRang=1 ==> pas de suppression
If lRang <> -1 Then
ReDim Preserve Histo(lRang)
EndIf
'ajoute à la fin de l'historique le nouvel élément
ReDim Preserve Histo(UBound(Histo()) + 1)
Set Histo(UBound(Histo())) = New clsUndoSubItem
With Histo(UBound(Histo()))
.tUndoType = tUndoType
.sData1 = sData1
.sData2 = sData2
.curData2 = curData2
.curData1 = curData1
.bytData2 = bytData2
.bytData1 = bytData1
.lngData1 = lngData1
EndWith
'ajoute au lv un nouvel item
Undo.lvHisto.Visible = False
With Undo.lvHisto.ListItems
If Undo.tEditType = edtFile Then
'alors c'est un fichier
If tUndoType = actByteWritten Then
s = "o=[" & LTrim$(Str$(curData1)) & "]c=[" & LTrim$(Str$(bytData1)) & "]s=[" & Formated16String(sData2) & "]"
EndIf
ElseIf Undo.tEditType = edtDisk Then
'alors c'est un disque
If tUndoType = actByteWritten Then
s = "o=[" & LTrim$(Str$(curData1)) & "]c=[" & LTrim$(Str$(bytData1)) & "]s=[" & Formated16String(sData2) & "]"
EndIf
Else
'alors c'est un processus
If tUndoType = actByteWritten Then
s = "o=[" & LTrim$(Str$(curData1)) & "]c=[" & LTrim$(Str$(bytData1)) & "]s=[" & Formated1String(sData2) & "]"
EndIf
EndIf
.Add Text:=s
.Item(Undo.lvHisto.ListItems.Count).SubItems(1) = Str$(Undo.lvHisto.ListItems.Count)
EndWith
Undo.lvHisto.Visible = True
EndSub
[code.aspx?ID=41455 By Renfield]