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); }
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); } }
protected Class724(Stream stream, Encoding encoding, DxfVersion version) { this.stream_0 = stream; this.encoding_0 = encoding; this.dxfVersion_0 = version; this.int_1 = (int)Class952.smethod_1((DrawingCodePage)encoding.CodePage); }
private void method_0() { this.interface29_0.imethod_33(this.list_0[0].Position); this.interface29_0.imethod_12(Encodings.Ascii.GetBytes(this.dxfHeader_0.AcadVersionString)); this.interface29_0.imethod_11((byte)0); this.interface29_0.imethod_11((byte)0); this.interface29_0.imethod_11((byte)0); this.interface29_0.imethod_11((byte)0); this.interface29_0.imethod_11((byte)0); this.interface29_0.imethod_11((byte)this.dxfHeader_0.AcadMaintenanceVersion); this.interface29_0.imethod_11((byte)1); this.interface29_0.imethod_32((short)1559); this.interface29_0.imethod_18((short)Class952.smethod_1(this.dxfHeader_0.DrawingCodePage)); List <Class723> class723List = new List <Class723>(); foreach (Class723 class723 in this.list_0) { if (class723.SectionId.HasValue) { class723List.Add(class723); } } class723List.Sort(); this.interface29_0.imethod_32((short)class723List.Count); foreach (Class723 class723 in class723List) { this.interface29_0.imethod_11((byte)class723.SectionId.Value); this.interface29_0.imethod_33(class723.Position); this.interface29_0.imethod_33((int)class723.Size); } this.interface29_0.imethod_33(14); this.method_1((byte)0, this.dxfHeader_0.HandleSeed); this.method_1((byte)1, this.dxfModel_0.BlockRecordTable.Handle); this.method_1((byte)2, this.dxfModel_0.LayerTable.Handle); this.method_1((byte)3, this.dxfModel_0.TextStyleTable.Handle); this.method_1((byte)4, this.dxfModel_0.LineTypeTable.Handle); this.method_1((byte)5, this.dxfModel_0.ViewTable.Handle); this.method_1((byte)6, this.dxfModel_0.UcsTable.Handle); this.method_1((byte)7, this.dxfModel_0.VPortTable.Handle); this.method_1((byte)8, this.dxfModel_0.AppIdTable.Handle); this.method_1((byte)9, this.dxfModel_0.DimStyleTable.Handle); this.method_1((byte)10, this.dxfModel_0.ViewportEntityHeaderTable.Handle); this.method_1((byte)11, this.dxfModel_0.DictionaryRoot.Handle); this.method_1((byte)12, this.dxfModel_0.DefaultMLineStyle.Handle); this.method_1((byte)13, this.dxfModel_0.DictionaryAcadGroup.Handle); this.interface29_0.Flush(); }
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); }