public void FocusCurrentTab() { dockPanel1.Refresh(); if (dockPanel1.ActiveDocument is ctlPuttyPanel) { ctlPuttyPanel p = (ctlPuttyPanel)dockPanel1.ActiveDocument; SetPanelTitle(p); p.SetFocusToChildApplication(); } }
/// <summary> /// Handles focusing on tabs/windows which host PuTTY /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void dockPanel1_ActiveDocumentChanged(object sender, EventArgs e) { if (dockPanel1.ActiveDocument is ctlPuttyPanel) { ctlPuttyPanel p = (ctlPuttyPanel)dockPanel1.ActiveDocument; this.Text = p.ApplicationTitle.Replace(" - PuTTY", "") + " - SuperPutty"; p.Text = p.ApplicationTitle.Replace(" - PuTTY", ""); p.SetFocusToChildApplication(); } }