Beispiel #1
0
        private void method_3(ICoFeature icoFeature_0, int int_0)
        {
            try
            {
                int      num2;
                DateTime time;
                if (this.coLayerMapper_0 == null)
                {
                    goto Label_016A;
                }
                int num = 0;
Label_0011:
                if (num >= this.coLayerMapper_0.FieldRelation.Count)
                {
                    return;
                }
                CoFieldMapper mapper      = this.coLayerMapper_0.FieldRelation[num];
                ICoField      destField   = mapper.DestField;
                ICoField      sourceField = mapper.SourceField;
                object        obj2        = "";
                try
                {
                    obj2 = icoFeature_0.GetValue(sourceField);
                }
                catch
                {
                    obj2 = "";
                }
                goto Label_010A;
Label_006B:
                ShapeLib.DBFWriteStringAttribute(this.intptr_1, int_0, num2, obj2.ToString().ToUpper());
                goto Label_0101;
Label_0088:
                ShapeLib.DBFWriteIntegerAttribute(this.intptr_1, int_0, num2, this.method_7(obj2.ToString()));
                goto Label_0101;
Label_00A6:
                ShapeLib.DBFWriteDoubleAttribute(this.intptr_1, int_0, num2, this.method_6(obj2.ToString()));
                goto Label_0101;
Label_00C4:
                ShapeLib.DBFWriteLogicalAttribute(this.intptr_1, int_0, num2, this.method_5(obj2.ToString()));
                goto Label_0101;
Label_00E2:
                time = DateTime.Parse(obj2.ToString());
                ShapeLib.DBFWriteDateAttribute(this.intptr_1, int_0, num2, time);
Label_0101:
                num++;
                goto Label_0011;
Label_010A:
                num2 = ShapeLib.DBFGetFieldIndex(this.intptr_1, destField.Name);
                int           num3    = 0;
                int           num4    = 0;
                StringBuilder builder = new StringBuilder(destField.Name);
                switch (ShapeLib.DBFGetFieldInfo(this.intptr_1, num2, builder, ref num3, ref num4))
                {
                case ShapeLib.DBFFieldType.FTString:
                    goto Label_006B;

                case ShapeLib.DBFFieldType.FTInteger:
                    goto Label_0088;

                case ShapeLib.DBFFieldType.FTDouble:
                    goto Label_00A6;

                case ShapeLib.DBFFieldType.FTLogical:
                    goto Label_00C4;

                case ShapeLib.DBFFieldType.FTInvalid:
                    goto Label_0101;

                case ShapeLib.DBFFieldType.FTDate:
                    goto Label_00E2;

                default:
                    goto Label_0101;
                }
Label_016A:
                using (List <ICoField> .Enumerator enumerator = icoFeature_0.Layer.Fields.GetEnumerator())
                {
Label_017D:
                    if (!enumerator.MoveNext())
                    {
                        return;
                    }
                    ICoField current = enumerator.Current;
                    obj2 = "";
                    try
                    {
                        obj2 = icoFeature_0.GetValue(current);
                    }
                    catch
                    {
                        obj2 = "";
                    }
                    goto Label_0256;
Label_01B5:
                    ShapeLib.DBFWriteStringAttribute(this.intptr_1, int_0, num2, obj2.ToString().ToUpper());
                    goto Label_017D;
Label_01D2:
                    ShapeLib.DBFWriteIntegerAttribute(this.intptr_1, int_0, num2, this.method_7(obj2.ToString()));
                    goto Label_017D;
Label_01F0:
                    ShapeLib.DBFWriteDoubleAttribute(this.intptr_1, int_0, num2, this.method_6(obj2.ToString()));
                    goto Label_017D;
Label_0211:
                    ShapeLib.DBFWriteLogicalAttribute(this.intptr_1, int_0, num2, this.method_5(obj2.ToString()));
                    goto Label_017D;
Label_0232:
                    time = DateTime.Parse(obj2.ToString());
                    ShapeLib.DBFWriteDateAttribute(this.intptr_1, int_0, num2, time);
                    goto Label_017D;
Label_0256:
                    num2    = ShapeLib.DBFGetFieldIndex(this.intptr_1, current.Name);
                    num3    = 0;
                    num4    = 0;
                    builder = new StringBuilder(current.Name);
                    switch (ShapeLib.DBFGetFieldInfo(this.intptr_1, num2, builder, ref num3, ref num4))
                    {
                    case ShapeLib.DBFFieldType.FTString:
                        goto Label_01B5;

                    case ShapeLib.DBFFieldType.FTInteger:
                        goto Label_01D2;

                    case ShapeLib.DBFFieldType.FTDouble:
                        goto Label_01F0;

                    case ShapeLib.DBFFieldType.FTLogical:
                        goto Label_0211;

                    case ShapeLib.DBFFieldType.FTDate:
                        goto Label_0232;
                    }
                    goto Label_017D;
                }
            }
            catch
            {
            }
        }