Пример #1
0
        internal static DxfScale smethod_4(DxfLayer layer, out DxfLayer oldLayer)
        {
            oldLayer = (DxfLayer)null;
            if (layer.ExtensionDictionary == null)
            {
                return((DxfScale)null);
            }
            IDictionaryEntry first = layer.ExtensionDictionary.Entries.GetFirst("ASDK_XREC_ANNO_SCALE_INFO");

            if (first == null)
            {
                return((DxfScale)null);
            }
            DxfXRecord dxfXrecord = first.Value as DxfXRecord;

            if (dxfXrecord == null)
            {
                return((DxfScale)null);
            }
            if (dxfXrecord.Values.Count < 2)
            {
                return((DxfScale)null);
            }
            DxfScale dxfScale = dxfXrecord.Values[1].Value as DxfScale;

            if (dxfXrecord.Values.Count > 2)
            {
                oldLayer = dxfXrecord.Values[2].Value as DxfLayer;
            }
            return(dxfScale);
        }
Пример #2
0
        internal void Write(DxfXRecord xrecord)
        {
            xrecord.Values.Add((short)93, (object)this.int_0);
            xrecord.Values.Add((short)90, (object)(int)this.Format.DataType);
            switch (this.Format.DataType)
            {
            case ValueDataType.None:
                xrecord.Values.Add((short)91, (object)0);
                break;

            case ValueDataType.Int:
                xrecord.Values.Add((short)91, (object)Convert.ToInt32(this.Value));
                break;

            case ValueDataType.Double:
                xrecord.Values.Add((short)140, (object)Convert.ToDouble(this.Value));
                break;

            case ValueDataType.String:
                xrecord.Values.Add((short)1, (object)(string)this.Value);
                break;

            case ValueDataType.Date:
                xrecord.Values.Add((short)92, (object)16);
                byte[] numArray = DxfValue.smethod_2((DateTime)this.Value);
                xrecord.Values.Add((short)310, (object)numArray);
                break;

            case ValueDataType.Point2D:
            case ValueDataType.Point3D:
                WW.Math.Point3D point3D = (WW.Math.Point3D) this.Value;
                xrecord.Values.Add((short)11, (object)point3D);
                break;

            case ValueDataType.ObjectHandle:
                DxfHandledObject dxfHandledObject = (DxfHandledObject)this.Value;
                if (dxfHandledObject != null)
                {
                    xrecord.Values.Add((short)330, (object)dxfHandledObject);
                    break;
                }
                break;

            case ValueDataType.Buffer:
                throw new NotImplementedException("Not yet implemented: Export of value data type 'Buffer'!");

            case ValueDataType.ResultBuffer:
                throw new NotImplementedException("Not yet implemented: Export of value data type 'ResultBuffer'!");

            case ValueDataType.General:
                xrecord.Values.Add((short)1, this.Value == null ? (object)string.Empty : (object)(string)this.Value);
                break;
            }
            xrecord.Values.Add((short)94, (object)(int)this.Format.UnitType);
            xrecord.Values.Add((short)300, (object)this.Format._FormatString);
            xrecord.Values.Add((short)302, (object)this.GetValueString(this.Format));
        }
Пример #3
0
        public override void ResolveReferences(Class374 modelBuilder)
        {
            base.ResolveReferences(modelBuilder);
            DxfXRecord handledObject = (DxfXRecord)this.HandledObject;

            foreach (Pair <int, ulong> pair in this.list_1)
            {
                DxfHandledObject dxfHandledObject = modelBuilder.method_3(pair.Second);
                if (dxfHandledObject != null)
                {
                    handledObject.Values[pair.First].Value = (object)dxfHandledObject;
                }
            }
        }
Пример #4
0
        private DxfXRecord method_8(string recordName)
        {
            DxfXRecord dxfXrecord = this.ExtensionDictionaryNotNull.GetValueByName(recordName) as DxfXRecord;

            if (dxfXrecord == null)
            {
                dxfXrecord = new DxfXRecord();
                this.ExtensionDictionary.Entries.Add((IDictionaryEntry) new DxfDictionaryEntry("ADSK_XREC_LAYER_COLOR_OVR", (DxfObject)dxfXrecord));
            }
            else
            {
                dxfXrecord.Values.Clear();
            }
            return(dxfXrecord);
        }
Пример #5
0
        internal void Read(DxfXRecord xrecord)
        {
            ValueDataType?nullable1    = new ValueDataType?();
            ValueUnitType?nullable2    = new ValueUnitType?();
            string        formatString = (string)null;

            foreach (DxfXRecordValue dxfXrecordValue in (List <DxfXRecordValue>)xrecord.Values)
            {
                switch (dxfXrecordValue.Code)
                {
                case 1:
                case 11:
                case 91:
                case 140:
                case 330:
                    this.method_1(dxfXrecordValue.Value);
                    continue;

                case 90:
                    nullable1 = new ValueDataType?((ValueDataType)dxfXrecordValue.Value);
                    continue;

                case 93:
                    this.int_0 = (int)dxfXrecordValue.Value;
                    continue;

                case 94:
                    nullable2 = new ValueUnitType?((ValueUnitType)dxfXrecordValue.Value);
                    continue;

                case 300:
                    formatString = (string)dxfXrecordValue.Value;
                    continue;

                case 310:
                    this.object_0 = (object)DxfValue.smethod_3((byte[])dxfXrecordValue.Value);
                    continue;

                default:
                    continue;
                }
            }
            if (!nullable1.HasValue || !nullable2.HasValue)
            {
                return;
            }
            this.dxfValueFormat_0 = DxfValueFormat.Create(nullable1.Value, nullable2.Value, formatString);
        }
Пример #6
0
        internal void method_9(
            DxfVersion version,
            Class1026 cell,
            int rowIndex,
            int columnIndex,
            DxfXRecord cellRoundTripData,
            out double checksum,
            out int overrideFlags,
            out int extendedFlags)
        {
            checksum = this.method_10(cell.Value.Format._FormatString);
            byte edgeFlags;
            byte virtualEdgeFlags;
            int  borderTopFlags;
            int  borderRightFlags;
            int  borderBottomFlags;
            int  borderLeftFlags;

            this.method_11(version, cell, rowIndex, columnIndex, out edgeFlags, out virtualEdgeFlags, out overrideFlags, out borderTopFlags, out borderRightFlags, out borderBottomFlags, out borderLeftFlags);
            extendedFlags = cell.ExtendedFlags;
            cell.Value.Write(cellRoundTripData);
        }
Пример #7
0
 public Class278(DxfXRecord obj)
     : base((DxfObject)obj)
 {
 }
Пример #8
0
 internal DxfMText method_21()
 {
     if (this.ExtensionDictionary != null)
     {
         DxfObject valueByName = this.ExtensionDictionary.GetValueByName("ACAD_MLATT");
         if (valueByName is DxfXRecord)
         {
             DxfXRecord dxfXrecord            = (DxfXRecord)valueByName;
             int        num                   = 0;
             DxfXRecordValueCollection values = dxfXrecord.Values;
             while (num < values.Count)
             {
                 DxfXRecordValue dxfXrecordValue = values[num++];
                 if (dxfXrecordValue.Code == (short)1 && "Embedded Object".Equals(dxfXrecordValue.Value.ToString()))
                 {
                     break;
                 }
             }
             if (num < values.Count)
             {
                 DxfXRecordValueCollection xrecordValueCollection = new DxfXRecordValueCollection();
                 xrecordValueCollection.AddRange((IEnumerable <DxfXRecordValue>) new DxfXRecordValue[5]
                 {
                     new DxfXRecordValue((short)0, (object)"MTEXT"),
                     new DxfXRecordValue((short)100, (object)"AcDbEntity"),
                     new DxfXRecordValue((short)8, (object)this.Layer.Name),
                     new DxfXRecordValue((short)67, (object)(short)(this.PaperSpace ? 1 : 0)),
                     new DxfXRecordValue((short)100, (object)"AcDbMText")
                 });
                 while (num < values.Count)
                 {
                     xrecordValueCollection.Add(values[num++]);
                 }
                 Struct18 endGroup = new Struct18(0, (object)"ENDSIM");
                 DxfModel model    = this.Model;
                 if (model == null)
                 {
                     throw new Exception("Cannot get MTEXT substitute when attribute has no parent object.");
                 }
                 DxfMText dxfMtext = DxfReader.smethod_1(model, (Interface33) new Class720(endGroup, (IEnumerable <DxfXRecordValue>)xrecordValueCollection), endGroup) as DxfMText;
                 if (dxfMtext != null)
                 {
                     dxfMtext.method_12((DxfEntity)this);
                     dxfMtext.Style = this.Style;
                     if (this.IsAnnotative)
                     {
                         dxfMtext.IsAnnotative = true;
                         dxfMtext.vmethod_2((IDxfHandledObject)this);
                         DxfDictionary dxfDictionary1 = DxfAnnotationScaleObjectContextData.smethod_7((DxfHandledObject)this, true);
                         DxfDictionary dxfDictionary2 = DxfAnnotationScaleObjectContextData.smethod_7((DxfHandledObject)dxfMtext, true);
                         foreach (IDictionaryEntry entry in (ActiveList <IDictionaryEntry>)dxfDictionary1.Entries)
                         {
                             dxfDictionary2.Entries.Add((IDictionaryEntry) new DxfDictionaryEntry("*A", (DxfObject)((DxfAttributeObjectContextData)entry.Value).Mtext));
                         }
                     }
                     return(dxfMtext);
                 }
             }
         }
     }
     return((DxfMText)null);
 }
Пример #9
0
 public void Visit(DxfXRecord xrecord)
 {
 }
Пример #10
0
        internal override void vmethod_10(DxfModel model)
        {
            base.vmethod_10(model);
            DxfAnnotationScaleObjectContextData.smethod_8((DxfEntity)this);
            this.bool_2 = Class1064.smethod_0((DxfHandledObject)this, model);
            if (this.ExtensionDictionary == null)
            {
                return;
            }
            DxfXRecord valueByName = this.ExtensionDictionary.GetValueByName("ACAD_MTEXT_2008_RT") as DxfXRecord;

            if (valueByName == null)
            {
                return;
            }
            string empty    = string.Empty;
            double?nullable = new double?();

            foreach (DxfXRecordValue dxfXrecordValue in (List <DxfXRecordValue>)valueByName.Values)
            {
                switch (dxfXrecordValue.Code)
                {
                case 1:
                    empty += (string)dxfXrecordValue.Value;
                    continue;

                case 40:
                    nullable = new double?((double)dxfXrecordValue.Value);
                    continue;

                default:
                    continue;
                }
            }
            if (model.Header.AcadVersion < DxfVersion.Dxf21)
            {
                if (!nullable.HasValue)
                {
                    return;
                }
                if (MathUtil.AreApproxEqual(this.method_14(empty, model.Header.DrawingCodePage), nullable.Value, 1E-10))
                {
                    this.string_1 = empty;
                }
                else
                {
                    if (!MathUtil.AreApproxEqual(this.method_13(this.string_1), nullable.Value, 1E-10))
                    {
                        return;
                    }
                    this.string_1 = empty;
                }
            }
            else
            {
                if (!nullable.HasValue || !MathUtil.AreApproxEqual(this.method_13(this.string_1), nullable.Value, 1E-10))
                {
                    return;
                }
                this.string_1 = empty;
            }
        }
Пример #11
0
 public void Visit(DxfXRecord xrecord)
 {
     this.bool_0 = true;
 }
Пример #12
0
        internal void method_1(DxfModel model)
        {
            if (model.Header.AcadVersion >= DxfVersion.Dxf18)
            {
                return;
            }
            DxfXRecord xrecordDwgProps = model.XRecordDwgProps;

            if (xrecordDwgProps == null)
            {
                return;
            }
            List <DxfXRecordValue> .Enumerator enumerator = xrecordDwgProps.Values.GetEnumerator();
            if (!enumerator.MoveNext() || enumerator.Current.Code != (short)1 || !((string)enumerator.Current.Value == "DWGPROPS COOKIE"))
            {
                return;
            }
            while (enumerator.MoveNext())
            {
                DxfXRecordValue current = enumerator.Current;
                if (current.Code >= (short)300 && current.Code <= (short)309)
                {
                    string str1 = (string)current.Value;
                    if (!(str1 == "="))
                    {
                        int    length = str1.IndexOf('=');
                        string str2   = string.Empty;
                        string name;
                        if (length < 0)
                        {
                            name = str1;
                        }
                        else
                        {
                            name = str1.Substring(0, length);
                            str2 = str1.Substring(length + 1);
                        }
                        this.list_0.Add(new SummaryInfo.Property(name, str2));
                    }
                }
                else
                {
                    switch (current.Code)
                    {
                    case 1:
                        this.HyperLinkBase = (string)current.Value;
                        continue;

                    case 2:
                        this.Title = (string)current.Value;
                        continue;

                    case 3:
                        this.Subject = (string)current.Value;
                        continue;

                    case 4:
                        this.Author = (string)current.Value;
                        continue;

                    case 6:
                        this.Comments = (string)current.Value;
                        continue;

                    case 7:
                        this.Keywords = (string)current.Value;
                        continue;

                    case 8:
                        this.LastSavedBy = (string)current.Value;
                        continue;

                    case 9:
                        this.RevisionNumber = (string)current.Value;
                        continue;

                    case 40:
                        this.dxfTimeSpan_0 = Class644.smethod_7((double)current.Value);
                        continue;

                    case 41:
                        this.dateTime_0 = Class644.smethod_4((double)current.Value);
                        continue;

                    case 42:
                        this.dateTime_1 = Class644.smethod_4((double)current.Value);
                        continue;

                    default:
                        continue;
                    }
                }
            }
        }
Пример #13
0
 internal void method_0(Class1070 context, DxfModel model)
 {
     if (model.Header.AcadVersion > DxfVersion.Dxf15)
     {
         if (model.XRecordDwgProps == null)
         {
             return;
         }
         model.DictionaryRoot.Entries.RemoveAll("DWGPROPS");
         model.XRecordDwgProps = (DxfXRecord)null;
     }
     else
     {
         DxfXRecord dxfXrecord = model.XRecordDwgProps;
         if (dxfXrecord == null)
         {
             dxfXrecord            = new DxfXRecord();
             model.XRecordDwgProps = dxfXrecord;
             model.DictionaryRoot.Entries.Add((IDictionaryEntry) new DxfDictionaryEntry("DWGPROPS", (DxfObject)model.XRecordDwgProps));
         }
         else
         {
             dxfXrecord.Values.Clear();
         }
         short num1 = 1;
         DxfXRecordValueCollection values1 = dxfXrecord.Values;
         num1 = (short)2;
         values1.Add((short)1, (object)"DWGPROPS COOKIE");
         DxfXRecordValueCollection values2 = dxfXrecord.Values;
         num1 = (short)3;
         string string0 = this.string_0;
         values2.Add((short)2, (object)string0);
         DxfXRecordValueCollection values3 = dxfXrecord.Values;
         num1 = (short)4;
         string string1 = this.string_1;
         values3.Add((short)3, (object)string1);
         DxfXRecordValueCollection values4 = dxfXrecord.Values;
         num1 = (short)5;
         string string2 = this.string_2;
         values4.Add((short)4, (object)string2);
         num1 = (short)6;
         DxfXRecordValueCollection values5 = dxfXrecord.Values;
         num1 = (short)7;
         string string4 = this.string_4;
         values5.Add((short)6, (object)string4);
         DxfXRecordValueCollection values6 = dxfXrecord.Values;
         num1 = (short)8;
         string string3 = this.string_3;
         values6.Add((short)7, (object)string3);
         DxfXRecordValueCollection values7 = dxfXrecord.Values;
         num1 = (short)9;
         string string5 = this.string_5;
         values7.Add((short)8, (object)string5);
         DxfXRecordValueCollection values8 = dxfXrecord.Values;
         num1 = (short)10;
         string string6 = this.string_6;
         values8.Add((short)9, (object)string6);
         short num2 = 300;
         foreach (SummaryInfo.Property property in this.list_0)
         {
             dxfXrecord.Values.Add(num2++, (object)(property.Name + "=" + property.Value));
             if (num2 > (short)309)
             {
                 break;
             }
         }
         while (num2 < (short)310)
         {
             dxfXrecord.Values.Add(num2++, (object)"=");
         }
         num1 = (short)40;
         DxfXRecordValueCollection values9 = dxfXrecord.Values;
         num1 = (short)41;
         // ISSUE: variable of a boxed type
         __Boxed <double> local1 = (ValueType)Class644.smethod_3(this.dxfTimeSpan_0);
         values9.Add((short)40, (object)local1);
         DxfXRecordValueCollection values10 = dxfXrecord.Values;
         num1 = (short)42;
         // ISSUE: variable of a boxed type
         __Boxed <double> local2 = (ValueType)Class644.smethod_0(this.dateTime_0);
         values10.Add((short)41, (object)local2);
         DxfXRecordValueCollection values11 = dxfXrecord.Values;
         short num3 = 43;
         // ISSUE: variable of a boxed type
         __Boxed <double> local3 = (ValueType)Class644.smethod_0(this.dateTime_1);
         values11.Add((short)42, (object)local3);
         dxfXrecord.Values.Add((short)1, (object)this.string_7);
         dxfXrecord.Values.Add((short)90, (object)this.list_0.Count);
         for (int index = 10; index < this.list_0.Count; ++index)
         {
             SummaryInfo.Property property = this.list_0[index];
             dxfXrecord.Values.Add(num3++, (object)(property.Name + "=" + property.Value));
         }
     }
 }
Пример #14
0
        internal override void vmethod_10(DxfModel model)
        {
            base.vmethod_10(model);
            DxfExtendedData extendedData;

            if (this.HasExtendedData && this.ExtendedDataCollection.TryGetValue(this.Model, "AcCmTransparency", out extendedData))
            {
                IEnumerator <IExtendedDataValue> enumerator = (IEnumerator <IExtendedDataValue>) new DxfExtendedData.RecursiveEnumerator((IEnumerator <IExtendedDataValue>)extendedData.Values.GetEnumerator());
                while (enumerator.MoveNext())
                {
                    DxfExtendedData.Int32 current = enumerator.Current as DxfExtendedData.Int32;
                    if (current != null)
                    {
                        this.transparency_0 = new Transparency((uint)current.Value);
                        if (this.transparency_0.TransparencyType != TransparencyType.ByValue)
                        {
                            this.transparency_0 = Transparency.Opaque;
                            break;
                        }
                        break;
                    }
                }
            }
            if (this.ExtensionDictionary == null)
            {
                return;
            }
            DxfXRecord valueByName1 = this.ExtensionDictionary.GetValueByName("ADSK_XREC_LAYER_COLOR_OVR") as DxfXRecord;

            if (valueByName1 != null)
            {
                List <DxfXRecordValue> .Enumerator enumerator = valueByName1.Values.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    if (enumerator.Current.Code == (short)102 && enumerator.Current.Value as string == "{ADSK_LYR_COLOR_OVERRIDE")
                    {
                        DxfViewport key      = (DxfViewport)null;
                        uint?       nullable = new uint?();
                        while (enumerator.MoveNext() && (enumerator.Current.Code != (short)102 || !(enumerator.Current.Value as string == "}")))
                        {
                            switch (enumerator.Current.Code)
                            {
                            case 335:
                                key = enumerator.Current.Value as DxfViewport;
                                continue;

                            case 420:
                                nullable = new uint?((uint)Convert.ToInt32(enumerator.Current.Value));
                                continue;

                            default:
                                continue;
                            }
                        }
                        if (key != null && nullable.HasValue)
                        {
                            this.ViewportLayerOverridesNotNull.ViewportColorOverridesNotNull.Add(key, Color.smethod_0(nullable.Value));
                        }
                    }
                }
            }
            DxfXRecord valueByName2 = this.ExtensionDictionary.GetValueByName("ADSK_XREC_LAYER_LINETYPE_OVR") as DxfXRecord;

            if (valueByName2 != null)
            {
                List <DxfXRecordValue> .Enumerator enumerator = valueByName2.Values.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    if (enumerator.Current.Code == (short)102 && enumerator.Current.Value as string == "{ADSK_LYR_LINETYPE_OVERRIDE")
                    {
                        DxfViewport key         = (DxfViewport)null;
                        DxfLineType dxfLineType = (DxfLineType)null;
                        while (enumerator.MoveNext() && (enumerator.Current.Code != (short)102 || !(enumerator.Current.Value as string == "}")))
                        {
                            switch (enumerator.Current.Code)
                            {
                            case 335:
                                key = enumerator.Current.Value as DxfViewport;
                                continue;

                            case 343:
                                dxfLineType = enumerator.Current.Value as DxfLineType;
                                continue;

                            default:
                                continue;
                            }
                        }
                        if (key != null && dxfLineType != null)
                        {
                            this.ViewportLayerOverridesNotNull.ViewportLineTypeOverridesNotNull.Add(key, dxfLineType);
                        }
                    }
                }
            }
            DxfXRecord valueByName3 = this.ExtensionDictionary.GetValueByName("ADSK_XREC_LAYER_LINEWT_OVR") as DxfXRecord;

            if (valueByName3 != null)
            {
                List <DxfXRecordValue> .Enumerator enumerator = valueByName3.Values.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    if (enumerator.Current.Code == (short)102 && enumerator.Current.Value as string == "{ADSK_LYR_LINEWT_OVERRIDE")
                    {
                        DxfViewport key      = (DxfViewport)null;
                        short?      nullable = new short?();
                        while (enumerator.MoveNext() && (enumerator.Current.Code != (short)102 || !(enumerator.Current.Value as string == "}")))
                        {
                            switch (enumerator.Current.Code)
                            {
                            case 91:
                                nullable = new short?(Convert.ToInt16(enumerator.Current.Value));
                                continue;

                            case 335:
                                key = enumerator.Current.Value as DxfViewport;
                                continue;

                            default:
                                continue;
                            }
                        }
                        if (key != null && nullable.HasValue)
                        {
                            this.ViewportLayerOverridesNotNull.ViewportLineWeightOverridesNotNull.Add(key, nullable.Value);
                        }
                    }
                }
            }
            DxfXRecord valueByName4 = this.ExtensionDictionary.GetValueByName("ADSK_XREC_LAYER_ALPHA_OVR") as DxfXRecord;

            if (valueByName4 == null)
            {
                return;
            }
            List <DxfXRecordValue> .Enumerator enumerator1 = valueByName4.Values.GetEnumerator();
            while (enumerator1.MoveNext())
            {
                if (enumerator1.Current.Code == (short)102 && enumerator1.Current.Value as string == "{ADSK_LYR_ALPHA_OVERRIDE")
                {
                    DxfViewport key      = (DxfViewport)null;
                    uint?       nullable = new uint?();
                    while (enumerator1.MoveNext() && (enumerator1.Current.Code != (short)102 || !(enumerator1.Current.Value as string == "}")))
                    {
                        switch (enumerator1.Current.Code)
                        {
                        case 335:
                            key = enumerator1.Current.Value as DxfViewport;
                            continue;

                        case 440:
                            nullable = new uint?((uint)Convert.ToInt32(enumerator1.Current.Value));
                            continue;

                        default:
                            continue;
                        }
                    }
                    if (key != null && nullable.HasValue)
                    {
                        this.ViewportLayerOverridesNotNull.ViewportTransparencyOverridesNotNull.Add(key, new Transparency(nullable.Value));
                    }
                }
            }
        }
Пример #15
0
 internal override void vmethod_1(Class1070 context)
 {
     base.vmethod_1(context);
     if (this.transparency_0 == Transparency.Opaque)
     {
         if (this.HasExtendedData)
         {
             DxfAppId dxfAppId;
             if (!this.Model.AppIds.TryGetValue("AcCmTransparency", out dxfAppId))
             {
                 dxfAppId = new DxfAppId("AcCmTransparency");
                 this.Model.AppIds.Add(dxfAppId);
             }
             DxfExtendedData extendedData;
             if (this.ExtendedDataCollection.TryGetValue(dxfAppId, out extendedData))
             {
                 if (extendedData.Values.Count == 0)
                 {
                     this.ExtendedDataCollection.Remove(dxfAppId);
                 }
                 else if (extendedData.Values.Count == 1)
                 {
                     if (extendedData.Values[0] is DxfExtendedData.Int32)
                     {
                         this.ExtendedDataCollection.Remove(dxfAppId);
                     }
                 }
                 else
                 {
                     this.method_10(extendedData);
                 }
             }
         }
     }
     else
     {
         DxfAppId appId;
         if (!this.Model.AppIds.TryGetValue("AcCmTransparency", out appId))
         {
             appId = new DxfAppId("AcCmTransparency");
             this.Model.AppIds.Add(appId);
         }
         DxfExtendedData extendedData;
         if (this.ExtendedDataCollection.TryGetValue(appId, out extendedData))
         {
             this.method_10(extendedData);
         }
         else
         {
             extendedData = new DxfExtendedData(appId);
             this.ExtendedDataCollection.Add(extendedData);
             extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int32((int)this.transparency_0.Data));
         }
     }
     if (this.class905_0 != null)
     {
         if (this.class905_0.dictionary_0 != null && this.class905_0.dictionary_0.Count > 0)
         {
             DxfXRecord dxfXrecord = this.method_8("ADSK_XREC_LAYER_COLOR_OVR");
             foreach (KeyValuePair <DxfViewport, Color> keyValuePair in this.class905_0.dictionary_0)
             {
                 dxfXrecord.Values.Add((short)102, (object)"{ADSK_LYR_COLOR_OVERRIDE");
                 dxfXrecord.Values.Add((short)335, (object)keyValuePair.Key);
                 dxfXrecord.Values.Add((short)420, (object)(int)keyValuePair.Value.Data);
                 dxfXrecord.Values.Add((short)102, (object)"}");
             }
         }
         else
         {
             this.method_9("ADSK_XREC_LAYER_COLOR_OVR");
         }
         if (this.class905_0.dictionary_1 != null && this.class905_0.dictionary_1.Count > 0)
         {
             DxfXRecord dxfXrecord = this.method_8("ADSK_XREC_LAYER_LINETYPE_OVR");
             foreach (KeyValuePair <DxfViewport, DxfLineType> keyValuePair in this.class905_0.dictionary_1)
             {
                 dxfXrecord.Values.Add((short)102, (object)"{ADSK_LYR_LINETYPE_OVERRIDE");
                 dxfXrecord.Values.Add((short)335, (object)keyValuePair.Key);
                 dxfXrecord.Values.Add((short)343, (object)keyValuePair.Value);
                 dxfXrecord.Values.Add((short)102, (object)"}");
             }
         }
         else
         {
             this.method_9("ADSK_XREC_LAYER_LINETYPE_OVR");
         }
         if (this.class905_0.dictionary_2 != null && this.class905_0.dictionary_2.Count > 0)
         {
             DxfXRecord dxfXrecord = this.method_8("ADSK_XREC_LAYER_LINEWT_OVR");
             foreach (KeyValuePair <DxfViewport, short> keyValuePair in this.class905_0.dictionary_2)
             {
                 dxfXrecord.Values.Add((short)102, (object)"{ADSK_LYR_LINEWT_OVERRIDE");
                 dxfXrecord.Values.Add((short)335, (object)keyValuePair.Key);
                 dxfXrecord.Values.Add((short)91, (object)(int)keyValuePair.Value);
                 dxfXrecord.Values.Add((short)102, (object)"}");
             }
         }
         else
         {
             this.method_9("ADSK_XREC_LAYER_LINEWT_OVR");
         }
         if (this.class905_0.dictionary_3 != null && this.class905_0.dictionary_3.Count > 0)
         {
             DxfXRecord dxfXrecord = this.method_8("ADSK_XREC_LAYER_ALPHA_OVR");
             foreach (KeyValuePair <DxfViewport, Transparency> keyValuePair in this.class905_0.dictionary_3)
             {
                 dxfXrecord.Values.Add((short)102, (object)"{ADSK_LYR_ALPHA_OVERRIDE");
                 dxfXrecord.Values.Add((short)335, (object)keyValuePair.Key);
                 dxfXrecord.Values.Add((short)440, (object)(int)keyValuePair.Value.Data);
                 dxfXrecord.Values.Add((short)102, (object)"}");
             }
         }
         else
         {
             this.method_9("ADSK_XREC_LAYER_ALPHA_OVR");
         }
     }
     else
     {
         if (this.ExtensionDictionary == null)
         {
             return;
         }
         this.method_9("ADSK_XREC_LAYER_COLOR_OVR");
         this.method_9("ADSK_XREC_LAYER_LINETYPE_OVR");
         this.method_9("ADSK_XREC_LAYER_LINEWT_OVR");
         this.method_9("ADSK_XREC_LAYER_ALPHA_OVR");
         if (this.ExtensionDictionary.Entries.Count != 0)
         {
             return;
         }
         this.ExtensionDictionary = (DxfDictionary)null;
     }
 }