void InitializeComponent() { base.SetupFromXmlFile(Path.Combine(PropertyService.DataDirectory, @"resources\panels\TreeViewOptionsDialog.xfrm")); this.optionsPanelLabel = new GradientHeaderPanel(); this.optionsPanelLabel.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0))); this.optionsPanelLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.optionsPanelLabel.BorderStyle = BorderStyle.Fixed3D; this.optionsPanelLabel.Dock = DockStyle.Fill; ControlDictionary["headerPanel"].Controls.Add(optionsPanelLabel); Owner = (Form)WorkbenchSingleton.Workbench; Icon = null; ControlDictionary["okButton"].Click += new EventHandler(AcceptEvent); ((TreeView)ControlDictionary["optionsTreeView"]).Click += new EventHandler(HandleClick); ((TreeView)ControlDictionary["optionsTreeView"]).AfterSelect += new TreeViewEventHandler(SelectNode); ((TreeView)ControlDictionary["optionsTreeView"]).BeforeSelect += new TreeViewCancelEventHandler(BeforeSelectNode); ((TreeView)ControlDictionary["optionsTreeView"]).BeforeExpand += new TreeViewCancelEventHandler(BeforeExpandNode); ((TreeView)ControlDictionary["optionsTreeView"]).BeforeExpand += new TreeViewCancelEventHandler(ShowOpenFolderIcon); ((TreeView)ControlDictionary["optionsTreeView"]).BeforeCollapse += new TreeViewCancelEventHandler(ShowClosedFolderIcon); ((TreeView)ControlDictionary["optionsTreeView"]).MouseDown += new MouseEventHandler(TreeMouseDown); }