Пример #1
0
        public static DxfExtendedData.ValueCollection smethod_4(
            DxfHandledObject o,
            DxfModel model)
        {
            if (!o.HasExtendedData)
            {
                return((DxfExtendedData.ValueCollection)null);
            }
            DxfAppId appId;

            if (model == null || !model.AppIds.TryGetValue("AcadAnnotative", out appId))
            {
                return((DxfExtendedData.ValueCollection)null);
            }
            DxfExtendedData extendedData;

            if (!o.ExtendedDataCollection.TryGetValue(appId, out extendedData))
            {
                return((DxfExtendedData.ValueCollection)null);
            }
            DxfExtendedData.ValueCollection valueCollection = (DxfExtendedData.ValueCollection)null;
            if (extendedData.Values.Count > 1)
            {
                valueCollection = extendedData.Values[1] as DxfExtendedData.ValueCollection;
            }
            return(valueCollection);
        }
Пример #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);
     }
 }
Пример #3
0
 private int method_1(DxfExtendedData.ValueCollection values)
 {
     for (int index = 0; index < values.Count; ++index)
     {
         DxfExtendedData.String @string = values[index] as DxfExtendedData.String;
         if (@string != null && @string.Value == "OLEBEGIN")
         {
             return(index);
         }
     }
     return(-1);
 }
Пример #4
0
 public static bool smethod_1(DxfHandledObject o, DxfModel model)
 {
     DxfExtendedData.ValueCollection valueCollection = Class1064.smethod_4(o, model);
     if (valueCollection == null || valueCollection.Count < 2)
     {
         return(false);
     }
     DxfExtendedData.Int16 int16 = valueCollection[1] as DxfExtendedData.Int16;
     if (int16 != null)
     {
         return(int16.Value != (short)0);
     }
     return(false);
 }
Пример #5
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);
         }
     }
 }
Пример #6
0
        public static Class1064 Get(DxfHandledObject o)
        {
            Class1064 class1064 = new Class1064();

            DxfExtendedData.ValueCollection valueCollection = Class1064.smethod_4(o, o.Model);
            if (valueCollection != null && valueCollection.Count > 0)
            {
                DxfExtendedData.Int16 int16_1 = valueCollection[0] as DxfExtendedData.Int16;
                if (int16_1 != null)
                {
                    class1064.bool_0 = int16_1.Value != (short)0;
                }
                if (valueCollection.Count > 1)
                {
                    DxfExtendedData.Int16 int16_2 = valueCollection[1] as DxfExtendedData.Int16;
                    if (int16_2 != null)
                    {
                        class1064.bool_1 = int16_2.Value != (short)0;
                    }
                }
            }
            return(class1064);
        }
Пример #7
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;
                }
            }
        }
Пример #8
0
        internal void method_18(DxfModel model)
        {
            DxfExtendedData extendedData;

            if (!this.ExtendedDataCollection.TryGetValue(model.AppIdAcad, out extendedData) || extendedData.Values.Count != 2)
            {
                return;
            }
            DxfExtendedData.ValueCollection valueCollection = (DxfExtendedData.ValueCollection)extendedData.Values[1];
            if (valueCollection.Count != 27)
            {
                return;
            }
            this.point3D_1    = ((DxfExtendedData.PointOrVector)valueCollection[1]).GetPoint3D();
            this.vector3D_0   = ((DxfExtendedData.PointOrVector)valueCollection[2]).GetVector3D();
            this.double_6     = ((DxfExtendedData.Double)valueCollection[3]).Value;
            this.double_4     = ((DxfExtendedData.Double)valueCollection[4]).Value;
            this.point2D_0.X  = ((DxfExtendedData.Double)valueCollection[5]).Value;
            this.point2D_0.Y  = ((DxfExtendedData.Double)valueCollection[6]).Value;
            this.double_1     = ((DxfExtendedData.Double)valueCollection[7]).Value;
            this.double_2     = ((DxfExtendedData.Double)valueCollection[8]).Value;
            this.double_3     = ((DxfExtendedData.Double)valueCollection[9]).Value;
            this.StatusFlags |= (ViewportStatusFlags)((DxfExtendedData.Int16)valueCollection[10]).Value;
            this.double_7     = (double)((DxfExtendedData.Int16)valueCollection[11]).Value;
            if (((DxfExtendedData.Int16)valueCollection[12]).Value == (short)1)
            {
                this.StatusFlags |= ViewportStatusFlags.FastZoom;
            }
            this.bool_3 = ((DxfExtendedData.Int16)valueCollection[13]).Value == (short)1;
            if (((DxfExtendedData.Int16)valueCollection[14]).Value == (short)1)
            {
                this.StatusFlags |= ViewportStatusFlags.SnapMode;
            }
            if (((DxfExtendedData.Int16)valueCollection[15]).Value == (short)1)
            {
                this.StatusFlags |= ViewportStatusFlags.GridMode;
            }
            if (((DxfExtendedData.Int16)valueCollection[16]).Value == (short)1)
            {
                this.StatusFlags |= ViewportStatusFlags.IsometricSnapStyle;
            }
            short num = ((DxfExtendedData.Int16)valueCollection[17]).Value;

            if (((int)num & 1) != 0)
            {
                this.StatusFlags |= ViewportStatusFlags.KIsoPairTop;
            }
            if (((int)num & 2) != 0)
            {
                this.StatusFlags |= ViewportStatusFlags.KIsoPairRight;
            }
            this.double_5     = ((DxfExtendedData.Double)valueCollection[18]).Value;
            this.point2D_1.X  = ((DxfExtendedData.Double)valueCollection[19]).Value;
            this.point2D_1.Y  = ((DxfExtendedData.Double)valueCollection[20]).Value;
            this.vector2D_0.X = ((DxfExtendedData.Double)valueCollection[21]).Value;
            this.vector2D_0.Y = ((DxfExtendedData.Double)valueCollection[22]).Value;
            this.vector2D_1.X = ((DxfExtendedData.Double)valueCollection[23]).Value;
            this.vector2D_1.Y = ((DxfExtendedData.Double)valueCollection[24]).Value;
            if (((DxfExtendedData.Int16)valueCollection[25]).Value == (short)1)
            {
                this.StatusFlags |= ViewportStatusFlags.HidePlot;
            }
            foreach (IExtendedDataValue extendedDataValue in (List <IExtendedDataValue>)valueCollection[26])
            {
                DxfExtendedData.LayerReference layerReference = extendedDataValue as DxfExtendedData.LayerReference;
                if (layerReference != null)
                {
                    this.dxfHandledObjectCollection_1.Add(layerReference.Value);
                }
                else
                {
                    DxfExtendedData.String @string = extendedDataValue as DxfExtendedData.String;
                    if (@string == null)
                    {
                        throw new DxfException("Illegal frozen layer value. Expected layer reference or layer reference name string.");
                    }
                    this.dxfHandledObjectCollection_1.Add(model.Layers[@string.Value]);
                }
            }
        }
Пример #9
0
        private void method_9()
        {
            DxfExtendedData extendedData;

            this.dxfOle_0.ExtendedDataCollection.TryGetValue(this.dxfOle_0.Model.AppIds["ACAD"], out extendedData);
            if (extendedData == null)
            {
                this.method_0();
            }
            else
            {
                int num1 = this.method_1(extendedData.Values);
                if (num1 == -1)
                {
                    this.method_0();
                }
                else
                {
                    DxfExtendedData.ValueCollection values1 = extendedData.Values;
                    int index1 = num1;
                    int num2   = index1 + 1;
                    this.method_3(values1[index1], "OLEBEGIN");
                    DxfExtendedData.ValueCollection values2 = extendedData.Values;
                    int index2 = num2;
                    int num3   = index2 + 1;
                    this.method_5(values2[index2], (short)70);
                    DxfExtendedData.ValueCollection values3 = extendedData.Values;
                    int index3 = num3;
                    int num4   = index3 + 1;
                    this.bool_0 = this.method_6(values3[index3]) == (short)1;
                    DxfExtendedData.ValueCollection values4 = extendedData.Values;
                    int index4 = num4;
                    int num5   = index4 + 1;
                    this.method_5(values4[index4], (short)71);
                    DxfExtendedData.ValueCollection values5 = extendedData.Values;
                    int index5 = num5;
                    int num6   = index5 + 1;
                    this.short_0 = this.method_6(values5[index5]);
                    DxfExtendedData.ValueCollection values6 = extendedData.Values;
                    int index6 = num6;
                    int num7   = index6 + 1;
                    this.method_5(values6[index6], (short)40);
                    DxfExtendedData.ValueCollection values7 = extendedData.Values;
                    int index7 = num7;
                    int num8   = index7 + 1;
                    this.double_0 = this.method_8(values7[index7]);
                    DxfExtendedData.ValueCollection values8 = extendedData.Values;
                    int index8 = num8;
                    int num9   = index8 + 1;
                    this.method_5(values8[index8], (short)41);
                    DxfExtendedData.ValueCollection values9 = extendedData.Values;
                    int index9 = num9;
                    int num10  = index9 + 1;
                    this.double_1 = this.method_8(values9[index9]);
                    DxfExtendedData.ValueCollection values10 = extendedData.Values;
                    int index10 = num10;
                    int num11   = index10 + 1;
                    this.method_5(values10[index10], (short)42);
                    DxfExtendedData.ValueCollection values11 = extendedData.Values;
                    int index11 = num11;
                    int num12   = index11 + 1;
                    this.double_2 = this.method_8(values11[index11]);
                    DxfExtendedData.ValueCollection values12 = extendedData.Values;
                    int index12 = num12;
                    int num13   = index12 + 1;
                    this.method_5(values12[index12], (short)72);
                    DxfExtendedData.ValueCollection values13 = extendedData.Values;
                    int index13 = num13;
                    int num14   = index13 + 1;
                    this.short_1 = this.method_6(values13[index13]);
                    DxfExtendedData.ValueCollection values14 = extendedData.Values;
                    int index14 = num14;
                    int num15   = index14 + 1;
                    this.method_5(values14[index14], (short)3);
                    FontMappingData fontMappingData0_1       = this.fontMappingData_0;
                    DxfExtendedData.ValueCollection values15 = extendedData.Values;
                    int    index15 = num15;
                    int    num16   = index15 + 1;
                    string str1    = this.method_4(values15[index15]);
                    fontMappingData0_1.Font = str1;
                    DxfExtendedData.ValueCollection values16 = extendedData.Values;
                    int index16 = num16;
                    int num17   = index16 + 1;
                    this.method_5(values16[index16], (short)90);
                    FontMappingData fontMappingData0_2       = this.fontMappingData_0;
                    DxfExtendedData.ValueCollection values17 = extendedData.Values;
                    int index17 = num17;
                    int num18   = index17 + 1;
                    int num19   = this.method_7(values17[index17]);
                    fontMappingData0_2.PointSize = num19;
                    DxfExtendedData.ValueCollection values18 = extendedData.Values;
                    int index18 = num18;
                    int num20   = index18 + 1;
                    this.method_5(values18[index18], (short)43);
                    FontMappingData fontMappingData0_3       = this.fontMappingData_0;
                    DxfExtendedData.ValueCollection values19 = extendedData.Values;
                    int    index19 = num20;
                    int    num21   = index19 + 1;
                    double num22   = this.method_8(values19[index19]);
                    fontMappingData0_3.TextHeight = num22;
                    DxfExtendedData.ValueCollection values20 = extendedData.Values;
                    int index20 = num21;
                    int num23   = index20 + 1;
                    this.method_5(values20[index20], (short)4);
                    FontMappingData fontMappingData1_1       = this.fontMappingData_1;
                    DxfExtendedData.ValueCollection values21 = extendedData.Values;
                    int    index21 = num23;
                    int    num24   = index21 + 1;
                    string str2    = this.method_4(values21[index21]);
                    fontMappingData1_1.Font = str2;
                    DxfExtendedData.ValueCollection values22 = extendedData.Values;
                    int index22 = num24;
                    int num25   = index22 + 1;
                    this.method_5(values22[index22], (short)91);
                    FontMappingData fontMappingData1_2       = this.fontMappingData_1;
                    DxfExtendedData.ValueCollection values23 = extendedData.Values;
                    int index23 = num25;
                    int num26   = index23 + 1;
                    int num27   = this.method_7(values23[index23]);
                    fontMappingData1_2.PointSize = num27;
                    DxfExtendedData.ValueCollection values24 = extendedData.Values;
                    int index24 = num26;
                    int num28   = index24 + 1;
                    this.method_5(values24[index24], (short)44);
                    FontMappingData fontMappingData1_3       = this.fontMappingData_1;
                    DxfExtendedData.ValueCollection values25 = extendedData.Values;
                    int    index25 = num28;
                    int    index26 = index25 + 1;
                    double num29   = this.method_8(values25[index25]);
                    fontMappingData1_3.TextHeight = num29;
                    this.method_3(extendedData.Values[index26], "OLEEND");
                }
            }
        }