Common: fix weird crash when loading object properties
This commit is contained in:
@@ -21,6 +21,7 @@ Public Class ctrlObjectPropertyDialog
|
|||||||
Private Property Client As Client
|
Private Property Client As Client
|
||||||
Private Property Environment As Environment
|
Private Property Environment As Environment
|
||||||
Private Property ObjectId As Long
|
Private Property ObjectId As Long
|
||||||
|
Private Property HostForm As Form
|
||||||
|
|
||||||
Private ReadOnly Changes As New Dictionary(Of String, Object)
|
Private ReadOnly Changes As New Dictionary(Of String, Object)
|
||||||
|
|
||||||
@@ -40,6 +41,7 @@ Public Class ctrlObjectPropertyDialog
|
|||||||
Public Sub Initialize(pLogConfig As LogConfig, pHostForm As Form, pClient As Client, pEnv As Environment)
|
Public Sub Initialize(pLogConfig As LogConfig, pHostForm As Form, pClient As Client, pEnv As Environment)
|
||||||
LogConfig = pLogConfig
|
LogConfig = pLogConfig
|
||||||
Logger = pLogConfig.GetLogger()
|
Logger = pLogConfig.GetLogger()
|
||||||
|
HostForm = pHostForm
|
||||||
ErrorHandler = New BaseErrorHandler(pLogConfig, pHostForm)
|
ErrorHandler = New BaseErrorHandler(pLogConfig, pHostForm)
|
||||||
ControlManager = New AttributeControls(pLogConfig, pEnv, pClient)
|
ControlManager = New AttributeControls(pLogConfig, pEnv, pClient)
|
||||||
|
|
||||||
@@ -91,7 +93,7 @@ Public Class ctrlObjectPropertyDialog
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
IsLoading = True
|
IsLoading = True
|
||||||
Dim oLoadingHandle = SplashScreenManager.ShowOverlayForm(Me)
|
Enabled = False
|
||||||
|
|
||||||
Try
|
Try
|
||||||
ObjectId = pObjectId
|
ObjectId = pObjectId
|
||||||
@@ -131,7 +133,7 @@ Public Class ctrlObjectPropertyDialog
|
|||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
Return False
|
Return False
|
||||||
Finally
|
Finally
|
||||||
SplashScreenManager.CloseOverlayForm(oLoadingHandle)
|
Enabled = True
|
||||||
IsLoading = False
|
IsLoading = False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
Reference in New Issue
Block a user