Ejemplo n.º 1
0
 private void btnData_Click(object sender, System.EventArgs e)
 {
     if (bolCurve)
     {
         frmCurveData f = new frmCurveData(m_Curve, cmbStation.Text, ds, m_Begin, m_End);
         f.ShowDialog();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tvUser_DoubleClick(object sender, System.EventArgs e)
        {
            try
            {
                if (tvUser.SelectedNode != null)
                {
                    if (tvUser.SelectedNode.Text == "地图信息")
                    {
                        if (this.checkChildFrmExist("地图监视") == true)
                        {
                            return;
                        }
                        btGR.frmGisMain f = new frmGisMain();
                        f.Text        = "地图监视";
                        f.MdiParent   = this;
                        f.WindowState = FormWindowState.Maximized;
                        //f.FormBorderStyle=System.Windows.Forms.FormBorderStyle.None;
                        f.Show();
                    }
                    // 巡更系统菜单
                    if (tvUser.SelectedNode.Text == "TM卡管理")
                    {
                        //if(this.checkChildFrmExist("TM卡管理")==true)
                        //{
                        //return;
                        //}

                        if (this.UIEventHandler != null)
                        {
                            UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs(UIFunctionCode.XGTMCardManager, null);
                            UIEventHandler(this, args);
                        }
                    }
                    //if(tvUser.SelectedNode.Text=="任务管理")
                    //{
                    //if(this.checkChildFrmExist("任务管理")==true)
                    //{
                    //return;
                    //}
                    //if ( this.UIEventHandler != null )
                    //{
                    //UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs( UIFunctionCode.XGTaskManager , null );
                    //UIEventHandler( this, args );
                    //}
                    //
                    //}
                    if (tvUser.SelectedNode.Text == "数据管理")
                    {
                        if (this.checkChildFrmExist("巡更数据管理") == true)
                        {
                            return;
                        }
                        if (this.UIEventHandler != null)
                        {
                            UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs(UIFunctionCode.XGDataManager, null);
                            UIEventHandler(this, args);
                        }
                    }
                    //if(tvUser.SelectedNode.Text=="任务执行结果")
                    //{
                    //if(this.checkChildFrmExist("巡更任务执行结果")==true)
                    //{
                    //return;
                    //}
                    //
                    //if ( this.UIEventHandler != null )
                    //{
                    //UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs( UIFunctionCode.XGTaskResultManager , null );
                    //UIEventHandler( this, args );
                    //
                    //}
                    //}

                    //供热系统菜单
                    if (tvUser.SelectedNode.Text == "采集设置")
                    {
                        //						if(this.checkChildFrmExist("供热系统采集设置")==true)
                        //							return;
                        if (this.UIEventHandler != null)
                        {
                            UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs(UIFunctionCode.GRCollSet, null);
                            UIEventHandler(this, args);
                        }
                    }

                    if (tvUser.SelectedNode.Text == "补水数据")
                    {
                        if (this.checkChildFrmExist("补水数据查询") == true)
                        {
                            return;
                        }
                        frmAddPumpDatas f = new frmAddPumpDatas();
                        f.Text        = "补水数据查询";
                        f.MdiParent   = this;
                        f.WindowState = FormWindowState.Maximized;
                        f.Show();
                    }

                    if (tvUser.SelectedNode.Text == "报警数据")
                    {
                        /////////
                        if (this.UIEventHandler != null)
                        {
                            UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs(UIFunctionCode.GRAlarmDataManager, null);
                            UIEventHandler(this, args);
                        }
                    }

                    if (tvUser.SelectedNode.Text == "实时数据")
                    {
                        //if(this.checkChildFrmExist("供热系统实时采集数据")==true)
                        //{
                        //return;
                        //}
                        if (this.UIEventHandler != null)
                        {
                            UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs(UIFunctionCode.GRRealDataManager, null);
                            UIEventHandler(this, args);
                        }
                    }

                    if (tvUser.SelectedNode.Text == "一次网回水数据")
                    {
                        if (this.checkChildFrmExist("一次网回水数据") == true)
                        {
                            return;
                        }
                        Curve.frmCurveData f = new Curve.frmCurveData();
                        f.Text = "一次网回水数据";
                        f.ShowDialog();
                    }


                    if (tvUser.SelectedNode.Text == "历史数据")
                    {
                        if (this.checkChildFrmExist("供热系统数据查询") == true)
                        {
                            return;
                        }

                        //DataCurve.Grid.frmData f=new DataCurve.Grid.frmData();
                        //f.Text="供热系统数据查询";
                        //f.ShowDialog();
                        Grid.frmDataPrint f = new Grid.frmDataPrint();
                        f.Text        = "供热系统数据查询";
                        f.MdiParent   = this;
                        f.WindowState = FormWindowState.Maximized;
                        f.Show();
                    }

                    if (tvUser.SelectedNode.Text == "历史曲线")
                    {
                        if (this.checkChildFrmExist("供热系统数据曲线") == true)
                        {
                            return;
                        }
                        Curve.frmCurve f = new Curve.frmCurve();
                        f.Text        = "供热系统数据曲线";
                        f.MdiParent   = this;
                        f.WindowState = FormWindowState.Maximized;
                        f.Show();
                    }

                    //报表
                    if (tvUser.SelectedNode.Text == "热媒参数统计日报表")
                    {
                        if (this.checkChildFrmExist("热媒参数统计日报表") == true)
                        {
                            return;
                        }
                        frmRMDatas f = new frmRMDatas();
                        f.Text        = "热媒参数统计日报表";
                        f.MdiParent   = this;
                        f.WindowState = FormWindowState.Maximized;
                        f.Show();
                    }

                    if (tvUser.SelectedNode.Text == "补水参数统计分析报表")
                    {
                        if (this.checkChildFrmExist("补水参数统计分析报表") == true)
                        {
                            return;
                        }
                        frmAddPumpDatas f = new frmAddPumpDatas();
                        f.Text        = "补水参数统计分析报表";
                        f.MdiParent   = this;
                        f.WindowState = FormWindowState.Maximized;
                        f.Show();
                    }

                    if (tvUser.SelectedNode.Text == "厂统计室数据分析报表")
                    {
                        if (this.checkChildFrmExist("厂统计室数据分析报表") == true)
                        {
                            return;
                        }
                        frmFactoryDatas f = new frmFactoryDatas();
                        f.Text        = "厂统计室数据分析报表";
                        f.MdiParent   = this;
                        f.WindowState = FormWindowState.Maximized;
                        f.Show();
                    }
                    if (tvUser.SelectedNode.Text == "热量模拟曲线分析")
                    {
                        if (this.checkChildFrmExist("热量模拟曲线") == true)
                        {
                            return;
                        }
                        Curve.frmModelCurve f = new Curve.frmModelCurve();
                        f.Text        = "热量模拟曲线";
                        f.MdiParent   = this;
                        f.WindowState = FormWindowState.Maximized;
                        f.Show();
                    }


                    if (tvUser.SelectedNode.Text == "用户管理")
                    {
                        if (this.checkChildFrmExist("用户管理") == true)
                        {
                            return;
                        }
                        User.frmUser f = new User.frmUser();
                        f.Text        = "用户管理";
                        f.MdiParent   = this;
                        f.WindowState = FormWindowState.Maximized;
                        f.Show();
                    }
                    if (tvUser.SelectedNode.Text == "站点管理")
                    {
                        if (this.checkChildFrmExist("站点管理") == true)
                        {
                            return;
                        }
                        if (this.UIEventHandler != null)
                        {
                            UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs(UIFunctionCode.StationManager, null);
                            UIEventHandler(this, args);
                        }
                    }

                    if (tvUser.SelectedNode.Text == "GPRS管理")
                    {
                        //						if(this.checkChildFrmExist("GPRS连接管理")==true)
                        //							return;
                        if (this.UIEventHandler != null)
                        {
                            UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs(UIFunctionCode.GprsConnManager, null);
                            UIEventHandler(this, args);
                        }
                    }

                    if (tvUser.SelectedNode.Text == "远程控制")
                    {
                        if (this.UIEventHandler != null)
                        {
                            UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs(UIFunctionCode.GRCtrlSet, null);
                            UIEventHandler(this, args);
                        }
                    }

                    if (tvUser.SelectedNode.Text == "室外温度设置")
                    {
                        if (this.UIEventHandler != null)
                        {
                            UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs(UIFunctionCode.GRSetOutSideTemperature, null);
                            UIEventHandler(this, args);
                        }
                    }

                    if (tvUser.SelectedNode.Text == "巡更时间设置")
                    {
                        if (this.UIEventHandler != null)
                        {
                            UICOMM.BTGRUIEventArgs args = new BTGRUIEventArgs(
                                UIFunctionCode.XGDateTimeSetting,
                                null
                                );
                            UIEventHandler(this, args);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "错误",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }