jj: prevent opening of same window twice

This commit is contained in:
Jonathan Jenne
2018-07-12 14:20:05 +02:00
parent 8103f5d055
commit ceda3be741
3 changed files with 8 additions and 1 deletions

View File

@@ -266,7 +266,12 @@ Module ModuleHelperMethods
Public Sub OpenFormConstructor(id As Integer, Optional recordId As Integer = -1)
Try
If CURRENT_OPEN_CONSTRUCTOR_FORMS.Contains(id) Then
Exit Sub
End If
CURRENT_CONSTRUCTOR_ID = id
CURRENT_OPEN_CONSTRUCTOR_FORMS.Add(id)
Dim frm As New frmConstructor_Main()
' frm = frmForm_Constructor.Instance()

View File

@@ -47,7 +47,7 @@
Public CURRENT_DOKARTID As Integer
Public CURRENT_DOKARTSTRING As String
Public CURRENT_OPEN_CONSTRUCTOR_FORMS As New List(Of Integer)
Public CURRENT_CONSTRUCTOR_ID As Integer = 1
Public CURRENT_CONSTRUCTOR_DETAIL_ID As Integer
Public CURRENT_FILEID As Integer

View File

@@ -230,6 +230,8 @@ Public Class frmConstructor_Main
End If
ClassWindowLocation.SaveFormLocationSize(Me, CONSTRUCTORID, CURRENT_SCREEN_ID, "CONSTRUCTOR_MAIN")
CURRENT_OPEN_CONSTRUCTOR_FORMS.Remove(CONSTRUCTORID)
' Verhindert, das noch geöffnete Records für immer gelockt sind
If Not IsNothing(CURRENT_DOCVIEW) Then
Try