Esempio n. 1
0
 public void SetObjects(object object_0)
 {
     this.mapTemplateElement_0 = object_0 as MapTemplateElement;
     this.imapSurroundFrame_0  = this.mapTemplateElement_0.Element as IMapSurroundFrame;
     if (this.imapSurroundFrame_0 != null)
     {
         this.inorthArrow_0 = (this.imapSurroundFrame_0.MapSurround as IClone).Clone() as INorthArrow;
     }
 }
Esempio n. 2
0
 public void SetObjects(object object_0)
 {
     this.mapTemplateElement_0 = object_0 as MapTemplateElement;
     this.imapSurroundFrame_0  = this.mapTemplateElement_0.Element as IMapSurroundFrame;
     if (this.imapSurroundFrame_0 != null)
     {
         m_pScaleBar = (this.imapSurroundFrame_0.MapSurround as IClone).Clone() as IScaleBar;
     }
 }
 public void SetObjects(object object_0)
 {
     this.mapTemplateElement_0 = object_0 as MapTemplateElement;
     this.imapSurroundFrame_0  = this.mapTemplateElement_0.Element as IMapSurroundFrame;
     if (MapCartoTemplateLib.ScaleBarFormatPropertyPage.m_pScaleBar == null)
     {
         MapCartoTemplateLib.ScaleBarFormatPropertyPage.m_pScaleBar =
             (this.imapSurroundFrame_0.MapSurround as IClone).Clone() as IScaleBar;
     }
 }
 public void SetObjects(object object_0)
 {
     this.mapTemplateElement_0 = object_0 as MapTemplateElement;
     this.imapSurroundFrame_0  = this.mapTemplateElement_0.Element as IMapSurroundFrame;
     if ((this.imapSurroundFrame_0 != null) && (ScaleTextFormatPropertyPage.m_pScaleText == null))
     {
         ScaleTextFormatPropertyPage.m_pScaleText =
             (this.imapSurroundFrame_0.MapSurround as IClone).Clone() as IScaleText;
     }
 }
Esempio n. 5
0
 public virtual void CopyTo(MapTemplateElement pElement)
 {
     pElement.Name = this.Name;
     if (this.Element != null)
     {
         pElement.Element = (this.Element as IClone).Clone() as IElement;
     }
     pElement.ElementLocation = this.ElementLocation.Clone();
     if (this.Style != null)
     {
         if (this.Style is IClone)
         {
             pElement.Style = (this.Style as IClone).Clone();
         }
         else
         {
             pElement.Style = this.Style;
         }
     }
 }
Esempio n. 6
0
        public static MapTemplateElement CreateMapTemplateElement(IPropertySet pPropertySet,
                                                                  MapCartoTemplateLib.MapTemplate pMapTemplate)
        {
            string typeName = Convert.ToString(pPropertySet.GetProperty("ElementType"));

            MapCartoTemplateLib.MapTemplateGallery mapTemplateGallery = pMapTemplate.MapTemplateGallery;
            Type type = Type.GetType(typeName);

            try
            {
                MapTemplateElement element =
                    Activator.CreateInstance(type, new object[] { -1, pMapTemplate }) as MapTemplateElement;
                element.Load(pPropertySet);
                return(element);
            }
            catch (Exception)
            {
            }
            return(null);
        }
Esempio n. 7
0
        public static MapTemplateElement CreateMapTemplateElement(int id,
                                                                  MapCartoTemplateLib.MapTemplate pMapTemplate)
        {
            MapCartoTemplateLib.MapTemplateGallery mapTemplateGallery = pMapTemplate.MapTemplateGallery;
            IRow row = null;

            row = mapTemplateGallery.MapTemplateElementTable.GetRow(id);
            int  index = row.Fields.FindField("ElementType");
            Type type  = Type.GetType(row.get_Value(index).ToString());

            try
            {
                MapTemplateElement element =
                    Activator.CreateInstance(type, new object[] { id, pMapTemplate }) as MapTemplateElement;
                element.Initlize();
                return(element);
            }
            catch (Exception)
            {
            }
            return(null);
        }