Пример #1
0
        public void Rotate(AxMap pMap, PointF rootPt, PointF fromPt, PointF toPt)
        {
            float num;
            float num2;

            pMap.ConvertCoord(ref num, ref num2, ref this.m_GocX, ref this.m_GocY, ConversionConstants.miMapToScreen);
            num  -= rootPt.X;
            num2 -= rootPt.Y;
            PointF rootPt2 = default(PointF);

            rootPt2.X = num;
            rootPt2.Y = num2;
            fromPt.X -= rootPt.X;
            fromPt.Y -= rootPt.Y;
            toPt.X   -= rootPt.X;
            toPt.Y   -= rootPt.Y;
            try
            {
                IEnumerator enumerator = this.m_GObjs.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    GraphicObject graphicObject = (GraphicObject)enumerator.Current;
                    graphicObject.Rotate(rootPt2, fromPt, toPt);
                }
            }
            finally
            {
                IEnumerator enumerator;
                if (enumerator is IDisposable)
                {
                    (enumerator as IDisposable).Dispose();
                }
            }
        }