コード例 #1
0
ファイル: Main.cs プロジェクト: orichisonic/CollectData
        /// <summary>
        /// 点击树状菜单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TrvMenu_Click(object sender, EventArgs e)
        {
            while (this.check_if_tab_exist(currSelectNodeTag))
            {
                return;
            }
            if (lastSelectNodeTage == currSelectNodeTag)
            {
                if (currSelectNodeTag != null)
                {
                    switch (this.GetFormName(currSelectNodeTag))
                    {
                    case "frmGameBrowse":
                    {
                        frmGameBrowse frmBse = new frmGameBrowse();
                        frmBse.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUser":
                    {
                        break;
                    }

                    case "frmImort_ExpressBrowse":
                    {
                        frmImort_ExpressBrowse frmJOB = new frmImort_ExpressBrowse();
                        frmJOB.CreateModule(this, null, null);
                        break;
                    }

                    case "frmDataCollect":
                    {
                        frmDataCollect frmClt = new frmDataCollect(currSelectNodeTag);
                        frmClt.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUserBrowse":
                    {
                        frmUserBrowse frmUserBse = new frmUserBrowse();
                        frmUserBse.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUserEdit.cs":
                    {
                        frmUserEdit frmUserEdt = new frmUserEdit(CommonCLS.LoginUserID, "1");
                        frmUserEdt.CreateModule(null, null, null);
                        break;
                    }
                    }
                }
            }
            else
            {
                lastSelectNodeTage = currSelectNodeTag;
            }
        }
コード例 #2
0
ファイル: Main.cs プロジェクト: orichisonic/CollectData
        /// <summary>
        /// 树状菜单选择后

        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TrvMenu_AfterSelect(object sender, TreeViewEventArgs e)
        {
            try
            {
                while (this.check_if_tab_exist(e.Node.Text))
                {
                    return;
                }
                currSelectNodeTag = Convert.ToString(e.Node.Text);

                if (lastSelectNodeTage == null)
                {
                    lastSelectNodeTage = e.Node.Text;
                }

                if (e.Node.Text != null)
                {
                    switch (this.GetFormName(e.Node.Text))
                    {
                    case "frmGameBrowse":
                    {
                        frmGameBrowse frmBse = new frmGameBrowse();
                        frmBse.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUser":
                    {
                        break;
                    }

                    case "frmImort_ExpressBrowse":
                    {
                        frmImort_ExpressBrowse frmJOB = new frmImort_ExpressBrowse();
                        frmJOB.CreateModule(this, null, null);
                        break;
                    }

                    case "frmDataCollect":
                    {
                        frmDataCollect frmClt = new frmDataCollect(currSelectNodeTag);
                        frmClt.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUserBrowse":
                    {
                        frmUserBrowse frmUserBse = new frmUserBrowse();
                        frmUserBse.CreateModule(this, null, null);
                        break;
                    }

                    case "frmUserEdit.cs":
                    {
                        frmUserEdit frmUserEdt = new  frmUserEdit(CommonCLS.LoginUserID, "1");
                        frmUserEdt.CreateModule(null, null, null);
                        break;
                    }
                    }
                }
                if (e.Node.Tag != null)
                {
                    //this.lblStatus.Text = "正在打开窗体\"" + e.Node.Text.ToString() + "\",请稍等...";
                }
            }
            catch (System.Exception ex)
            {
            }
        }