예제 #1
0
        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);
            }
        }
예제 #2
0
        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();
        }
예제 #3
0
 private void OnDoubleClickDesign(DesignNode node)
 {
     OpenDesignPreview(node.Design);
 }