예제 #1
0
파일: CMain.cs 프로젝트: hkiaipc/yh
        static void Main()
        {
            try
            {

                openCon();
                Application.Run(new CReportDll.comReport.newRep.frmReport());
                return;
                XmlDocument xDoc=new XmlDocument();
                xDoc.Load("startForm.xml");
                if(xDoc.DocumentElement.SelectSingleNode("./startForm").Attributes.GetNamedItem("val").Value.Trim()=="report")
                {
                    //***************����ϵͳ��ʾ
                    CReportDll.comReport.newRep.frmReport frmRepO=new CReportDll.comReport.newRep.frmReport();
                    //frmRepO.m_sCon=BengZhan.CDBConnection.m_sCon;
                    Application.Run(frmRepO);
                    //Application.Run(new winRep.Form1());
                    //**************************
                }
                else
                {
                    if(xDoc.DocumentElement.SelectSingleNode("./startForm").Attributes.GetNamedItem("val").Value.Trim()=="chart")
                    {
                        CReportDll.comReport.newRep.frmChart frmC=new CReportDll.comReport.newRep.frmChart();
                        frmC.ShowDialog();;
                        //					CReportDll.frmChart frmChartO=new CReportDll.frmChart();
                        //					Application.Run(frmChartO);
                    }
                    else
                    {
                        CReportDll.comReport.newRep.frmSalReport frmSSO=new CReportDll.comReport.newRep.frmSalReport();
                        frmSSO.ShowDialog();
                    }

                }

            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
예제 #2
0
파일: CMain.cs 프로젝트: wwkkww1983/yh
        static void Main()
        {
            try
            {
                openCon();
                Application.Run(new CReportDll.comReport.newRep.frmReport());
                return;

                XmlDocument xDoc = new XmlDocument();
                xDoc.Load("startForm.xml");
                if (xDoc.DocumentElement.SelectSingleNode("./startForm").Attributes.GetNamedItem("val").Value.Trim() == "report")
                {
                    //***************顶峰系统显示
                    CReportDll.comReport.newRep.frmReport frmRepO = new CReportDll.comReport.newRep.frmReport();
                    //frmRepO.m_sCon=BengZhan.CDBConnection.m_sCon;
                    Application.Run(frmRepO);
                    //Application.Run(new winRep.Form1());
                    //**************************
                }
                else
                {
                    if (xDoc.DocumentElement.SelectSingleNode("./startForm").Attributes.GetNamedItem("val").Value.Trim() == "chart")
                    {
                        CReportDll.comReport.newRep.frmChart frmC = new CReportDll.comReport.newRep.frmChart();
                        frmC.ShowDialog();;
                        //					CReportDll.frmChart frmChartO=new CReportDll.frmChart();
                        //					Application.Run(frmChartO);
                    }
                    else
                    {
                        CReportDll.comReport.newRep.frmSalReport frmSSO = new CReportDll.comReport.newRep.frmSalReport();
                        frmSSO.ShowDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
예제 #3
0
파일: frmWaterSys.cs 프로젝트: hkiaipc/yh
        private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            try
            {
                if(e.Button.Text.Trim()=="�˹�¼��")
                {
                    this.miniFrms();
                    if(this.showFrm("�˹�¼��"))
                    {
                        return;
                    }
                    bengzhans.frmDatasEdit frmedit=new BengZhan.bengzhans.frmDatasEdit();
                    frmedit.Text="�˹�¼��";
                    frmedit.MdiParent=this;
                    frmedit.WindowState=System.Windows.Forms.FormWindowState.Maximized;
                    frmedit.Show();

                    m_arrFrms.Add(frmedit);

                }
                if(e.Button.Text.Trim()=="��������")
                {
                    New.cReport.frmParamSet frmPS=new New.cReport.frmParamSet();
                    frmPS.ShowDialog();
                    return ;
                }
                if(e.Button.Text.Trim()=="��վ��Ϣ")
                {
                    bengzhans.frmBengZhans frmBengZhanObj=new BengZhan.bengzhans.frmBengZhans();
                    frmBengZhanObj.ShowDialog();
                    return;
                }
                if(e.Button.Text.Trim()=="�˳�ϵͳ")
                {
                    this.Close();
                    return;
                }
                if(e.Button.Text.Trim()=="��ˮ�鿴")
                {

                    this.showICSal();
                }

                CInsertMenu cInsertM=new CInsertMenu();

                if(!cInsertM.enableToolbar(e.Button.Text.Trim(),this.mainMenu1))
                {
                    MessageBox.Show("Ȩ�޲��㣡");
                    return;
                }

                if(e.Button.Text.Trim()=="���վ")
                {
                    this.mnuWell_Click(null,null);
                }
                if(e.Button.Text.Trim()=="��λ��Ϣ")
                {
                    this.mnuDep_Click(null,null);
                }
                if(e.Button.Text.Trim()=="�˳�ϵͳ")
                {
                    this.Close();
                }
                if(e.Button.Text.Trim()=="�û�����")
                {
                    Users.frmUsers frmUsersObj=new BengZhan.Users.frmUsers();
                    frmUsersObj.ShowDialog();
                }
                if(e.Button.Text.Trim()=="�û���Ȩ")
                {
                    Users.FrmMenuMana frmMeMaObj=new BengZhan.Users.FrmMenuMana();
                    frmMeMaObj.ShowDialog();
                }
                if(e.Button.Text.Trim()=="ʵʱ���")
                {
                    this.miniFrms();
                    this.showMonitor();
                }
                if(e.Button.Text.Trim()=="��ˮͳ��")
                {
                    try
                    {
                        New.cReport.frmSalRep frmSalR=new New.cReport.frmSalRep();
                        frmSalR.ShowDialog();
                    }
                    catch(Exception ex)
                    {
                        MessageBox.Show(ex.ToString());
                    }
                }
                if(e.Button.Text.Trim()=="��ʷ����")
                {
                    this.miniFrms();
                    if(this.showFrm("����ͼ��"))
                    {
                        return;
                    }
                    CReportDll.comReport.newRep.frmChart frmC=new CReportDll.comReport.newRep.frmChart();
                    frmC.MdiParent=this;
                    frmC.WindowState=System.Windows.Forms.FormWindowState.Maximized;
                    frmC.Show();
                    m_arrFrms.Add(frmC);
                }
                if(e.Button.Text.Trim()=="ϵͳ����")
                {
                    Help.ShowHelp(this,"help.chm");
                }
                if(e.Button.Text.Trim()=="��������")
                {
                        BengZhan.warn.frmWarnLevel  frmSWL=new BengZhan.warn.frmWarnLevel();
                        frmSWL.ShowDialog();
                }
                if(e.Button.Text.Trim()=="������ϸ")
                {

                    frmWarn.Form1 frmWarnO=new frmWarn.Form1();
                    frmWarnO.m_strFormType="";
                    frmWarnO.ShowDialog();
                }
                if(e.Button.Text=="ʵʱ�鿴")
                {

                }
                if(e.Button.Text=="���㶨ʱ")
                {
                    if(this.ActiveMdiChild!=null)
                    {
                        MessageBox.Show("���ȹر��Ѵ򿪴���!");
                        return;
                        this.ActiveMdiChild.Close();
                    }
                    BengZhan.warn.onTimeSet.frmOnTimeSet   frmT=new BengZhan.warn.onTimeSet.frmOnTimeSet();
                    frmT.ShowDialog();
                }
                if(e.Button.Text.Trim()=="IC����ˮ")
                {
                    showICSale();
                }
                if(e.Button.Text.Trim()=="IC������")
                {
                    showICMana();
                }
                if(e.Button.Text.Trim()=="����ͳ��")
                {
                    this.miniFrms();
                    if(this.showFrm("���վ����ͳ��"))
                    {
                        return;
                    }
                    CReportDll.comReport.newRep.frmReport frmRepO=new CReportDll.comReport.newRep.frmReport();
                    frmRepO.MdiParent=this;
                    frmRepO.WindowState=System.Windows.Forms.FormWindowState.Maximized;
                    frmRepO.Show();
                    m_arrFrms.Add(frmRepO);

                }
                if(e.Button.Text.Trim()=="Ƿ������")
                {
                    CWarnDll.frmWarn.Form2 frmWarnTb=new CWarnDll.frmWarn.Form2();
                    frmWarnTb.ShowDialog();
                }
                if(e.Button.Text.Trim()=="������Ϣ")
                {
                    this.showGis();
                }
                if(e.Button.Text.Trim()=="����ͳ��")
                {
                    showSalSta();
                }
                if(e.Button.Text.Trim()=="�½�ͳ��")
                {
                    this.showYearStac();
                }
                if(e.Button.Text.Trim()=="���ͳ��")
                {

                }
                if(e.Button.Text.Trim()=="TM����ˮ")
                {
                    string strFileName=string.Format(@"test/test.exe",BengZhan.CDBConnection.m_strUserID);
                    System.Diagnostics.Process proc = new System.Diagnostics.Process();
                    proc.EnableRaisingEvents=false;

                    proc.StartInfo.FileName=strFileName;
                    proc.StartInfo.Arguments=BengZhan.CDBConnection.m_strUserID;
                //	proc.StartInfo.WindowStyle=ProcessWindowStyle.Minimized;
                    proc.Start();
                    System.IO.Directory.SetCurrentDirectory(Application.StartupPath);
                }
                if(e.Button.Text.Trim()=="���ͳ��")
                {
                    this.showYearStac1();
                }
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
예제 #4
0
파일: frmWaterSys.cs 프로젝트: hkiaipc/yh
 private void menuItem10_Click(object sender, System.EventArgs e)
 {
     this.miniFrms();
     if(this.showFrm("����ͼ��"))
     {
         return;
     }
     CReportDll.comReport.newRep.frmChart frmC=new CReportDll.comReport.newRep.frmChart();
     frmC.MdiParent=this;
     frmC.WindowState=System.Windows.Forms.FormWindowState.Maximized;
     frmC.Show();
     m_arrFrms.Add(frmC);
 }