示例#1
0
        /// <summary>
        /// 窗体的调用.
        /// </summary>
        /// <param name="FrmName">调用窗体的Text属性值</param>
        /// <param name="n">标识</param>
        private void Show_Control(string FrmName)
        {
            panel1.Controls.Clear();
            for (int i = 0; i < array.Count; i++)
            {
                if (FrmName == array[i][0] + "查询")  //判断要打开的窗体
                {
                    CtrlView.Query FrmWordPad = new CtrlView.Query();
                    ModuleClass.FuncClass.ActivContrl[0] = array[i][0];
                    ModuleClass.FuncClass.ActivContrl[1] = array[i][1];
                    panel1.Controls.Add(FrmWordPad);
                }


                if (FrmName == array[i][0] + "预测")
                {
                    CtrlView.Forecast FrmWordPad = new CtrlView.Forecast();
                    ModuleClass.FuncClass.ActivContrl[0] = array[i][0];
                    ModuleClass.FuncClass.ActivContrl[1] = array[i][1];
                    panel1.Controls.Add(FrmWordPad);
                }
            }



            if (FrmName == "备份/还原")
            {
                FormView.HaveBack FrmHaveBack = new FormView.HaveBack();
                FrmHaveBack.Text = "备份/还原数据库";
                FrmHaveBack.ShowDialog();
                FrmHaveBack.Dispose();
            }
            if (FrmName == "删除数据表")
            {
                FormView.ClearData FrmClearData = new FormView.ClearData();
                FrmClearData.Text = "删除数据表";
                FrmClearData.ShowDialog();
                FrmClearData.Dispose();
            }


            if (FrmName == "计算器")
            {
                System.Diagnostics.Process.Start("calc.exe");
            }
            if (FrmName == "记事本")
            {
                System.Diagnostics.Process.Start("notepad.exe");
            }
            if (FrmName == "帮助")
            {
                System.Diagnostics.Process.Start("readme.doc");
            }
        }
示例#2
0
        /// <summary>
        /// 窗体的调用.
        /// </summary>
        /// <param name="FrmName">调用窗体的Text属性值</param>
        /// <param name="n">标识</param>
        private void Show_Control(string FrmName)
        {
            panel1.Controls.Clear();
            for(int i=0;i<array.Count;i++)
            {
                if (FrmName == array[i][0]+"查询")  //判断要打开的窗体
                {
                    CtrlView.Query FrmWordPad = new CtrlView.Query();
                    ModuleClass.FuncClass.ActivContrl[0] = array[i][0];
                    ModuleClass.FuncClass.ActivContrl[1] = array[i][1];
                    panel1.Controls.Add(FrmWordPad);
                }

                if (FrmName == array[i][0]+"预测")
                {
                    CtrlView.Forecast FrmWordPad = new CtrlView.Forecast();
                    ModuleClass.FuncClass.ActivContrl[0] = array[i][0];
                    ModuleClass.FuncClass.ActivContrl[1] = array[i][1];
                    panel1.Controls.Add(FrmWordPad);
                }
            }

            if (FrmName == "备份/还原")
            {
                FormView.HaveBack FrmHaveBack = new FormView.HaveBack();
                FrmHaveBack.Text = "备份/还原数据库";
                FrmHaveBack.ShowDialog();
                FrmHaveBack.Dispose();
            }
            if (FrmName == "删除数据表")
            {
                FormView.ClearData FrmClearData = new FormView.ClearData();
                FrmClearData.Text = "删除数据表";
                FrmClearData.ShowDialog();
                FrmClearData.Dispose();
            }

            if (FrmName == "计算器")
            {
                System.Diagnostics.Process.Start("calc.exe");
            }
            if (FrmName == "记事本")
            {
                System.Diagnostics.Process.Start("notepad.exe");
            }
            if (FrmName == "帮助")
            {
                System.Diagnostics.Process.Start("readme.doc");
            }
        }