Ejemplo n.º 1
0
 public Class1033(Stream stream, DxfModel model)
 {
     this.stream_0       = stream;
     this.dxfModel_0     = model;
     this.memoryStream_0 = new MemoryStream(500);
     this.interface29_0  = Class724.Create(model.Header.AcadVersion, (Stream)this.memoryStream_0, Encodings.GetEncoding((int)model.Header.DrawingCodePage));
 }
Ejemplo n.º 2
0
 public Class654(Stream stream, DxfModel model, List <Class723> sections)
 {
     this.stream_0       = stream;
     this.dxfModel_0     = model;
     this.dxfHeader_0    = model.Header;
     this.memoryStream_0 = new MemoryStream(500);
     this.interface29_0  = Class724.Create(model.Header.AcadVersion, (Stream)this.memoryStream_0, Encodings.GetEncoding((int)model.Header.DrawingCodePage));
     this.list_0         = sections;
 }
Ejemplo n.º 3
0
        public void Write()
        {
            byte[] buffer1   = new byte[10];
            byte[] buffer2   = new byte[5];
            ulong  num1      = 0;
            long   num2      = 0;
            long   position1 = this.memoryStream_0.Position;

            this.memoryStream_0.WriteByte((byte)0);
            this.memoryStream_0.WriteByte((byte)0);
            foreach (Class991 class991 in this.list_0)
            {
                long  num3   = class991.StreamPosition + (long)this.int_0;
                ulong num4   = class991.Handle - num1;
                long  num5   = num3 - num2;
                int   count1 = Class724.smethod_5(num4, buffer1);
                int   count2 = Class724.smethod_4((int)num5, buffer2);
                int   num6   = count1 + count2;
                if (this.memoryStream_0.Position - position1 + (long)num6 > 2032L)
                {
                    this.method_0(position1);
                    ulong num7 = 0;
                    position1 = this.memoryStream_0.Position;
                    this.memoryStream_0.WriteByte((byte)0);
                    this.memoryStream_0.WriteByte((byte)0);
                    num7 = 0UL;
                    long  num8 = 0;
                    ulong num9 = class991.Handle - 0UL;
                    if (num9 == 0UL)
                    {
                        throw new Exception(string.Format("Non unique handle encountered: {0}", (object)class991.Handle));
                    }
                    long num10 = num3 - num8;
                    count1 = Class724.smethod_5(num9, buffer1);
                    count2 = Class724.smethod_4((int)num10, buffer2);
                }
                this.memoryStream_0.Write(buffer1, 0, count1);
                this.memoryStream_0.Write(buffer2, 0, count2);
                num1 = class991.Handle;
                num2 = num3;
            }
            this.method_0(position1);
            long position2 = this.memoryStream_0.Position;

            this.memoryStream_0.WriteByte((byte)0);
            this.memoryStream_0.WriteByte((byte)0);
            this.method_0(position2);
        }
Ejemplo n.º 4
0
        private void method_12()
        {
            int          sectionStartPosition1 = (int)Class653.smethod_0(this.int_0);
            int          num1 = sectionStartPosition1 + (int)this.memoryStream_0.Length;
            int          sectionStartPosition2 = num1 + (int)this.memoryStream_4.Length;
            int          sectionStartPosition3 = sectionStartPosition2 + (int)this.memoryStream_1.Length;
            int          sectionStartPosition4 = sectionStartPosition3 + (int)this.memoryStream_2.Length + (int)this.memoryStream_3.Length + (int)this.memoryStream_5.Length;
            int          sectionStartPosition5 = sectionStartPosition4 + (int)this.memoryStream_6.Length + (int)this.memoryStream_7.Length;
            MemoryStream memoryStream          = new MemoryStream();
            Interface29  streamWriter          = Class724.Create(this.dxfVersion_0, (Stream)memoryStream, Encodings.GetEncoding((int)this.dxfModel_0.Header.DrawingCodePage));

            streamWriter.imethod_13(Encodings.Ascii.GetBytes(this.dxfModel_0.Header.AcadVersionString), 0, 6);
            Interface29 nterface29 = streamWriter;

            byte[] numArray = new byte[7];
            numArray[5] = (byte)15;
            numArray[6] = (byte)1;
            byte[] bytes = numArray;
            nterface29.imethod_12(bytes);
            streamWriter.imethod_19(num1);
            streamWriter.imethod_11((byte)27);
            streamWriter.imethod_11((byte)25);
            int num2 = (int)Class952.smethod_1(this.dxfModel_0.Header.DrawingCodePage);

            streamWriter.imethod_13(LittleEndianBitConverter.GetBytes((short)num2), 0, 2);
            streamWriter.imethod_13(LittleEndianBitConverter.GetBytes(this.int_0), 0, 4);
            long position = this.stream_0.Position;

            this.method_13(streamWriter, (byte)0, sectionStartPosition2, (int)this.memoryStream_1.Length);
            this.method_13(streamWriter, (byte)1, sectionStartPosition3, (int)this.memoryStream_2.Length);
            this.method_13(streamWriter, (byte)2, sectionStartPosition4, (int)this.memoryStream_6.Length);
            this.method_13(streamWriter, (byte)3, 0, 0);
            this.method_13(streamWriter, (byte)4, sectionStartPosition5, (int)this.memoryStream_9.Length);
            this.method_13(streamWriter, (byte)5, sectionStartPosition1, (int)this.memoryStream_0.Length);
            streamWriter.Flush();
            ushort num3 = Stream1.smethod_1((ushort)49345, memoryStream.GetBuffer(), 0L, memoryStream.Length);

            streamWriter.imethod_18((short)num3);
            streamWriter.imethod_13(Class800.byte_4, 0, Class800.byte_4.Length);
            this.stream_0.Write(memoryStream.GetBuffer(), 0, (int)memoryStream.Length);
        }
Ejemplo n.º 5
0
        public void Write()
        {
            Interface29 nterface29 = Class724.Create(this.dxfVersion_0, (Stream)this.memoryStream_0, this.encoding_0);

            nterface29.imethod_11(byte.MaxValue);
            nterface29.imethod_11((byte)119);
            nterface29.imethod_11((byte)1);
            DwgVersion dwgVersion = Class885.smethod_3(this.dxfModel_0.Header.AcadVersion);

            nterface29.imethod_18((short)dwgVersion);
            nterface29.imethod_18((short)this.dxfModel_0.Header.AcadMaintenanceVersion);
            nterface29.imethod_19(this.dxfModel_0.NumberOfSaves);
            nterface29.imethod_19(-1);
            short num1 = this.dxfModel_0.NumberOfSaves <= (int)short.MaxValue ? (short)0 : (short)(this.dxfModel_0.NumberOfSaves - (int)short.MaxValue);
            short num2 = (short)(this.dxfModel_0.NumberOfSaves - (int)num1);

            nterface29.imethod_18(num2);
            nterface29.imethod_18(num1);
            nterface29.imethod_19(0);
            nterface29.imethod_18((short)dwgVersion);
            nterface29.imethod_18((short)this.dxfModel_0.Header.AcadMaintenanceVersion);
            nterface29.imethod_18((short)dwgVersion);
            nterface29.imethod_18((short)this.dxfModel_0.Header.AcadMaintenanceVersion);
            nterface29.imethod_18((short)5);
            nterface29.imethod_18((short)2195);
            nterface29.imethod_18((short)5);
            nterface29.imethod_18((short)2195);
            nterface29.imethod_18((short)0);
            nterface29.imethod_18((short)1);
            nterface29.imethod_19(0);
            nterface29.imethod_19(0);
            nterface29.imethod_19(0);
            nterface29.imethod_19(0);
            nterface29.imethod_19(0);
            int days1;
            int milliseconds1;

            Class644.smethod_1(this.dxfModel_0.Header.CreateDateTime, out days1, out milliseconds1);
            nterface29.imethod_19(days1);
            nterface29.imethod_19(milliseconds1);
            int days2;
            int milliseconds2;

            Class644.smethod_1(this.dxfModel_0.Header.UpdateDateTime, out days2, out milliseconds2);
            nterface29.imethod_19(days2);
            nterface29.imethod_19(milliseconds2);
            int num3 = -1;

            if (this.dxfModel_0.Header.HandleSeed <= (ulong)int.MaxValue)
            {
                num3 = (int)this.dxfModel_0.Header.HandleSeed;
            }
            nterface29.imethod_19(num3);
            nterface29.imethod_19(0);
            nterface29.imethod_18((short)0);
            nterface29.imethod_18((short)((int)num2 - (int)num1));
            nterface29.imethod_19(0);
            nterface29.imethod_19(0);
            nterface29.imethod_19(0);
            nterface29.imethod_19(this.dxfModel_0.NumberOfSaves);
            nterface29.imethod_19(0);
            nterface29.imethod_19(0);
            nterface29.imethod_19(0);
            nterface29.imethod_19(0);
        }
Ejemplo n.º 6
0
 public void imethod_43(ReferenceType?referenceType, ulong handle)
 {
     Class724.smethod_3(referenceType, handle, new System.Action <byte>(this.imethod_11));
 }