Esempio n. 1
0
 public CSymbol(string pDesc, bool pBlinking, double pZoom, float pMWidth, double pGocX, double pGocY, CGraphicObjs pGObjs, float pHeading)
     : this()
 {
     this.m_GocX   = pGocX;
     this.m_GocY   = pGocY;
     this.m_Zoom   = pZoom;
     this.m_MWidth = pMWidth;
     this.m_GObjs  = new CGraphicObjs();
     try
     {
         IEnumerator enumerator = pGObjs.GetEnumerator();
         while (enumerator.MoveNext())
         {
             GraphicObject graphicObject = (GraphicObject)enumerator.Current;
             this.m_GObjs.Add(graphicObject.Clone());
         }
     }
     finally
     {
         IEnumerator enumerator;
         if (enumerator is IDisposable)
         {
             (enumerator as IDisposable).Dispose();
         }
     }
     this.m_Description = pDesc;
     this.m_Blinking    = pBlinking;
     this.Heading       = pHeading;
 }
Esempio n. 2
0
        public CSymbol(AxMap pMap, CGraphicObjs pGObjs)
            : this()
        {
            float num  = 0f;
            float num2 = 0f;

            pMap.ConvertCoord(ref num, ref num2, ref this.m_GocX, ref this.m_GocY, ConversionConstants.miScreenToMap);
            this.m_Zoom   = pMap.Zoom;
            this.m_MWidth = pMap.MapScreenWidth;
            this.m_GObjs  = new CGraphicObjs();
            try
            {
                IEnumerator enumerator = pGObjs.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    GraphicObject graphicObject = (GraphicObject)enumerator.Current;
                    this.m_GObjs.Add(graphicObject.Clone());
                }
            }
            finally
            {
                IEnumerator enumerator;
                if (enumerator is IDisposable)
                {
                    (enumerator as IDisposable).Dispose();
                }
            }
            this.m_Description = "";
            this.m_Blinking    = false;
        }
Esempio n. 3
0
        public CSymbol(AxMap pMap, PointF pt0, CGraphicObjs pGObjs, double pZoom, float pMWidth)
            : this()
        {
            float x = pt0.X;
            float y = pt0.Y;

            pMap.ConvertCoord(ref x, ref y, ref this.m_GocX, ref this.m_GocY, ConversionConstants.miScreenToMap);
            pt0.Y         = y;
            pt0.X         = x;
            this.m_Zoom   = pZoom;
            this.m_MWidth = pMWidth;
            this.m_GObjs  = new CGraphicObjs();
            try
            {
                IEnumerator enumerator = pGObjs.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    GraphicObject graphicObject = (GraphicObject)enumerator.Current;
                    this.m_GObjs.Add(graphicObject.Clone());
                }
            }
            finally
            {
                IEnumerator enumerator;
                if (enumerator is IDisposable)
                {
                    (enumerator as IDisposable).Dispose();
                }
            }
            this.m_Description = "";
            this.m_Blinking    = false;
        }
Esempio n. 4
0
        private void LoadSymbols()
        {
            base.ClearModels();
            base.ClearBillboards();
            this.m_Symbol3Objs.Clear();
            double num;
            double num2;

            checked
            {
                num  = Convert.ToDouble(decimal.Multiply(new decimal(this.m_TexImage.Width), new decimal(1000L))) / (double)(modSaBan.myGRID_WIDTH - 1) / 1000.0;
                num2 = Convert.ToDouble(decimal.Multiply(new decimal(this.m_TexImage.Height), new decimal(1000L))) / (double)(modSaBan.myGRID_HEIGHT - 1) / 1000.0;
                Graphics graphics = Graphics.FromImage(this.m_TexImage);
            }
            try
            {
                IEnumerator enumerator = myModule.fMain.myBando.drawingSymbols.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    CSymbol cSymbol      = (CSymbol)enumerator.Current;
                    PointF  surfPosition = modSaBan.GetSurfPosition(cSymbol.GocX, cSymbol.GocY);
                    float   valueX       = (float)((double)surfPosition.X / num);
                    float   valueY       = (float)((double)(checked (modSaBan.myGRID_HEIGHT - 1)) - (double)surfPosition.Y / num2);
                    float   dHeading     = -CTerrain.DegreeToRadian(cSymbol.Heading);
                    Vector3 pPos         = new Vector3(valueX, valueY, -7f);
                    int     num3         = base.GetModelMeshIndex(cSymbol.Description);
                    if (num3 > -1)
                    {
                        base.Load1Model(cSymbol.Description, num3, pPos, dHeading);
                    }
                    else
                    {
                        num3 = base.GetBillboardMeshIndex(cSymbol.Description);
                        if (num3 > -1)
                        {
                            base.Load1Billboard(cSymbol.Description, num3, pPos, dHeading);
                        }
                        else
                        {
                            double       zoom         = cSymbol.Zoom / (double)cSymbol.MWidth * (modSaBan.my3DSoPixelsPer1000m / 1000.0);
                            CGraphicObjs cGraphicObjs = new CGraphicObjs();
                            try
                            {
                                IEnumerator enumerator2 = cSymbol.GObjs.GetEnumerator();
                                while (enumerator2.MoveNext())
                                {
                                    GraphicObject graphicObject = (GraphicObject)enumerator2.Current;
                                    GraphicObject aGObj         = graphicObject.Clone();
                                    cGraphicObjs.Add(aGObj);
                                }
                            }
                            finally
                            {
                                IEnumerator enumerator2;
                                if (enumerator2 is IDisposable)
                                {
                                    (enumerator2 as IDisposable).Dispose();
                                }
                            }
                            CSymbol3 cSymbol2 = new CSymbol3(cSymbol.Description, surfPosition, cGraphicObjs);
                            cSymbol2.Zoom    = zoom;
                            cSymbol2.Heading = cSymbol.Heading;
                            this.m_Symbol3Objs.Add(cSymbol2);
                        }
                    }
                }
            }
            finally
            {
                IEnumerator enumerator;
                if (enumerator is IDisposable)
                {
                    (enumerator as IDisposable).Dispose();
                }
            }
        }