Fix issue MR-165 - Can't close About window if it is the last tab

This commit is contained in:
Riley McArdle
2013-02-15 17:09:24 -06:00
parent d773f78ff5
commit a3ac44af55
2 changed files with 25 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
Fix issue MR-99 - Integrate Spanish translation
Fix issue MR-101 - Collapse all folders causes a NullReferenceException
Fix issue MR-131 - RD Gateway does not respect setting for use different credentials
Fix issue MR-165 - Can't close About window if it is the last tab
Fix issue MR-166 - Inheritance button is disabled on some connections
Fix issue MR-172 - RDGatewayPassword is unencrypted in confCons.xml file
Fix issue MR-176 - Del key while editing connection name triggers 'Delete Connection'

View File

@@ -34,6 +34,30 @@ Namespace UI
End Sub
#End Region
#Region "Private Methods"
Private Sub Base_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
If TypeOf Me Is Connection Then
frmMain.pnlDock.DocumentStyle = DocumentStyle.DockingSdi
Else
frmMain.pnlDock.DocumentStyle = DocumentStyle.DockingWindow
End If
End Sub
Private Sub Base_FormClosed(sender As System.Object, e As System.Windows.Forms.FormClosedEventArgs) Handles MyBase.FormClosed
Dim nonConnectionPanelCount As Integer = 0
For Each document As DockContent In frmMain.pnlDock.Documents
If document IsNot Me And Not TypeOf document Is Connection Then
nonConnectionPanelCount = nonConnectionPanelCount + 1
End If
Next
If nonConnectionPanelCount = 0 Then
frmMain.pnlDock.DocumentStyle = DocumentStyle.DockingSdi
Else
frmMain.pnlDock.DocumentStyle = DocumentStyle.DockingWindow
End If
End Sub
#End Region
End Class
End Namespace
End Namespace