Exemplo n.º 1
0
 public override bool Equals(object obj)
 {
     XYChartArea.SeriesAxisKey seriesAxisKey = obj as XYChartArea.SeriesAxisKey;
     if (seriesAxisKey == null)
     {
         return(base.Equals(obj));
     }
     if (seriesAxisKey.Axis == this.Axis)
     {
         return(seriesAxisKey.Series == this.Series);
     }
     return(false);
 }
Exemplo n.º 2
0
        internal virtual void OnAxisScaleChanged(object sender, EventArgs e)
        {
            Axis axis = sender as Axis;

            this.UpdateSession.BeginUpdates();
            foreach (XYSeries xySeries in this.Series)
            {
                XYSeriesPresenter presenter = (XYSeriesPresenter)xySeries.SeriesPresenter;
                Action            action    = (Action)null;
                if (axis == xySeries.XAxis)
                {
                    action = (Action)(() => presenter.OnXScaleChanged());
                }
                else if (axis == xySeries.YAxis)
                {
                    action = (Action)(() => presenter.OnYScaleChanged());
                }
                if (action != null)
                {
                    if (this.ChartAreaPanel != null && this.ChartAreaPanel.IsDirty)
                    {
                        XYChartArea.SeriesAxisKey key = new XYChartArea.SeriesAxisKey()
                        {
                            Series = (Semantic.Reporting.Windows.Chart.Internal.Series)xySeries,
                            Axis   = axis
                        };
                        if (EnumerableFunctions.FindIndexOf <Tuple <object, Action> >((IEnumerable <Tuple <object, Action> >) this._updateActions, (Func <Tuple <object, Action>, bool>)(t => key.Equals(t.Item1))) == -1)
                        {
                            this._updateActions.Enqueue(new Tuple <object, Action>((object)key, action));
                        }
                    }
                    else
                    {
                        action();
                    }
                }
            }
            this.UpdateSession.EndUpdates();
        }
Exemplo n.º 3
0
 internal virtual void OnAxisScaleChanged(object sender, EventArgs e)
 {
     Axis axis = sender as Axis;
     this.UpdateSession.BeginUpdates();
     foreach (XYSeries xySeries in this.Series)
     {
         XYSeriesPresenter presenter = (XYSeriesPresenter)xySeries.SeriesPresenter;
         Action action = (Action)null;
         if (axis == xySeries.XAxis)
             action = (Action)(() => presenter.OnXScaleChanged());
         else if (axis == xySeries.YAxis)
             action = (Action)(() => presenter.OnYScaleChanged());
         if (action != null)
         {
             if (this.ChartAreaPanel != null && this.ChartAreaPanel.IsDirty)
             {
                 XYChartArea.SeriesAxisKey key = new XYChartArea.SeriesAxisKey()
                 {
                     Series = (Semantic.Reporting.Windows.Chart.Internal.Series)xySeries,
                     Axis = axis
                 };
                 if (EnumerableFunctions.FindIndexOf<Tuple<object, Action>>((IEnumerable<Tuple<object, Action>>)this._updateActions, (Func<Tuple<object, Action>, bool>)(t => key.Equals(t.Item1))) == -1)
                     this._updateActions.Enqueue(new Tuple<object, Action>((object)key, action));
             }
             else
                 action();
         }
     }
     this.UpdateSession.EndUpdates();
 }