fix: close batch execution and recovery lifecycle

This commit is contained in:
阿白叔 committed 2026-11-17 16:56:29 +08:00
1 parent b19afc6a53
commit d9cf6a07e9
91 files changed
+5779 -454

No files matched your search

@@ -73,10 +73,11 @@ Class SessionApp
End Function
End Class
Class SessionDocuments
Public Owner, OpenCount, SheetCount
Public Owner, OpenCount, SheetCount, DocumentCount
Private Sub Class_Initialize()
OpenCount = 0
SheetCount = 1
DocumentCount = 1
End Sub
Public Function GetAvailableSchematics()
Dim Names
@@ -94,13 +95,14 @@ Class SessionDocuments
End Function
Public Function Open(ByVal Schematic, ByVal Sheet)
OpenCount = OpenCount + 1
DocumentCount = 1
Set Owner.ActiveView = Owner
Set Open = Me
End Function
Public Sub Activate()
End Sub
Public Property Get Count
Count = 1
Count = DocumentCount
End Property
Public Function Item(ByVal Index)
If Index <> 1 Then Err.Raise 51000,"Test","bad document index"
@@ -108,6 +110,7 @@ Class SessionDocuments
End Function
Public Sub Close(ByVal SaveChanges, ByVal FileName)
If SaveChanges Then Owner.SaveCount = Owner.SaveCount + 1
DocumentCount = DocumentCount - 1
Set Owner.ActiveView = Nothing
End Sub
End Class
@@ -141,6 +144,9 @@ def run_session(tmp_path, body):
target.touch()
setup = f'''
Set QP_Fso = CreateObject("Scripting.FileSystemObject")
Set QP_SessionItems=CreateObject("Scripting.Dictionary")
Set QP_SessionSheets=CreateObject("Scripting.Dictionary")
Set QP_SessionDocuments=CreateObject("Scripting.Dictionary")
QP_Root = "{tmp_path}"
Dim Target, Attached
Target = "{target}"