Ejemplo n.º 1
0
        public override void Flush(CoLayerMapper coLayerMapper_1)
        {
            int            num;
            IFeatureBuffer buffer;

            this.coLayerMapper_0 = coLayerMapper_1;
            if (this.ifeatureClass_0.FeatureType == esriFeatureType.esriFTAnnotation)
            {
                this.bool_0 = false;
            }
            else
            {
                this.bool_0 = true;
            }
            if (this.bool_0)
            {
                if (this.ifeatureCursor_1 == null)
                {
                    this.ifeatureCursor_1 = this.ifeatureClass_0.Insert(true);
                }
                for (num = 0; num < base.XpgisLayer.FeatureCount; num++)
                {
                    buffer = this.method_9(base.XpgisLayer.GetFeatureByIndex(num));
                    if (buffer != null)
                    {
                        this.ifeatureCursor_1.InsertFeature(buffer);
                    }
                }
                try
                {
                    this.ifeatureCursor_1.Flush();
                }
                catch
                {
                }
            }
            else
            {
                IFeatureClassWrite write = this.ifeatureClass_0 as IFeatureClassWrite;
                ISet features            = new SetClass();
                for (num = 0; num < base.XpgisLayer.FeatureCount; num++)
                {
                    buffer = this.method_9(base.XpgisLayer.GetFeatureByIndex(num));
                    if (buffer != null)
                    {
                        features.Add(buffer as IFeature);
                    }
                }
                write.WriteFeatures(features);
            }
            base.XpgisLayer.RemoveAllFeature();
        }
Ejemplo n.º 2
0
 public override void Flush(CoLayerMapper coLayerMapper_1)
 {
     try
     {
         this.coLayerMapper_0 = coLayerMapper_1;
         for (int i = 0; i < base.XpgisLayer.FeatureCount; i++)
         {
             ICoFeature featureByIndex = base.XpgisLayer.GetFeatureByIndex(i);
             this.method_2(featureByIndex);
         }
         base.XpgisLayer.RemoveAllFeature();
     }
     catch
     {
         base.XpgisLayer.RemoveAllFeature();
     }
 }
Ejemplo n.º 3
0
        public void ConvertFlush(CoLayerMapper coLayerMapper_0)
        {
            if (this.icoConvert_0 == null)
            {
                throw new Exception("mDestConvert 为空,未将对象引用到实例。");
            }
            ICoLayer xpgisLayer = this.icoConvert_0.XpgisLayer;

            for (int i = 0; i < this.icoLayer_0.FeatureCount; i++)
            {
                xpgisLayer.AppendFeature(this.icoLayer_0.GetFeatureByIndex(i));
            }
            if (coLayerMapper_0 == null)
            {
                this.icoConvert_0.Flush();
            }
            else
            {
                this.icoConvert_0.Flush(coLayerMapper_0);
            }
            this.icoConvert_0.XpgisLayer.RemoveAllFeature();
            this.icoLayer_0.RemoveAllFeature();
        }
Ejemplo n.º 4
0
        public static CoLayerMapper[] ReadXml(string string_0)
        {
            List <CoLayerMapper> list   = new List <CoLayerMapper>();
            XmlReaderClass       class2 = new XmlReaderClass(string_0);

            foreach (XmlNode node2 in class2.GetCustomSetting("configuration").ChildNodes)
            {
                ICoLayer layer = new CoLayerClass
                {
                    Name      = node2.Attributes["sName"].Value,
                    AliasName = node2.Attributes["sAliasName"].Value
                };
                ICoLayer layer2 = new CoLayerClass
                {
                    Name      = node2.Attributes["dName"].Value,
                    AliasName = node2.Attributes["dAliasName"].Value
                };
                CoLayerMapper item = new CoLayerMapper(layer, layer2);
                foreach (XmlNode node3 in node2.ChildNodes)
                {
                    ICoField field = new CoFieldClass
                    {
                        Name      = node3.Attributes["sName"].Value,
                        AliasName = node3.Attributes["sAliasName"].Value
                    };
                    ICoField field2 = new CoFieldClass
                    {
                        Name      = node3.Attributes["dName"].Value,
                        AliasName = node3.Attributes["dAliasName"].Value
                    };
                    item.FieldRelation.Add(new CoFieldMapper(field, field2));
                }
                list.Add(item);
            }
            return(list.ToArray());
        }
Ejemplo n.º 5
0
 public abstract void Flush(CoLayerMapper coLayerMapper_0);