Beispiel #1
0
        internal void method_19()
        {
            if (this.ExtensionDictionary == null)
            {
                return;
            }
            DxfObject valueByName = this.ExtensionDictionary.GetValueByName("ACAD_MLATT");

            if (!(valueByName is DxfXRecord))
            {
                return;
            }
            DxfXRecordValueCollection values = ((DxfXRecord)valueByName).Values;

            if (values.Count <= 2)
            {
                return;
            }
            DxfXRecordValue dxfXrecordValue1 = values[2];

            if (dxfXrecordValue1.Code != (short)70)
            {
                return;
            }
            int num = (int)(short)dxfXrecordValue1.Value;

            if (values.Count <= 2 + num)
            {
                return;
            }
            for (int index = 0; index < num; ++index)
            {
                DxfXRecordValue dxfXrecordValue2 = values[3 + index];
                if (dxfXrecordValue2.Code != (short)340)
                {
                    break;
                }
                DxfAttributeBase dxfAttributeBase = dxfXrecordValue2.Value as DxfAttributeBase;
                if (dxfAttributeBase != null)
                {
                    dxfAttributeBase.dxfAttributeBase_0 = this;
                }
            }
        }
Beispiel #2
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);
 }
Beispiel #3
0
 public Class485(DxfXRecordValue xrecord)
 {
     this.dxfXRecordValue_0 = xrecord;
 }
Beispiel #4
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;
                    }
                }
            }
        }