private ChartControl ShowChartForm(IStrategyDataItemInfoOwner visual, StrategyDataVisualiser visualiser, bool showInSeparateForm)
        {
            Crypto.UI.Forms.ChartDataControl control = new Crypto.UI.Forms.ChartDataControl();
            control.Dock   = DockStyle.Fill;
            control.Visual = visual;
            control.AnnotationDoubleClick += OnChartAnnotationDoubleClick;

            visualiser.GetControl -= OnVisulizerGetControl;
            visualiser.GetControl += OnVisulizerGetControl;
            visualiser.Visualize(control.Chart);

            if (showInSeparateForm)
            {
                XtraForm form = new XtraForm();
                form.Text = visual.Name;
                form.Controls.Add(control);
                form.Show();
                return(control.Chart);
            }
            DockPanel panel = new DockPanel();

            panel.DockedAsTabbedDocument = true;
            panel.ID   = Guid.NewGuid();
            panel.Text = visual.Name + " - Data Chart";
            panel.Controls.Add(control);
            //panel.FloatForm.Size = new Size((int)(Size.Width * 0.8), (int)(Size.Height * 0.8));
            this.dockManager1.RootPanels.AddRange(new DockPanel[] { panel });
            panel.Show();
            return(control.Chart);
        }
Beispiel #2
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();
        }