コード例 #1
0
        private void ButtonSearch_Click(object sender, EventArgs e)
        {
            if (this.TextBoxStockInfo.Text == string.Empty || this.TextBoxStockInfo.Text == "股票名称或代码")
            {
                MainForm.ShowPopupMessage("请输入一个股票名称或代码");
                return;
            }

            iSearchIndex++;
            TreeNode newTreeNodeSearchSub = new TreeNode(string.Format("结果{0}", iSearchIndex));

            m_TreeNodeSearch.Nodes.Add(newTreeNodeSearchSub);

            OptionEControl optionEControl = new OptionEControl();

            optionEControl.Dock    = DockStyle.Fill;
            optionEControl.Visible = false;

            this.m_AllOptionControlInfo.Add(newTreeNodeSearchSub, optionEControl);

            this.Panel.Controls.Add(optionEControl);

            this.TreeView.SelectedNode = newTreeNodeSearchSub;
        }
コード例 #2
0
        private void ButtonSearch_Click( object sender, EventArgs e )
        {
            if ( this.TextBoxStockInfo.Text == string.Empty || this.TextBoxStockInfo.Text == "股票名称或代码" )
            {
                MainForm.ShowPopupMessage( "请输入一个股票名称或代码" );
                return;
            }

            iSearchIndex++;
            TreeNode newTreeNodeSearchSub = new TreeNode( string.Format( "结果{0}", iSearchIndex ) );
            m_TreeNodeSearch.Nodes.Add( newTreeNodeSearchSub );

            OptionEControl optionEControl = new OptionEControl();
            optionEControl.Dock = DockStyle.Fill;
            optionEControl.Visible = false;

            this.m_AllOptionControlInfo.Add( newTreeNodeSearchSub, optionEControl );

            this.Panel.Controls.Add( optionEControl );

            this.TreeView.SelectedNode = newTreeNodeSearchSub;
        }