예제 #1
0
 private void 用户管理ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Form frm_UserChange = new User.Form_UserChange();
     showForm(frm_UserChange);
 }
예제 #2
0
        private void treeView1_MouseUp(object sender, MouseEventArgs e)
        {
            TreeNode tn = treeView1.GetNodeAt(new Point(e.X, e.Y));
            if (tn != null)
            {
                //此处表示点击到TreeNode节点了。
                switch (tn.Name)
                {
                    case "Out":
                        {
                            Form frm = new OutStock.Form_Out();
                            showForm(frm);
                        } break;
                    case "In":
                         Form frm_Add = new AddMaterial.Form_AddInfo();
                         showForm(frm_Add);break;
                    case"SearchSimple":
                        {Form frm = new InfoSearch.Form_Search_Simple();
                        showForm(frm);}break;
                    case "Search":
                        {
                            Form frm = new InfoSearch.Form_Search();
                            showForm(frm);
                        } break;
                    case "CodeChange":
                        {
                            Form frm = new User.Form_CodeChange();
                            showForm(frm);
                        } break;
                    case "UserChange":
                        {
                            Form frm = new User.Form_UserChange();
                            showForm(frm);
                        } break;
                    case "Material":
                        {
                            Form frm = new DataUpdate.Form_Material();
                            showForm(frm);
                        } break;
                    case "Classify":
                        {
                            Form frm = new DataUpdate.Form_Classify();
                            showForm(frm);
                        } break;
                    case "Buy":
                        {
                            Form frm = new DataUpdate.Form_Buy();
                            showForm(frm);
                        } break;
                    case "Funds":
                        {
                            Form frm = new DataUpdate.Form_Funds();
                            showForm(frm);
                        } break;
                    case "Unit":
                        {
                            Form frm = new DataUpdate.Form_UnitManager();
                            showForm(frm);
                        } break;
                    case "Operator":
                        {
                            Form frm = new DataUpdate.Form_Operator();
                            showForm(frm);
                        } break;
                    case "Calculator":
                        {
                            System.Diagnostics.Process.Start("calc.exe");
                        } break;
                    case "Exit":
                        {
                            Application.Exit();
                        } break;

                }
            }
            else
            {
                //表示此处点击在TreeView1控件的空白区域
                //可以在此处添加弹出菜单的方法
            }
        }