コード例 #1
0
 public void RemoveMapTemplateClass(MapCartoTemplateLib.MapTemplateClass templateClass)
 {
     if (((templateClass != null) && (this._lstTemplates != null)) && this._lstTemplates.Contains(templateClass))
     {
         this._lstTemplates.Remove(templateClass);
     }
 }
コード例 #2
0
 public void AddMapTemplateClass(MapCartoTemplateLib.MapTemplateClass mapTemplateClass)
 {
     if (mapTemplateClass != null)
     {
         if (this._lstTemplates == null)
         {
             this._lstTemplates = new List <MapCartoTemplateLib.MapTemplateClass>();
         }
         if (!this._lstTemplates.Contains(mapTemplateClass))
         {
             this._lstTemplates.Add(mapTemplateClass);
         }
     }
 }
コード例 #3
0
        private void ReadClasses()
        {
            ICursor cursor = this._classTable.Search(null, false);
            IRow    row    = cursor.NextRow();
            int     index  = this._classTable.FindField("Name");

            int num2 = this._classTable.FindField("Description");

            while (row != null)
            {
                string str  = row.get_Value(index).ToString();
                string str2 = row.get_Value(num2).ToString();
                MapCartoTemplateLib.MapTemplateClass class3 = new MapCartoTemplateLib.MapTemplateClass(row.OID, this)
                {
                    Name        = str,
                    Description = str2
                };
                this.AddMapTemplateClass(class3);
                row = cursor.NextRow();
            }
            ComReleaser.ReleaseCOMObject(row);
        }