void masterPane_ParametersUpdatedEvent(ChartPane pane)
 {
     if (this.IsHandleCreated == false)
     {
         return;
     }
     UpdateMainChartPaneToolbar();
 }
        void graphicPane_DrawingSpaceUpdatedEvent(ChartPane pane)
        {// Drawing space or Drawing space view was changed - update.
            RectangleF actualDrawingSpaceView = mainChartPane.GraphicsWrapper.ActualSpaceToDrawingSpace(mainChartPane.ActualDrawingSpaceArea);

            int width  = (int)(mainChartPane.DrawingSpaceDisplayLimit.Width - actualDrawingSpaceView.Width);
            int height = (int)(mainChartPane.DrawingSpaceDisplayLimit.Height - actualDrawingSpaceView.Height);

            if (width > 0)
            {
                this.hScrollBar.Maximum = width;
                hScrollBar.LargeChange  = hScrollBar.Maximum / 100 + 1;
                hScrollBar.SmallChange  = hScrollBar.Maximum / 1000 + 1;
            }
            this.hScrollBar.Enabled = (width > 0);

            if (height > 0)
            {
                this.vScrollBar.Maximum = height;
                vScrollBar.LargeChange  = vScrollBar.Maximum / 100 + 1;
                vScrollBar.SmallChange  = vScrollBar.Maximum / 1000 + 1;
            }
            this.vScrollBar.Enabled = (height > 0);

            int xLocation = (int)(actualDrawingSpaceView.X - mainChartPane.DrawingSpaceDisplayLimit.X);
            int yLocation = (int)(actualDrawingSpaceView.Y - mainChartPane.DrawingSpaceDisplayLimit.Y);

            if (xLocation > 0)
            {
                hScrollBar.Value = Math.Min(hScrollBar.Maximum, xLocation);
            }
            else
            {
                hScrollBar.Value = 0;
            }

            if (yLocation > 0 && vScrollBar.Maximum - yLocation > 0)
            {
                // Y bars operate in the other faship - top is top
                vScrollBar.Value = Math.Min(vScrollBar.Maximum, vScrollBar.Maximum - yLocation);
            }
            else
            {
                vScrollBar.Value = 0;
            }

            hScrollBar.Refresh();
            vScrollBar.Refresh();

            // Also Update the series in the Save To File button.
            //UpdateSaveToFileUI();
        }
Exemplo n.º 3
0
        public void control_AddIndicatorEvent(BasicIndicator indicator, ChartPane pane)
        {
            IndicatorChartSeries series = new IndicatorChartSeries(indicator.Name, indicator);

            if (pane == null)
            {
                pane = chartControl.CreateSlavePane(indicator.Name, SubChartPane.MainChartPaneSyncModeEnum.XAxis, this.Height / 4);
                pane.RightMouseButtonSelectionMode = ChartPane.SelectionModeEnum.HorizontalZoom;
                pane.Add(series);
            }
            else
            {
                pane.Add(series);
            }
        }
Exemplo n.º 4
0
 void mainChartPaneDrawingSpaceViewTransformationChangedEvent(ChartPane pane, Matrix previousTransformation, Matrix currentTransformation)
 {
     SynchronizeWithMainChartPane();
 }
Exemplo n.º 5
0
 void SlaveChartPane_DrawingSpaceViewTransformationChangedEvent(ChartPane pane, Matrix previousTransformation, Matrix currentTransformation)
 {
     UpdateMainChartSynchronizationState(false);
 }
Exemplo n.º 6
0
 void mainChartPaneAppearanceSchemeChangedEvent(ChartPane pane, AppearanceSchemeEnum scheme)
 {
     this.SetAppearanceScheme(scheme);
     this.Refresh();
 }
 /// <summary>
 /// 
 /// </summary>
 public CustomObjectsManager(ChartPane pane)
 {
     _pane = pane;
 }
 /// <summary>
 ///
 /// </summary>
 public CustomObjectsManager(ChartPane pane)
 {
     _pane = pane;
 }
 void masterPane_ParametersUpdatedEvent(ChartPane pane)
 {
     if (this.IsHandleCreated == false)
     {
         return;
     }
     UpdateMainChartPaneToolbar();
 }
 int masterPane_ActualDrawingSpaceMarginLeftUpdateEvent(ChartPane pane, int currentValue)
 {
     _requiredActualDrawingAreaLeftMargin = Math.Max(_requiredActualDrawingAreaLeftMargin, currentValue);
     return _requiredActualDrawingAreaLeftMargin;
 }
 void graphicPane_DrawingSpaceViewTransformationChangedEvent(ChartPane pane, System.Drawing.Drawing2D.Matrix previousTransformation, System.Drawing.Drawing2D.Matrix currentTransformation)
 {
     // Pane has changed its view.
     graphicPane_DrawingSpaceUpdatedEvent(pane);
     //toolStripLabelUnitUnification.Text = "Optimization: " + masterPane.CurrentUnitUnification;
 }
        void graphicPane_DrawingSpaceUpdatedEvent(ChartPane pane)
        {
            // Drawing space or Drawing space view was changed - update.

            RectangleF actualDrawingSpaceView = mainChartPane.GraphicsWrapper.ActualSpaceToDrawingSpace(mainChartPane.ActualDrawingSpaceArea);

            int width = (int)(mainChartPane.DrawingSpaceDisplayLimit.Width - actualDrawingSpaceView.Width);
            int height = (int)(mainChartPane.DrawingSpaceDisplayLimit.Height - actualDrawingSpaceView.Height);

            if (width > 0)
            {
                this.hScrollBar.Maximum = width;
                hScrollBar.LargeChange = hScrollBar.Maximum / 100 + 1;
                hScrollBar.SmallChange = hScrollBar.Maximum / 1000 + 1;
            }
            this.hScrollBar.Enabled = (width > 0);

            if (height > 0)
            {
                this.vScrollBar.Maximum = height;
                vScrollBar.LargeChange = vScrollBar.Maximum / 100 + 1;
                vScrollBar.SmallChange = vScrollBar.Maximum / 1000 + 1;
            }
            this.vScrollBar.Enabled = (height > 0);

            int xLocation = (int)(actualDrawingSpaceView.X - mainChartPane.DrawingSpaceDisplayLimit.X);
            int yLocation = (int)(actualDrawingSpaceView.Y - mainChartPane.DrawingSpaceDisplayLimit.Y);

            if (xLocation > 0)
            {
                hScrollBar.Value = Math.Min(hScrollBar.Maximum, xLocation);
            }
            else
            {
                hScrollBar.Value = 0;
            }

            if (yLocation > 0 && vScrollBar.Maximum - yLocation > 0)
            {
                // Y bars operate in the other faship - top is top
                vScrollBar.Value = Math.Min(vScrollBar.Maximum, vScrollBar.Maximum - yLocation);
            }
            else
            {
                vScrollBar.Value = 0;
            }

            hScrollBar.Refresh();
            vScrollBar.Refresh();

            // Also Update the series in the Save To File button.
            //UpdateSaveToFileUI();
        }
 void graphicPane_DrawingSpaceViewTransformationChangedEvent(ChartPane pane, System.Drawing.Drawing2D.Matrix previousTransformation, System.Drawing.Drawing2D.Matrix currentTransformation)
 {// Pane has changed its view.
     graphicPane_DrawingSpaceUpdatedEvent(pane);
     //toolStripLabelUnitUnification.Text = "Optimization: " + masterPane.CurrentUnitUnification;
 }
 int masterPane_ActualDrawingSpaceMarginLeftUpdateEvent(ChartPane pane, int currentValue)
 {
     _requiredActualDrawingAreaLeftMargin = Math.Max(_requiredActualDrawingAreaLeftMargin, currentValue);
     return(_requiredActualDrawingAreaLeftMargin);
 }
        public void control_AddIndicatorEvent(BasicIndicator indicator, ChartPane pane)
        {
            IndicatorChartSeries series = new IndicatorChartSeries(indicator.Name, indicator);

            if (pane == null)
            {
                pane = chartControl.CreateSlavePane(indicator.Name, SubChartPane.MainChartPaneSyncModeEnum.XAxis, this.Height / 4);
                pane.RightMouseButtonSelectionMode = ChartPane.SelectionModeEnum.HorizontalZoom;
                pane.Add(series);
            }
            else
            {
                pane.Add(series);
            }
        }