Esempio n. 1
0
        public virtual void Save()
        {
            IRow row = null;

            if (this.OID == -1)
            {
                row      = this.MapTemplateGallery.MapTemplateElementTable.CreateRow();
                this.OID = row.OID;
            }
            else
            {
                row = this.MapTemplateGallery.MapTemplateElementTable.GetRow(this.OID);
            }
            RowAssisant.SetFieldValue(row, "Name", this.Name);
            RowAssisant.SetFieldValue(row, "ElementType", base.GetType().ToString());
            RowAssisant.SetFieldValue(row, "Element", this.CloneElement(this.Element));
            RowAssisant.SetFieldValue(row, "TemplateID", this.MapTemplate.OID);
            RowAssisant.SetFieldValue(row, "Location", this.ElementLocation.ToString());
            RowAssisant.SetFieldValue(row, "TemplateGuid", this.TempleteGuid);
            IPropertySet propertySet = this.PropertySet;

            if (propertySet != null)
            {
                RowAssisant.SetFieldValue(row, "Attributes", this.method_2(propertySet));
            }
            row.Store();
        }
Esempio n. 2
0
 public MapTemplateClass(int int_1, MapCartoTemplateLib.MapTemplateGallery mapTemplateGallery_1)
 {
     this.OID = int_1;
     this.MapTemplateGallery = mapTemplateGallery_1;
     if (int_1 == -1)
     {
         this.Guid = System.Guid.NewGuid().ToString();
     }
     else
     {
         IRow row = null;
         row = this.MapTemplateGallery.MapTemplateClassTable.GetRow(this.OID);
         try
         {
             this.Guid = RowAssisant.GetFieldValue(row, "Guid").ToString();
         }
         catch
         {
         }
         if (string.IsNullOrEmpty(this.Guid))
         {
             this.Guid = System.Guid.NewGuid().ToString();
             RowAssisant.SetFieldValue(row, "Guid", this.Guid);
             row.Store();
         }
     }
 }
Esempio n. 3
0
 public void Load()
 {
     if (this.OID != -1)
     {
         IRow row = null;
         row                = this.MapTemplateGallery.MapTemplateParamTable.GetRow(this.OID);
         this.Name          = RowAssisant.GetFieldValue(row, "Name").ToString();
         this.AllowNull     = Convert.ToInt32(RowAssisant.GetFieldValue(row, "AllowNull")) == 1;
         this.ParamDataType = (DataType)Convert.ToInt32(RowAssisant.GetFieldValue(row, "DataType"));
         this.Description   = RowAssisant.GetFieldValue(row, "Description").ToString();
     }
 }
Esempio n. 4
0
 protected virtual void Initlize()
 {
     if (this.OID != -1)
     {
         IRow row = this.MapTemplateGallery.MapTemplateElementTable.GetRow(this.OID);
         this.Name       = RowAssisant.GetFieldValue(row, "Name").ToString();
         this.m_pElement = this.method_1(RowAssisant.GetFieldValue(row, "Element"));
         if (this.m_pElement is IMapSurroundFrame)
         {
             this.Style = (this.m_pElement as IMapSurroundFrame).MapSurround;
         }
         string str = RowAssisant.GetFieldValue(row, "Location").ToString();
         this.ElementLocation = new MapCartoTemplateLib.ElementLocation(str);
         IPropertySet set = this.method_3(RowAssisant.GetFieldValue(row, "Attributes"));
         if (set != null)
         {
             this.PropertySet = set;
         }
     }
 }
Esempio n. 5
0
        public void Save()
        {
            IRow row = null;

            if (this.OID == -1)
            {
                row = this.MapTemplateGallery.MapTemplateParamTable.CreateRow();
                RowAssisant.SetFieldValue(row, "MapTemplateOID", this.MapTemplate.OID);
                this.OID = row.OID;
            }
            else
            {
                row = this.MapTemplateGallery.MapTemplateParamTable.GetRow(this.OID);
            }
            RowAssisant.SetFieldValue(row, "Name", this.Name);
            RowAssisant.SetFieldValue(row, "Description", this.Description);
            RowAssisant.SetFieldValue(row, "AllowNull", this.AllowNull ? 1 : 0);
            RowAssisant.SetFieldValue(row, "DataType", (int)this.ParamDataType);
            RowAssisant.SetFieldValue(row, "TemplateGuid", this.TempleteGuid);
            row.Store();
        }