void LoadSolution(Solution solution) { if (!ProjectBrowserControl.TreeView.IsHandleCreated) { LoggingService.Debug("ProjectBrowser: Attempt to load solution " + solution.ToString() + " before handle of ProjectBrowserControl.TreeView created"); this.solutionToLoadWhenHandleIsCreated = solution; if (!this.treeViewHandleCreatedAttached) { LoggingService.Debug("-> Attaching event handler to ProjectBrowserControl.TreeView.HandleCreated"); this.treeViewHandleCreatedAttached = true; ProjectBrowserControl.TreeView.HandleCreated += this.ProjectBrowserTreeViewHandleCreated; } } else { LoggingService.Debug("ProjectBrowser: Loading solution " + solution.ToString() + " into project tree view"); this.solutionToLoadWhenHandleIsCreated = null; projectBrowserPanel.ViewSolution(solution); projectBrowserPanel.ReadViewState(solution.Preferences.Properties); } }