Ejemplo n.º 1
0
        private void MainInterface_Load(object sender, EventArgs e)
        {
            //根据搜索结果进行选择,因为可能有多个相同名称的账号
               searchResult = new SearchResult();
               panel1.Controls.Add(searchResult);
               searchResult.Show();

               superiorSelect = new SuperiorSelect();
               panel3.Controls.Add(superiorSelect);
               superiorSelect.Show();
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            /*
             * 因为MainInterface中有以下三个控件的引用,如果不赋值为null,则执行clear操作的时候,
             * 控件不会被真正销毁
             *
             */
            completionAccordingToProblems = null;
            completionAccordingToType = null;
            problemRecommend = null;

            //清除所有子控件
            panel3.Controls.Clear();

            superiorSelect = new SuperiorSelect();
            panel3.Controls.Add(superiorSelect);
            superiorSelect.Show();

            treeView2.Visible = false;
            button2.Visible = false;
        }