Ejemplo n.º 1
0
        private void 性能试验_Load(object sender, EventArgs e)
        {
            if (当前试验组信息.试验ID == 0)
            {
                return;
            }
            DataPvg.LoadDataPvg(500);
            this.数显仪表集合1.f_初始化所有仪表("试验数显配置\\潜水泵性能试验数显区配置.xml");
            logic = new GatherLogic();
            logic.Load("潜水泵性能试验", this, 当前试验组信息.试验ID, 1000, 10000);
            logic.LoadGrid(this.grid1, "潜水泵性能试验", string.Empty, "流量 desc", true);
            logic.TableComputer("潜水泵性能试验", "转速", new 额定转速计算());
            logic.TableComputer("潜水泵性能试验", "出口压力", new 出口压力计算());
            #region 注销代码
            //logic = new GatherLogic();
            //logic.Load("Test", this, 1, "序列1", "192.168.1.98", 5, 20);
            //DataTable tb2 = logic.GetReportTable("Test");
            //String[] columnNames = new string[] { "电压1", "电流1", "日期值", "时间值", "序列号" };
            //String[] columnIDs = new string[] { "电压1", "电流1", "日期值", "时间值", "序列1" };
            //String[] invisibleColumns = new string[] { "id,groupid" };
            //this.grid1.SetGridColumns(columnNames, columnIDs, invisibleColumns);
            //// this.grid1.ButtonPanelVisible = false;
            //grid1.SetReadOnly(false);
            //for (int i = 0; i < grid1.ExportView.Columns.Count; i++)
            //{
            //    grid1.ExportView.Columns[i].ColumnEdit = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();
            //    grid1.ExportView.Columns[i].OptionsColumn.AllowEdit = true;
            //}
            //this.grid1.SetDataSource(tb2);
            //this.grid1.BtnAddRowClick += new EventHandler(grid1_BtnAddRowClick);
            //this.grid1.BtnReduceRowClick += new EventHandler(grid1_BtnReduceRowClick);
            //this.grid1.Btn执行命令1Click += new EventHandler(grid1_Btn执行命令1Click);
            #endregion
            for (int j = 0; j < xyGraph1.Graph.Plots.Count; j++)
            {
                if (xyGraph1.Graph.Plots[j].Tag.ToString().Equals("H-Q-BS"))
                {
                    xyGraph1.Graph.Plots[j].PlotXY(全局缓存.当前试验组信息.水泵额定流量, 全局缓存.当前试验组信息.水泵额定扬程);
                }
            }

            xyGraph1.Invalidate();
        }