Esempio n. 1
0
 internal override void vmethod_1(Class1070 context)
 {
     base.vmethod_1(context);
     if (this.trueTypeFontDescriptor_0 == null)
     {
         if (!this.HasExtendedData)
         {
             return;
         }
         this.ExtendedDataCollection.Remove(this.Model.AppIdAcad);
     }
     else
     {
         DxfExtendedData extendedData;
         if (this.HasExtendedData && this.ExtendedDataCollection.TryGetValue(this.Model.AppIdAcad, out extendedData))
         {
             extendedData.Values.Clear();
         }
         else
         {
             extendedData = new DxfExtendedData(this.Model.AppIdAcad);
             this.ExtendedDataCollection.Add(extendedData);
         }
         extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.String(this.trueTypeFontDescriptor_0.FontFilename));
         extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int32((int)this.trueTypeFontDescriptor_0.Flags));
     }
 }
Esempio n. 2
0
 internal override void vmethod_1(Class1070 context)
 {
     base.vmethod_1(context);
     if (this.Model.Header.AcadVersion >= DxfVersion.Dxf12 && this.Model.Header.AcadVersion <= DxfVersion.Dxf14)
     {
         DxfExtendedData extendedData;
         if (this.ExtendedDataCollection.TryGetValue(this.Model.AppIdAcad, out extendedData))
         {
             extendedData.Values.Clear();
         }
         else
         {
             extendedData = new DxfExtendedData(this.Model.AppIdAcad);
             this.ExtendedDataCollection.Add(extendedData);
         }
         extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.String("MVIEW"));
         DxfExtendedData.ValueCollection valueCollection1 = new DxfExtendedData.ValueCollection();
         extendedData.Values.Add((IExtendedDataValue)valueCollection1);
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)16));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.PointOrVector(this.point3D_1.X, this.point3D_1.Y, this.point3D_1.Z));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.PointOrVector(this.vector3D_0.X, this.vector3D_0.Y, this.vector3D_0.Z));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.double_6));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.double_4));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.point2D_0.X));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.point2D_0.Y));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.double_1));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.double_2));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.double_3));
         ViewMode viewMode = (ViewMode)(this.viewportStatusFlags_0 & (ViewportStatusFlags.PerspectiveMode | ViewportStatusFlags.ClipFront | ViewportStatusFlags.ClipBack | ViewportStatusFlags.FollowUcs | ViewportStatusFlags.ClipFrontNotAtEye));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)viewMode));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)this.double_7));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Int16((this.viewportStatusFlags_0 & ViewportStatusFlags.FastZoom) != ViewportStatusFlags.None ? (short)1 : (short)0));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Int16((this.viewportStatusFlags_0 & ViewportStatusFlags.UcsIconVisible) != ViewportStatusFlags.None ? (short)1 : (short)0));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Int16((this.viewportStatusFlags_0 & ViewportStatusFlags.SnapMode) != ViewportStatusFlags.None ? (short)1 : (short)0));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Int16((this.viewportStatusFlags_0 & ViewportStatusFlags.GridMode) != ViewportStatusFlags.None ? (short)1 : (short)0));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Int16((this.viewportStatusFlags_0 & ViewportStatusFlags.IsometricSnapStyle) != ViewportStatusFlags.None ? (short)1 : (short)0));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)(((this.viewportStatusFlags_0 & ViewportStatusFlags.KIsoPairTop) != ViewportStatusFlags.None ? 1 : 0) + ((this.viewportStatusFlags_0 & ViewportStatusFlags.KIsoPairRight) != ViewportStatusFlags.None ? 2 : 0))));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.double_5));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.point2D_1.X));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.point2D_1.Y));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.vector2D_0.X));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.vector2D_0.Y));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.vector2D_1.X));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Double(this.vector2D_1.Y));
         valueCollection1.Add((IExtendedDataValue) new DxfExtendedData.Int16((this.viewportStatusFlags_0 & ViewportStatusFlags.HidePlot) != ViewportStatusFlags.None ? (short)1 : (short)0));
         DxfExtendedData.ValueCollection valueCollection2 = new DxfExtendedData.ValueCollection();
         valueCollection1.Add((IExtendedDataValue)valueCollection2);
         foreach (DxfLayer dxfLayer in this.dxfHandledObjectCollection_1)
         {
             valueCollection2.Add((IExtendedDataValue) new DxfExtendedData.LayerReference(dxfLayer));
         }
     }
     else
     {
         this.ExtendedDataCollection.Remove(this.Model.AppIdAcad);
     }
 }
Esempio n. 3
0
 public static void Set(DxfHandledObject o, Class1064 value)
 {
     if (value == null)
     {
         DxfAppId key;
         if (o.Model == null || !o.Model.AppIds.TryGetValue("AcadAnnotative", out key))
         {
             return;
         }
         o.ExtendedDataCollection.Remove(key);
     }
     else
     {
         DxfExtendedData extendedData;
         if (o.ExtendedDataCollection.TryGetValue(Class1064.smethod_3(o.Model), out extendedData))
         {
             DxfExtendedData.ValueCollection valueCollection;
             if (extendedData.Values.Count >= 2 && extendedData.Values[1] is DxfExtendedData.ValueCollection)
             {
                 valueCollection = extendedData.Values[1] as DxfExtendedData.ValueCollection;
             }
             else
             {
                 extendedData.Values.Clear();
                 extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.String("AnnotativeData"));
                 valueCollection = new DxfExtendedData.ValueCollection();
                 extendedData.Values.Add((IExtendedDataValue)valueCollection);
             }
             valueCollection.Clear();
             valueCollection.Add((IExtendedDataValue) new DxfExtendedData.Int16(value.bool_0 ? (short)1 : (short)0));
             valueCollection.Add((IExtendedDataValue) new DxfExtendedData.Int16(value.bool_1 ? (short)1 : (short)0));
         }
         else
         {
             DxfExtendedData dxfExtendedData = new DxfExtendedData(Class1064.smethod_3(o.Model));
             dxfExtendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.String("AnnotativeData"));
             DxfExtendedData.ValueCollection valueCollection = new DxfExtendedData.ValueCollection();
             dxfExtendedData.Values.Add((IExtendedDataValue)valueCollection);
             valueCollection.Add((IExtendedDataValue) new DxfExtendedData.Int16(value.bool_0 ? (short)1 : (short)0));
             valueCollection.Add((IExtendedDataValue) new DxfExtendedData.Int16(value.bool_1 ? (short)1 : (short)0));
             o.ExtendedDataCollection.Add(dxfExtendedData);
         }
     }
 }
Esempio n. 4
0
        private void method_10(DxfExtendedData extendedData)
        {
            IEnumerator <IExtendedDataValue> enumerator = (IEnumerator <IExtendedDataValue>) new DxfExtendedData.RecursiveEnumerator((IEnumerator <IExtendedDataValue>)extendedData.Values.GetEnumerator());

            DxfExtendedData.Int32 int32 = (DxfExtendedData.Int32)null;
            while (enumerator.MoveNext())
            {
                int32 = enumerator.Current as DxfExtendedData.Int32;
                if (int32 != null)
                {
                    break;
                }
            }
            if (int32 == null)
            {
                int32 = new DxfExtendedData.Int32();
                extendedData.Values.Add((IExtendedDataValue)int32);
            }
            int32.Value = (int)this.transparency_0.Data;
        }
Esempio n. 5
0
        public static void smethod_0(
            DxfDimensionStyleOverrides dimensionStyle,
            DxfExtendedData extendedData,
            Class374 modelBuilder)
        {
            DxfExtendedData.ValueCollection valueCollection = (DxfExtendedData.ValueCollection)null;
            for (int index1 = 0; index1 < extendedData.Values.Count; ++index1)
            {
                DxfExtendedData.String @string = extendedData.Values[index1] as DxfExtendedData.String;
                if (@string != null && @string.Value == "DSTYLE")
                {
                    int index2 = index1 + 1;
                    if (index2 < extendedData.Values.Count)
                    {
                        valueCollection = extendedData.Values[index2] as DxfExtendedData.ValueCollection;
                        break;
                    }
                    break;
                }
            }
            if (valueCollection == null)
            {
                return;
            }
            for (int index1 = 0; index1 < valueCollection.Count; index1 += 2)
            {
                DxfExtendedData.Int16 int16 = valueCollection[index1] as DxfExtendedData.Int16;
                if (int16 != null)
                {
                    short num    = int16.Value;
                    int   index2 = index1 + 1;
                    if (index2 < valueCollection.Count)
                    {
                        IExtendedDataValue extendedDataValue = valueCollection[index2];
                        switch (num)
                        {
                        case 3:
                            dimensionStyle.PostFix = ((DxfExtendedData.String)extendedDataValue).Value;
                            continue;

                        case 4:
                            dimensionStyle.AlternateDimensioningSuffix = ((DxfExtendedData.String)extendedDataValue).Value;
                            continue;

                        case 5:
                            string blockName1 = ((DxfExtendedData.String)extendedDataValue).Value;
                            if (!string.IsNullOrEmpty(blockName1))
                            {
                                dimensionStyle.ArrowBlock = Class309.smethod_1(modelBuilder, blockName1);
                                continue;
                            }
                            continue;

                        case 6:
                            string blockName2 = ((DxfExtendedData.String)extendedDataValue).Value;
                            if (!string.IsNullOrEmpty(blockName2))
                            {
                                dimensionStyle.FirstArrowBlock = Class309.smethod_1(modelBuilder, blockName2);
                                continue;
                            }
                            continue;

                        case 7:
                            string blockName3 = ((DxfExtendedData.String)extendedDataValue).Value;
                            if (!string.IsNullOrEmpty(blockName3))
                            {
                                dimensionStyle.SecondArrowBlock = Class309.smethod_1(modelBuilder, blockName3);
                                continue;
                            }
                            continue;

                        case 40:
                            dimensionStyle.ScaleFactor = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 41:
                            dimensionStyle.ArrowSize = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 42:
                            dimensionStyle.ExtensionLineOffset = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 43:
                            dimensionStyle.DimensionLineIncrement = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 44:
                            dimensionStyle.ExtensionLineExtension = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 45:
                            dimensionStyle.Rounding = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 46:
                            dimensionStyle.DimensionLineExtension = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 47:
                            dimensionStyle.PlusTolerance = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 48:
                            dimensionStyle.MinusTolerance = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 49:
                            dimensionStyle.FixedExtensionLineLength = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 50:
                            dimensionStyle.JoggedRadiusDimensionTransverseSegmentAngle = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 69:
                            dimensionStyle.TextBackgroundFillMode = (DimensionTextBackgroundFillMode)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 70:
                            dimensionStyle.TextBackgroundColor = Color.CreateFromColorIndex(((DxfExtendedData.Int16)extendedDataValue).Value);
                            continue;

                        case 71:
                            dimensionStyle.GenerateTolerances = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 72:
                            dimensionStyle.LimitsGeneration = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 73:
                            dimensionStyle.TextInsideHorizontal = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 74:
                            dimensionStyle.TextOutsideHorizontal = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 75:
                            dimensionStyle.SuppressFirstExtensionLine = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 76:
                            dimensionStyle.SuppressSecondExtensionLine = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 77:
                            dimensionStyle.TextVerticalAlignment = (DimensionTextVerticalAlignment)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 78:
                            dimensionStyle.ZeroHandling = (ZeroHandling)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 79:
                            dimensionStyle.AngularZeroHandling = (ZeroHandling)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 90:
                            dimensionStyle.ArcLengthSymbolPosition = (ArcLengthSymbolPosition)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 140:
                            dimensionStyle.TextHeight = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 141:
                            dimensionStyle.CenterMarkSize = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 142:
                            dimensionStyle.TickSize = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 143:
                            dimensionStyle.AlternateUnitScaleFactor = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 144:
                            dimensionStyle.LinearScaleFactor = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 145:
                            dimensionStyle.TextVerticalPosition = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 146:
                            dimensionStyle.ToleranceScaleFactor = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 147:
                            dimensionStyle.DimensionLineGap = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 148:
                            dimensionStyle.AlternateUnitRounding = ((DxfExtendedData.Double)extendedDataValue).Value;
                            continue;

                        case 170:
                            dimensionStyle.AlternateUnitDimensioning = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 171:
                            dimensionStyle.AlternateUnitDecimalPlaces = ((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 172:
                            dimensionStyle.TextOutsideExtensions = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 173:
                            dimensionStyle.SeparateArrowBlocks = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 174:
                            dimensionStyle.TextInsideExtensions = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 175:
                            dimensionStyle.SuppressOutsideExtensions = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 176:
                            short colorIndex1 = ((DxfExtendedData.Int16)extendedDataValue).Value;
                            dimensionStyle.DimensionLineColor = Color.CreateFromColorIndex(colorIndex1);
                            continue;

                        case 177:
                            short colorIndex2 = ((DxfExtendedData.Int16)extendedDataValue).Value;
                            dimensionStyle.ExtensionLineColor = Color.CreateFromColorIndex(colorIndex2);
                            continue;

                        case 178:
                            short colorIndex3 = ((DxfExtendedData.Int16)extendedDataValue).Value;
                            dimensionStyle.TextColor = Color.CreateFromColorIndex(colorIndex3);
                            continue;

                        case 179:
                            dimensionStyle.AngularDimensionDecimalPlaces = ((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 271:
                            dimensionStyle.DecimalPlaces = Convert.ToInt16(extendedDataValue.ValueObject);
                            continue;

                        case 272:
                            dimensionStyle.ToleranceDecimalPlaces = ((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 273:
                            dimensionStyle.AlternateUnitFormat = (AlternateUnitFormat)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 274:
                            dimensionStyle.AlternateUnitToleranceDecimalPlaces = ((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 275:
                            dimensionStyle.AngularUnit = (AngularUnit)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 276:
                            dimensionStyle.FractionFormat = (FractionFormat)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 277:
                            dimensionStyle.LinearUnitFormat = (LinearUnitFormat)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 278:
                            dimensionStyle.DecimalSeparator = (char)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 279:
                            dimensionStyle.TextMovement = (TextMovement)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 280:
                            dimensionStyle.TextHorizontalAlignment = (DimensionTextHorizontalAlignment)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 281:
                            dimensionStyle.SuppressFirstDimensionLine = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 282:
                            dimensionStyle.SuppressSecondDimensionLine = ((DxfExtendedData.Int16)extendedDataValue).Value == (short)1;
                            continue;

                        case 283:
                            dimensionStyle.ToleranceAlignment = (ToleranceAlignment)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 284:
                            dimensionStyle.ToleranceZeroHandling = (ZeroHandling)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 285:
                            dimensionStyle.AlternateUnitZeroHandling = (ZeroHandling)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 286:
                            dimensionStyle.AlternateUnitToleranceZeroHandling = (ZeroHandling)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 288:
                            dimensionStyle.CursorUpdate = (CursorUpdate)((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 290:
                            dimensionStyle.IsExtensionLineLengthFixed = ((DxfExtendedData.Int16)extendedDataValue).Value != (short)0;
                            continue;

                        case 340:
                            DxfTextStyle dxfTextStyle = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfTextStyle;
                            if (dxfTextStyle != null)
                            {
                                dimensionStyle.TextStyle = dxfTextStyle;
                                continue;
                            }
                            continue;

                        case 341:
                            DxfBlock dxfBlock1 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfBlock;
                            if (dxfBlock1 != null)
                            {
                                dimensionStyle.LeaderArrowBlock = dxfBlock1;
                                continue;
                            }
                            continue;

                        case 342:
                            DxfBlock dxfBlock2 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfBlock;
                            if (dxfBlock2 != null)
                            {
                                dimensionStyle.ArrowBlock = dxfBlock2;
                                continue;
                            }
                            continue;

                        case 343:
                            DxfBlock dxfBlock3 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfBlock;
                            if (dxfBlock3 != null)
                            {
                                dimensionStyle.FirstArrowBlock = dxfBlock3;
                                continue;
                            }
                            continue;

                        case 344:
                            DxfBlock dxfBlock4 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfBlock;
                            if (dxfBlock4 != null)
                            {
                                dimensionStyle.SecondArrowBlock = dxfBlock4;
                                continue;
                            }
                            continue;

                        case 345:
                            DxfLineType dxfLineType1 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfLineType;
                            if (dxfLineType1 != null)
                            {
                                dimensionStyle.DimensionLineLineType = dxfLineType1;
                                continue;
                            }
                            continue;

                        case 346:
                            DxfLineType dxfLineType2 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfLineType;
                            if (dxfLineType2 != null)
                            {
                                dimensionStyle.FirstExtensionLineLineType = dxfLineType2;
                                continue;
                            }
                            continue;

                        case 347:
                            DxfLineType dxfLineType3 = Class309.smethod_2(modelBuilder, extendedDataValue) as DxfLineType;
                            if (dxfLineType3 != null)
                            {
                                dimensionStyle.SecondExtensionLineLineType = dxfLineType3;
                                continue;
                            }
                            continue;

                        case 371:
                            dimensionStyle.DimensionLineWeight = ((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        case 372:
                            dimensionStyle.ExtensionLineWeight = ((DxfExtendedData.Int16)extendedDataValue).Value;
                            continue;

                        default:
                            continue;
                        }
                    }
                }
                else
                {
                    modelBuilder.Messages.Add(new DxfMessage(DxfStatus.InvalidXDataValueType, Severity.Warning, "ValueType", (object)valueCollection[index1].GetType())
                    {
                        Parameters =
                        {
                            {
                                "ExpectedValueType",
                                (object)typeof(DxfExtendedData.Int16)
                            },
                            {
                                "Target",
                                (object)dimensionStyle
                            }
                        }
                    });
                    break;
                }
            }
        }
Esempio n. 6
0
 public Class333(DxfExtendedDataCollection extendedDataCollection, DxfExtendedData extendedData)
 {
     this.dxfExtendedDataCollection_0 = extendedDataCollection;
     this.dxfExtendedData_0           = extendedData;
 }
Esempio n. 7
0
        private void method_2()
        {
            DxfExtendedDataCollection extendedDataCollection = this.dxfOle_0.ExtendedDataCollection;
            DxfExtendedData           extendedData;

            extendedDataCollection.TryGetValue(this.dxfOle_0.Model.AppIds["ACAD"], out extendedData);
            if (extendedData == null)
            {
                extendedData = new DxfExtendedData(this.dxfOle_0.Model.AppIds["ACAD"]);
                extendedDataCollection.Add(extendedData);
            }
            int num = this.method_1(extendedData.Values);

            if (num == -1)
            {
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.String("OLEBEGIN"));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)70));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16(this.bool_0 ? (short)1 : (short)0));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)71));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16(this.short_0));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)40));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Double(this.double_0));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)41));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Double(this.double_1));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)42));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Double(this.double_2));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)72));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16(this.short_1));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)3));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.String(this.fontMappingData_0.Font));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)90));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int32(this.fontMappingData_0.PointSize));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)43));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Double(this.fontMappingData_0.TextHeight));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)4));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.String(this.fontMappingData_1.Font));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)91));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int32(this.fontMappingData_1.PointSize));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Int16((short)44));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.Double(this.fontMappingData_1.TextHeight));
                extendedData.Values.Add((IExtendedDataValue) new DxfExtendedData.String("OLEEND"));
            }
            else
            {
                int index1 = num + 2;
                extendedData.Values[index1] = (IExtendedDataValue) new DxfExtendedData.Int16(this.bool_0 ? (short)1 : (short)0);
                int index2 = index1 + 2;
                extendedData.Values[index2] = (IExtendedDataValue) new DxfExtendedData.Int16(this.short_0);
                int index3 = index2 + 2;
                extendedData.Values[index3] = (IExtendedDataValue) new DxfExtendedData.Double(this.double_0);
                int index4 = index3 + 2;
                extendedData.Values[index4] = (IExtendedDataValue) new DxfExtendedData.Double(this.double_1);
                int index5 = index4 + 2;
                extendedData.Values[index5] = (IExtendedDataValue) new DxfExtendedData.Double(this.double_2);
                int index6 = index5 + 2;
                extendedData.Values[index6] = (IExtendedDataValue) new DxfExtendedData.Int16(this.short_1);
                int index7 = index6 + 2;
                extendedData.Values[index7] = (IExtendedDataValue) new DxfExtendedData.String(this.fontMappingData_0.Font);
                int index8 = index7 + 2;
                extendedData.Values[index8] = (IExtendedDataValue) new DxfExtendedData.Int32(this.fontMappingData_0.PointSize);
                int index9 = index8 + 2;
                extendedData.Values[index9] = (IExtendedDataValue) new DxfExtendedData.Double(this.fontMappingData_0.TextHeight);
                int index10 = index9 + 2;
                extendedData.Values[index10] = (IExtendedDataValue) new DxfExtendedData.String(this.fontMappingData_1.Font);
                int index11 = index10 + 2;
                extendedData.Values[index11] = (IExtendedDataValue) new DxfExtendedData.Int32(this.fontMappingData_1.PointSize);
                int index12 = index11 + 2;
                extendedData.Values[index12] = (IExtendedDataValue) new DxfExtendedData.Double(this.fontMappingData_1.TextHeight);
            }
        }
Esempio n. 8
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;
     }
 }