This commit is contained in:
2019-09-30 16:18:53 +02:00
parent 7d884d7cba
commit 53f2a0666b
70 changed files with 2984 additions and 197 deletions

View File

@@ -98,7 +98,7 @@
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="SimpleHistory\Enums.vb" />
<Compile Include="SimpleHistory\ObjectValueType.vb" />
<Compile Include="SimpleHistory\HistoryPoint.vb" />
<Compile Include="SimpleHistory\MemberLists.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />

View File

@@ -0,0 +1,12 @@
Namespace SimpleHistory
''' <summary>
''' Specify which member types you would include.
''' </summary>
Public Enum ObjectValueType
None = 0
Field = 1
[Property] = 2
End Enum
End Namespace

View File

@@ -32,15 +32,12 @@ Namespace SimpleHistory
Dim ret As HistoryPoint
If stackPast.Count > 0 Then
Dim hp As HistoryPoint = stackPast.Pop
hp.Undo()
stackFuture.Push(hp)
ret = hp
Else
ret = Nothing
End If
Return ret
@@ -53,15 +50,12 @@ Namespace SimpleHistory
Dim ret As HistoryPoint
If stackFuture.Count > 0 Then
Dim hp As HistoryPoint = stackFuture.Pop
hp.Redo()
stackPast.Push(hp)
ret = hp
Else
ret = Nothing
End If
Return ret