private void dockPanel_ActiveContentChanged(object sender, EventArgs e) { if (dockPanel.ActiveContent is LogWindow) { CurrentLogWindow = dockPanel.ActiveContent as LogWindow; CurrentLogWindow.LogWindowActivated(); ConnectToolWindows(CurrentLogWindow); } }