예제 #1
0
 protected override void OnGotFocus(EventArgs e)
 {
     base.OnGotFocus(e);
     if (ChartBox != null && ChartBox.CanFocus)
     {
         ChartBox.Focus();
     }
 }
예제 #2
0
        public void InvalidateChart(Region region, bool realTime)
        {
            if (CustomDoubleBuffer && !realTime)
            {
                DisposeBmpBuffer();
            }

            if (ChartBox != null)
            {
                ChartBox.Invalidate(region);
            }
        }
예제 #3
0
        public virtual void InvalidateChart(Rectangle rect, bool realTime)
        {
            if (CustomDoubleBuffer && !realTime)
            {
                DisposeBmpBuffer();
            }

            if (ChartBox != null)
            {
                ChartBox.Invalidate(rect);
            }
        }
예제 #4
0
        void ChartBox_MouseDown(object sender, MouseEventArgs e)
        {
            if (!ChartBox.Focused && ChartBox.CanFocus)
            {
                ChartBox.Focus();
            }
            ChartMouseDownButton = e.Button;
            ChartMouseDownPoint  = new Point(e.X, e.Y);

            if (Layers.Count > 0)
            {
                ExMouseEventArgs ee = new ExMouseEventArgs(e);
                foreach (ChartLayer layer in Layers)
                {
                    layer.OnMouseDown(ee);
                    if (ee.Suppress)
                    {
                        return;
                    }
                }
            }

            OnChartMouseDown(e);
        }
예제 #5
0
 public Graphics GetRawGraphics()
 {
     return(ChartBox.CreateGraphics());
 }
예제 #6
0
        //protected override void OnLayout(LayoutEventArgs e)
        //{
        //    base.OnLayout(e);

        //    UpdateView();
        //}

        /// <summary>
        /// Point to Chart-Box
        /// </summary>
        /// <param name="pt">Mouse Point of Screen</param>
        /// <returns></returns>
        public Point PointToChartBox(Point pt)
        {
            return(ChartBox.PointToClient(pt));
        }