Beispiel #1
0
        private void method_1()
        {
            Class889 class889 = Class889.Create(this.stream_0, this.dxfVersion_0, this.encoding_0);

            this.class564_0.Header2Offset = (ulong)this.stream_0.Position;
            MemoryStream fileHeaderDataStream = new MemoryStream();

            this.method_2(fileHeaderDataStream);
            this.stream_0.Write(fileHeaderDataStream.GetBuffer(), 0, (int)fileHeaderDataStream.Length);
            this.stream_0.Position = 0L;
            this.stream_0.Write(Encodings.Ascii.GetBytes(this.dxfModel_0.Header.AcadVersionString), 0, 6);
            this.stream_0.Write(new byte[5], 0, 5);
            if (this.dxfModel_0.Header.AcadVersion == DxfVersion.Dxf18 && this.dxfModel_0.Header.AcadMaintenanceVersion == 1)
            {
                throw new DxfException("Header.AcadMaintenanceVersion may not be 1 for R18 files.");
            }
            this.stream_0.WriteByte((byte)this.dxfModel_0.Header.AcadMaintenanceVersion);
            this.stream_0.WriteByte((byte)3);
            class889.vmethod_11((uint)this.class617_5.Pages[0].StreamOffset + 32U);
            this.stream_0.WriteByte((byte)Class885.smethod_3(DxfVersion.Dxf27));
            this.stream_0.WriteByte((byte)8);
            ushort num = Class952.smethod_1(this.dxfModel_0.Header.DrawingCodePage);

            class889.vmethod_7(num);
            this.stream_0.Write(new byte[3], 0, 3);
            class889.vmethod_9((int)this.dxfModel_0.SecurityFlags);
            class889.vmethod_9(0);
            class889.vmethod_11((uint)this.class617_1.Pages[0].StreamOffset + 32U);
            class889.vmethod_11(0U);
            class889.vmethod_9(128);
            class889.vmethod_11((uint)this.class617_6.Pages[0].StreamOffset + 32U);
            this.stream_0.Write(new byte[80], 0, 80);
            this.stream_0.Write(fileHeaderDataStream.GetBuffer(), 0, (int)fileHeaderDataStream.Length);
            this.stream_0.Write(Class998.byte_0, 236, 20);
        }
Beispiel #2
0
        private void method_2()
        {
            Class889 class889 = Class889.Create(this.stream_0, this.dxfVersion_0, this.encoding_0);

            this.stream_0.Position = 0L;
            this.stream_0.Write(Encodings.Ascii.GetBytes(this.dxfModel_0.Header.AcadVersionString), 0, 6);
            this.stream_0.Write(new byte[5], 0, 5);
            int maintenanceVersion = this.dxfModel_0.Header.AcadMaintenanceVersion;

            this.stream_0.WriteByte((byte)this.dxfModel_0.Header.AcadMaintenanceVersion);
            this.stream_0.WriteByte((byte)3);
            class889.vmethod_11((uint)this.class504_2.Pages[0].StreamOffset + 1152U);
            this.stream_0.WriteByte((byte)Class885.smethod_3(DxfVersion.Dxf27));
            this.stream_0.WriteByte((byte)8);
            ushort num = Class952.smethod_1(this.dxfModel_0.Header.DrawingCodePage);

            class889.vmethod_7(num);
            this.stream_0.Write(new byte[3], 0, 3);
            class889.vmethod_9((int)this.dxfModel_0.SecurityFlags);
            class889.vmethod_9(0);
            class889.vmethod_11((uint)this.class504_3.Pages[0].StreamOffset + 1152U);
            class889.vmethod_11(0U);
            class889.vmethod_9(128);
            class889.vmethod_11((uint)this.class504_1.Pages[0].StreamOffset + 1152U);
            for (int index = 0; index < 80; ++index)
            {
                this.stream_0.WriteByte((byte)0);
            }
        }
Beispiel #3
0
 public static void Write(
     Class889 stream,
     DxfModel model,
     uint estimatedObjectCount,
     uint objectsSectionStreamOffset)
 {
     stream.vmethod_9(0);
     stream.vmethod_11(estimatedObjectCount);
     if (model.Header.AcadVersion >= DxfVersion.Dxf15)
     {
         stream.vmethod_27(model.Header.UpdateUtcDateTime);
     }
     else
     {
         stream.vmethod_27(model.Header.UpdateDateTime);
     }
     stream.vmethod_11(objectsSectionStreamOffset);
     stream.vmethod_1((byte)4);
     stream.vmethod_11(50U);
     stream.vmethod_11(0U);
     stream.vmethod_11(100U);
     stream.vmethod_11(0U);
     stream.vmethod_11(512U);
     stream.vmethod_11(0U);
     stream.vmethod_11(uint.MaxValue);
     stream.vmethod_11(0U);
 }
Beispiel #4
0
        private void method_11()
        {
            Class889 class889 = Class889.Create((Stream)this.class504_4.Stream, this.dxfVersion_0, this.encoding_0);

            class889.vmethod_11(0U);
            class889.vmethod_11(0U);
            class889.vmethod_11(1U);
            class889.vmethod_11(0U);
        }
Beispiel #5
0
        private void method_12()
        {
            MemoryStream memoryStream = new MemoryStream();
            Class889     class889     = Class889.Create((Stream)memoryStream, this.dxfVersion_0, this.encoding_0);

            class889.vmethod_11(0U);
            class889.vmethod_11(0U);
            class889.vmethod_11(0U);
            this.method_23(this.class617_8, memoryStream, true);
        }
Beispiel #6
0
        private void method_25(Stream pageHeaderStream, Class617 section, Class616 page, int pageType)
        {
            Class889 class889 = Class889.Create(pageHeaderStream, this.dxfVersion_0, this.encoding_0);

            class889.vmethod_9(pageType);
            class889.vmethod_9(section.SectionId);
            class889.vmethod_9(page.CompressedSize);
            class889.vmethod_9(page.PageSize);
            class889.vmethod_13((long)page.StartOffset);
            class889.vmethod_11(page.HeaderChecksum);
            class889.vmethod_11(page.DataChecksum);
        }
Beispiel #7
0
 public static void smethod_0(Class949 appInfo, Class889 byteStream)
 {
     byteStream.vmethod_11(appInfo.Unknown0);
     byteStream.vmethod_19(appInfo.Name);
     byteStream.vmethod_11(appInfo.Unknown1);
     byteStream.vmethod_2(appInfo.VersionData, 0, appInfo.VersionData.Length);
     byteStream.vmethod_19(appInfo.Version);
     byteStream.vmethod_2(appInfo.CommentData, 0, appInfo.CommentData.Length);
     byteStream.vmethod_19(appInfo.Comment);
     byteStream.vmethod_2(appInfo.ProductData, 0, appInfo.ProductData.Length);
     byteStream.vmethod_19(appInfo.Product);
 }
Beispiel #8
0
 public static void smethod_0(Class949 appInfo, Class889 byteStream)
 {
     byteStream.vmethod_19(appInfo.Name);
     byteStream.vmethod_11(appInfo.Unknown0);
     byteStream.vmethod_19("4001");
     byteStream.vmethod_19(appInfo.Product);
     byteStream.vmethod_19(appInfo.Version);
 }
Beispiel #9
0
        private void method_22(Class615 page, Stream sectionHeaderStream)
        {
            Class889 class889 = Class889.Create(sectionHeaderStream, this.dxfVersion_0, this.encoding_0);

            class889.vmethod_9(page.SectionPageType);
            class889.vmethod_9(page.DecompressedSize);
            class889.vmethod_9(page.CompressedSize);
            class889.vmethod_9(page.CompressionType);
            class889.vmethod_11(page.Checksum);
        }
Beispiel #10
0
        private void method_2(MemoryStream fileHeaderDataStream)
        {
            Stream2  stream2  = new Stream2((Stream)fileHeaderDataStream, 0U);
            Class889 class889 = Class889.Create((Stream)stream2, this.dxfVersion_0, this.encoding_0);

            byte[] bytes = Class1045.encoding_0.GetBytes("AcFssFcAJMB");
            stream2.Write(bytes, 0, 11);
            stream2.WriteByte((byte)0);
            class889.vmethod_9(0);
            class889.vmethod_9(108);
            class889.vmethod_9(4);
            class889.vmethod_9(this.class564_0.GapsRootId);
            class889.vmethod_9(this.class564_0.GapsLeftId);
            class889.vmethod_9(this.class564_0.GapsRightId);
            class889.vmethod_9(this.class564_0.GapsUnknown);
            class889.vmethod_9(this.class564_0.LastPageId);
            class889.vmethod_15(this.class564_0.LastPageEndOffset);
            class889.vmethod_15(this.class564_0.Header2Offset);
            class889.vmethod_11(this.class564_0.GapCount);
            class889.vmethod_11(this.class564_0.PageCount);
            class889.vmethod_9(32);
            class889.vmethod_9(128);
            class889.vmethod_9(64);
            class889.vmethod_11(this.class564_0.PagesMapId);
            class889.vmethod_15(this.class564_0.PagesMapOffset - 256UL);
            class889.vmethod_11(this.class564_0.SectionsMapId);
            class889.vmethod_11(this.class564_0.PagesMaxId);
            class889.vmethod_11(this.class564_0.GapsMaxId);
            long position = stream2.Position;

            class889.vmethod_11(0U);
            uint crc = stream2.Crc;

            stream2.Position = position;
            class889.vmethod_11(crc);
            stream2.Flush();
            this.method_3(fileHeaderDataStream);
        }