Update title bar on connection change

This commit is contained in:
Sean Kaim
2019-01-08 11:52:38 -05:00
parent 018a97fb8e
commit fd246bc83b

View File

@@ -43,6 +43,8 @@ namespace mRemoteNG.UI.Window
TabText = formText;
connDock.DocumentStyle = DocumentStyle.DockingWindow;
connDock.ShowDocumentIcon = true;
connDock.ActiveContentChanged += ConnDockOnActiveContentChanged;
}
private InterfaceControl GetInterfaceControl()
@@ -305,6 +307,15 @@ namespace mRemoteNG.UI.Window
}
#endregion
#region Events
private void ConnDockOnActiveContentChanged(object sender, EventArgs e)
{
var ic = GetInterfaceControl();
if (ic?.Info == null) return;
FrmMain.Default.SelectedConnection = ic.Info;
}
#endregion
#region Tab Menu
private void ShowHideMenuButtons(object sender, CancelEventArgs e)
{