public override void Write(BinaryWriter writer) { using (MemoryStream stream = new MemoryStream()) { using (BinaryWriter writer2 = new BinaryWriter((Stream)stream)) { WriteHelper.WriteBiffStr(writer2, this.FormatString, false, false, false, false, 2); ushort num = (ushort)(2L + stream.Length); writer.Write(this.RecordNumber); writer.Write(num); writer.Write(this.FormatIndex); writer.Write(stream.GetBuffer(), 0, (int)stream.Length); } } }
public override void Write(BinaryWriter writer) { writer.Write(this.RecordNumber); ushort num = (ushort)(0x10 + (this.FontName.Length * 2)); writer.Write(num); writer.Write((ushort)((ushort)this.FontHeight)); writer.Write(this.GetFontAttributeRecord()); writer.Write(this.ColorIndex); if (this.IsBold) { writer.Write((short)700); } else { writer.Write((short)400); } writer.Write(this.SuperScript); writer.Write(this.UnderlineStyle); writer.Write(this.FontFamily); writer.Write(this.CharacterSet); writer.Write((byte)0); WriteHelper.WriteBiffStr(writer, this.FontName, true, true, false, false, 1); }