private void treeView1_AfterSelect_1(object sender, System.Windows.Forms.TreeViewEventArgs e) { if (e.Node is DesignNode) { if (_selectedNode != null) { _selectedNode.ForeColor = Color.Black; } _selectedNode = (DesignNode)e.Node; e.Node.ForeColor = Color.Blue; } else { _selectedNode = null; } if (OnSelected != null) { OnSelected(_selectedNode); } }
private void OnSelection(DesignNode node) { if (node != null) { lblDesignDesc.Text = string.Format("{0}: {1} items", node.Design.Name, node.Design.RecordCount); if (OnDesignSelected != null) { OnDesignSelected(); } } else { lblDesignDesc.Text = ""; if (OnDesignUnselected != null) { OnDesignUnselected(); } } UpdateControlStates(); }
private void OnDoubleClickDesign(DesignNode node) { OpenDesignPreview(node.Design); }