コード例 #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));
        }