public virtual void SaveToStream(Stream AStream)
        {
            /* 因为可能是合并后的单元格,所以单独存宽、高 }*/
            byte[] vBuffer = BitConverter.GetBytes(FWidth);
            AStream.Write(vBuffer, 0, vBuffer.Length);

            vBuffer = BitConverter.GetBytes(FHeight);
            AStream.Write(vBuffer, 0, vBuffer.Length);

            vBuffer = BitConverter.GetBytes(FRowSpan);
            AStream.Write(vBuffer, 0, vBuffer.Length);

            vBuffer = BitConverter.GetBytes(FColSpan);
            AStream.Write(vBuffer, 0, vBuffer.Length);

            byte vByte = (byte)FAlignVert;

            AStream.WriteByte(vByte);                        // 垂直对齐方式

            HC.SaveColorToStream(AStream, FBackgroundColor); // 背景色

            AStream.WriteByte(FBorderSides.Value);

            /* 存数据 }*/
            bool vNullData = (FCellData == null);

            vBuffer = BitConverter.GetBytes(vNullData);
            AStream.Write(vBuffer, 0, vBuffer.Length);
            if (!vNullData)
            {
                FCellData.SaveToStream(AStream);
            }
        }
Exemple #2
0
        public void SaveToStream(Stream AStream)
        {
            byte[] vBuffer = BitConverter.GetBytes(FSize);
            AStream.Write(vBuffer, 0, vBuffer.Length);

            byte[] vBuffer2 = System.Text.Encoding.Default.GetBytes(FFamily);
            ushort vSize    = (ushort)vBuffer2.Length;

            vBuffer = BitConverter.GetBytes(vSize);
            AStream.Write(vBuffer, 0, vBuffer.Length);
            if (vSize > 0)
            {
                AStream.Write(vBuffer2, 0, vSize);
            }

            AStream.WriteByte(FFontStyles.Value);      // save FFontStyles

            HC.SaveColorToStream(AStream, FColor);     // save FColor
            HC.SaveColorToStream(AStream, FBackColor); // save FBackColor
        }
Exemple #3
0
        public void SaveToStream(Stream AStream)
        {
            byte vByte = (byte)FLineSpaceMode;

            AStream.WriteByte(vByte);

            byte[] vBuffer = BitConverter.GetBytes(FFristIndent);
            AStream.Write(vBuffer, 0, vBuffer.Length);

            vBuffer = BitConverter.GetBytes(FLeftIndent);
            AStream.Write(vBuffer, 0, vBuffer.Length);

            HC.SaveColorToStream(AStream, FBackColor);  // save BackColor

            vByte = (byte)FAlignHorz;
            AStream.WriteByte(vByte);

            vByte = (byte)FAlignVert;
            AStream.WriteByte(vByte);
        }