Exemplo n.º 1
0
        protected override void OnMouseMove(MouseEventArgs e)
        {
            if (e.Button == MouseButtons.None)
            {
                _panelsMouseMove.Clear();
                for (int i = 0; i < _chartPanelCollection.Count; i++)
                {
                    ChartPanel panel = _chartPanelCollection[i];
                    if (panel.Bounds.Contains(e.Location))
                    {
                        _panelsMouseMove.Add(panel);
                        panel.WmMouseMove(this.MouseEventToClient(panel, e));
                    }
                }
            }
            else
            {
                for (int i = 0; i < _panelsMouseMove.Count; i++)
                {
                    ChartPanel panel = _panelsMouseMove[i];
                    panel.WmMouseMove(this.MouseEventToClient(panel, e));
                }
            }

            base.OnMouseMove(e);
        }
Exemplo n.º 2
0
 internal void Insert(int index, ChartPanel item)
 {
     _listChartPanel.Insert(index, item);
     SyncronyzedChartBoxesCollection();
     this.ChartPanels.SyncTabIndex();
     this.InitChartPanel(item);
 }
Exemplo n.º 3
0
        private MouseEventArgs MouseEventToClient(ChartPanel panel, MouseEventArgs e)
        {
            int x = e.X - panel.Left;
            int y = e.Y - panel.Top;

            return(new MouseEventArgs(e.Button, e.Clicks, x, y, e.Delta));
        }
Exemplo n.º 4
0
 private void InitChartPanel(ChartPanel chartPanel)
 {
     chartPanel.SetOwner(this);
     this.SelectedIndex = -1;
     this.ChartPanels.SyncTabIndex();
     this.OnChartPanelAdded(new ChartPanelEventArgs(chartPanel));
     this.Invalidate();
 }
Exemplo n.º 5
0
        internal bool Remove(ChartPanel item)
        {
            bool ret = _listChartPanel.Remove(item);

            SyncronyzedChartBoxesCollection();
            this.SelectedIndex = -1;
            this.ChartPanels.SyncTabIndex();
            this.OnChartPanelRemoved(new ChartPanelEventArgs(item));
            return(ret);
        }
Exemplo n.º 6
0
 internal int FindChartPanel(ChartPanel panel)
 {
     for (int i = 0; i < _listChartPanel.Count; i++)
     {
         if (_listChartPanel.Equals(panel))
         {
             return(i);
         }
     }
     return(-1);
 }
Exemplo n.º 7
0
 public ChartPanel GetChartPanel(Point p)
 {
     for (int i = 0; i < _chartPanelCollection.Count; i++)
     {
         ChartPanel panel = _chartPanelCollection[i];
         if (panel.Bounds.Contains(p))
         {
             return(panel);
         }
     }
     return(null);
 }
Exemplo n.º 8
0
 protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e)
 {
     for (int i = 0; i < _chartPanelCollection.Count; i++)
     {
         ChartPanel panel = _chartPanelCollection[i];
         if (panel.Bounds.Contains(e.Location))
         {
             panel.WmMouseDown(this.MouseEventToClient(panel, e));
         }
     }
     base.OnMouseDown(e);
 }
Exemplo n.º 9
0
        private ChartPanel[] GetChartPanels(Type type)
        {
            List <ChartPanel> list = new List <ChartPanel>();

            for (int i = 0; i < _listChartPanel.Count; i++)
            {
                ChartPanel panel = _listChartPanel[i];
                if (panel.GetType() == type)
                {
                    list.Add(panel);
                }
            }
            return(list.ToArray());
        }
Exemplo n.º 10
0
 public ChartPanelEventArgs(ChartPanel chartPanel)
     : base()
 {
     _chartPanel = chartPanel;
 }
Exemplo n.º 11
0
 internal void Add(ChartPanel item)
 {
     _listChartPanel.Add(item);
     SyncronyzedChartBoxesCollection();
     this.InitChartPanel(item);
 }
Exemplo n.º 12
0
        internal void RemoveAt(int index)
        {
            ChartPanel chartPanel = _listChartPanel[index];

            this.Remove(chartPanel);
        }