Inheritance: IDrawable, IMovable
示例#1
0
文件: Graph.cs 项目: valmac/SQCharts
        public void Move(double x, double y, double dX, double dY)
        {
            switch (MoveStyle)
            {
            case EGraphMoveStyle.Graph:
                IEnumerator enumerator1 = Points.GetEnumerator();
                try
                {
                    while (enumerator1.MoveNext())
                    {
                        TMarker tmarker = (TMarker)enumerator1.Current;
                        tmarker.X += dX;
                        tmarker.Y += dY;
                    }
                    break;
                }
                finally
                {
                    IDisposable disposable = enumerator1 as IDisposable;
                    if (disposable != null)
                    {
                        disposable.Dispose();
                    }
                }

            case EGraphMoveStyle.Point:
                IEnumerator enumerator2 = Points.GetEnumerator();
                try
                {
                    while (enumerator2.MoveNext())
                    {
                        TMarker tmarker = (TMarker)enumerator2.Current;
                        if (tmarker.X == x && tmarker.Y == y)
                        {
                            tmarker.X += dX;
                            tmarker.Y += dY;
                            break;
                        }
                    }
                    break;
                }
                finally
                {
                    IDisposable disposable = enumerator2 as IDisposable;
                    if (disposable != null)
                    {
                        disposable.Dispose();
                    }
                }
            }
        }
示例#2
0
文件: Graph.cs 项目: valmac/SQCharts
 public void Add(TMarker marker)
 {
     Points.Add(marker);
     MinMax(marker.X, marker.Y);
 }
示例#3
0
 public void Add(TMarker marker)
 {
     Points.Add(marker);
     MinMax(marker.X, marker.Y);
 }