Пример #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);
            }
        }
Пример #2
0
        private void ShowTableForm(IStrategyDataItemInfoOwner visual)
        {
            XtraForm        form    = new XtraForm();
            GridDataControl control = new GridDataControl();

            control.Grid.DoubleClick += OnGridControlDoubleClick;
            control.Dock              = DockStyle.Fill;
            form.Controls.Add(control);
            StrategyDataVisualiser visualiser = new StrategyDataVisualiser(visual);

            visualiser.Visualize(control.Grid);

            form.Text        = visual.Name + " - Data Table";
            form.MdiParent   = this;
            form.WindowState = FormWindowState.Maximized;
            form.Show();
        }
Пример #3
0
        private void ShowChartForm(IStrategyDataItemInfoOwner visual)
        {
            XtraForm         form    = new XtraForm();
            ChartDataControl control = new ChartDataControl();

            control.Dock   = DockStyle.Fill;
            control.Visual = visual;
            form.Controls.Add(control);
            StrategyDataVisualiser visualiser = new StrategyDataVisualiser(visual);

            visualiser.Visualize(control.Chart);

            form.Text        = visual.Name + " - Data Chart";
            form.MdiParent   = this;
            form.WindowState = FormWindowState.Maximized;
            form.Show();
        }
Пример #4
0
        protected virtual void OnVisualChanged()
        {
            Text = Visual.Name + " - Data";
            StrategyDataVisualiser visualizer = new StrategyDataVisualiser();

            visualizer.Visualize(Visual, this.gcData, this.chartControl);

            if (File.Exists(ChartSettingsFileName))
            {
                DetachePoints();
                this.chartControl.LoadFromFile(ChartSettingsFileName);
                AttachPoints();
            }
            if (this.chartControl.Series.Count == 0)
            {
                this.tpChartPage.Visible = false;
            }
        }