Exemplo n.º 1
0
        private void gvData_DoubleClick(object sender, EventArgs e)
        {
            if (this.gvData.FocusedRowHandle != GridControl.InvalidRowHandle && this.gvData.FocusedColumn != null)
            {
                StrategyDataItemInfo info = (StrategyDataItemInfo)this.gvData.FocusedColumn.Tag;
                if (info.DetailInfo != null)
                {
                    info = info.DetailInfo;
                }
                if (info.Type != DataType.ChartData)
                {
                    return;
                }
                info.Value = gvData.GetFocusedRow();
                ChartControl chart = new ChartControl()
                {
                    Dock = DockStyle.Fill
                };

                chart.BeginInit();
                XYDiagram dia = new XYDiagram();
                chart.Diagram = dia;

                StrategyDataVisualiser visualiser = new StrategyDataVisualiser();
                XtraTabPage            page       = new XtraTabPage();
                page.Text = info.Name;
                page.Controls.Add(chart);
                visualiser.Visualize(info, null, chart);
                chart.EndInit();

                this.tabControl.TabPages.Add(page);
            }
        }
Exemplo n.º 2
0
 private void SimpleGrip_OnHistogramResultPoints(object sender, Infrastructure.FrameCapture.CaptureArgs <List <Point> > e)
 {
     chartResLink.Dispatcher.Invoke(() => {
         chartResLink.BeginInit();
         PointsRes = e.Result;
         chartResLink.EndInit();
     });
 }
Exemplo n.º 3
0
        private void UpdateData(ChartControl chart)
        {
            chart.BeginInit();

            foreach (Series series in chart.Diagram.Series)
            {
                series.Points.Clear();

                for (int i = 0; i <= 100; i++)
                {
                    SeriesPoint p = new SeriesPoint(i, rnd.Next(50, 100));
                    series.Points.Add(p);
                }
            }

            chart.EndInit();
        }
Exemplo n.º 4
0
 public static void init2YData(Chart2YDataVo oDataVo, ChartControl oChart)
 {
     oChart.BeginInit();
     oChart.DataSource = oDataVo;
     oChart.EndInit();
 }