private void optionTreeView_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e) { string key = e.Node.FullPath; BaseOptionsPage page = OptionsPages[key]; if (page != null && page != current) { pagePanel.Controls.Clear(); pagePanel.Controls.Add(page); page.Dock = DockStyle.Fill; current = page; return; } }