Пример #1
0
        internal static DxfAppId smethod_2(bool useFixedHandles)
        {
            DxfAppId dxfAppId = new DxfAppId("ACAD");

            if (useFixedHandles)
            {
                dxfAppId.SetHandle(18UL);
            }
            return(dxfAppId);
        }
Пример #2
0
        public override IGraphCloneable Clone(CloneContext cloneContext)
        {
            DxfAppId dxfAppId = (DxfAppId)cloneContext.GetExistingClone((IGraphCloneable)this);

            if (dxfAppId == null)
            {
                dxfAppId = new DxfAppId();
                cloneContext.RegisterClone((IGraphCloneable)this, (IGraphCloneable)dxfAppId);
                dxfAppId.CopyFrom((DxfHandledObject)this, cloneContext);
            }
            return((IGraphCloneable)dxfAppId);
        }
Пример #3
0
        public override void CopyFrom(DxfHandledObject from, CloneContext cloneContext)
        {
            base.CopyFrom(from, cloneContext);
            DxfAppId dxfAppId = (DxfAppId)from;

            this.string_0        = dxfAppId.string_0;
            this.standardFlags_0 = dxfAppId.standardFlags_0;
            if (dxfAppId.Handle != 18UL)
            {
                return;
            }
            this.SetHandle(18UL);
        }
Пример #4
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;
     }
 }