C#中的TreeView与TreeNode

private void treeViewLeft_AfterSelect(object sender, TreeViewEventArgs e)
        {
            String strNodeText = e.Node.Text;
            //根据点击的不同的节点,触发对应的事件
            switch (strNodeText)
            {
                case "aa":
                    this.label1.Text = "fffff";
                    break;
                case "bb":
                    MDIParent1 md = new MDIParent1();
                    md.Show();
                    break;
                case "cc":
                    break;
            }
        }

 

你可能感兴趣的:(String,object,C#)