Пример #1
0
 public static void 绘制曲线(控件库.曲线控件.XYGraph graph, double[] 电压, double[] 电流, double[] 流量, double[] 进口压力, double[] 出口压力, double[] 转速, double[] 时间轴)
 {
     graph.Graph.Plots[0].PlotXY(时间轴, 电压);
     graph.Graph.Plots[1].PlotXY(时间轴, 电流);
     graph.Graph.Plots[2].PlotXY(时间轴, 流量);
     graph.Graph.Plots[3].PlotXY(时间轴, 进口压力);
     graph.Graph.Plots[4].PlotXY(时间轴, 出口压力);
     graph.Graph.Plots[5].PlotXY(时间轴, 转速);
 }
Пример #2
0
        public static void SaveImage(控件库.曲线控件.XYGraph g, string name, int width, int height)
        {
            Graphics g1 = g.CreateGraphics();
            Bitmap MyImage = new Bitmap(800, 800);
            Graphics g2 = Graphics.FromImage(MyImage);
            IntPtr dc3 = g1.GetHdc();
            IntPtr dc2 = g2.GetHdc();

            MyImage.Save("d:\\kk.jpg");
        }
Пример #3
0
        public static void LoadGrid(控件库.表格控件.Grid _Grid,string tbName)
        {
            GatherReport report = new GatherReport();
            GatherTable tab = report.GetReportTable(tbName);
            DevExpress.XtraEditors.Repository.RepositoryItemTextEdit text = null;
            for (int i = 0; i < _Grid.ExportBandView.Columns.Count; i++)
            {
                text = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();

                _Grid.ExportBandView.Columns[i].ColumnEdit = text;
                _Grid.ExportBandView.Columns[i].OptionsColumn.AllowEdit = true;
                tab.计算列准备(_Grid.ExportBandView.Columns[i].FieldName, _Grid, text);
            }
            DataTable tb2 = GetReportTable(tbName);
            _Grid.SetDataSource(tb2);
        }
Пример #4
0
 // Fliter过滤条件,sort是排序,order是否要加入自动序号
 public void LoadGrid(控件库.表格控件.Grid _Grid, string tbName, string Fliter,string sort,bool order)
 {
     this.isOrder = order;
     view = GatherFace.LoadGrid(_Grid, tbName, Fliter,sort,order);
 }
Пример #5
0
 public void LoadGrid(控件库.表格控件.Grid _Grid, string tbName)
 {
     GatherFace.LoadGrid(_Grid, tbName);
 }
Пример #6
0
 public void 计算列准备(控件库.表格控件.Grid _Grid,DevExpress.XtraEditors.Repository.RepositoryItemTextEdit edit)
 {
     this._Grid = _Grid;
     this.edit = edit;
 }
Пример #7
0
        public static DataView LoadGrid(控件库.表格控件.Grid _Grid, string tbName, string Fliter,string sort,bool order)
        {
            GatherReport report = new GatherReport();
            GatherTable tab = report.GetReportTable(tbName);
            DevExpress.XtraEditors.Repository.RepositoryItemTextEdit text = null;
            for (int i = 0; i < _Grid.ExportBandView.Columns.Count; i++)
            {
                text = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit();

                _Grid.ExportBandView.Columns[i].ColumnEdit = text;
                _Grid.ExportBandView.Columns[i].OptionsColumn.AllowEdit = true;
                tab.计算列准备(_Grid.ExportBandView.Columns[i].FieldName, _Grid, text);
            }
            DataTable tb2 = GetReportTable(tbName);
            if (order)
                tb2.Columns.Add("序号", typeof(int));
               DataView view = new DataView(tb2, Fliter,sort, DataViewRowState.CurrentRows);
               if (order)
               SetOrder(view);
            _Grid.SetDataSource(view);
            return view;
        }
Пример #8
0
 public void 计算列准备(string filedName, 控件库.表格控件.Grid _Grid, DevExpress.XtraEditors.Repository.RepositoryItemTextEdit edit)
 {
     int len = this.row.List.Count;
     for (int i = 0; i < len; i++)
     {
         if (this.row.List[i].field.FieldName == filedName)
         {
             this.row.List[i].计算列准备(_Grid, edit);
         }
     }
 }