예제 #1
0
        public override void SaveToStream(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStream(aStream, aStart, aEnd);
            string vS = "";

            if (FItems.Count > 0)
            {
                vS = FItems[0].Text;
                if (vS == "")
                {
                    vS = "未命名";
                }

                for (int i = 1; i < FItems.Count; i++)
                {
                    if (FItems[i].Text != "")
                    {
                        vS = vS + HC.sLineBreak + FItems[i].Text;
                    }
                    else
                    {
                        vS = vS + HC.sLineBreak + "未命名";
                    }
                }
            }

            HC.HCSaveTextToStream(aStream, vS);

            for (int i = 0; i < FItems.Count; i++)
            {
                byte[] vBuffer = BitConverter.GetBytes(FItems[i].Checked);
                aStream.Write(vBuffer, 0, vBuffer.Length);
            }
        }
예제 #2
0
        public override void SaveToStream(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStream(aStream, aStart, aEnd);
            string vTexts = "", vTextValues = "";

            if (FItems.Count > 0)
            {
                vTexts      = FItems[0].Text;
                vTextValues = FItems[0].TextValue;
                for (int i = 1; i < FItems.Count; i++)
                {
                    vTexts      = vTexts + HC.sLineBreak + FItems[i].Text;
                    vTextValues = vTextValues + HC.sLineBreak + FItems[i].TextValue;
                }
            }

            HC.HCSaveTextToStream(aStream, vTexts);
            HC.HCSaveTextToStream(aStream, vTextValues);

            byte[] vBuffer;
            for (int i = 0; i < FItems.Count; i++)
            {
                vBuffer = BitConverter.GetBytes(FItems[i].Checked);
                aStream.Write(vBuffer, 0, vBuffer.Length);
            }

            aStream.WriteByte((byte)this.FRadioStyle);
        }
예제 #3
0
        public override void SaveToStream(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStream(aStream, aStart, aEnd);

            ushort vSize = 0;

            if (FSaveItem)
            {
                string vText = "";

                if (FItems.Count > 0)
                {
                    vText = FItems[0];
                    for (int i = 1; i < FItems.Count; i++)
                    {
                        vText = vText + HC.sLineBreak + FItems[i];
                    }
                }

                HC.HCSaveTextToStream(aStream, vText);
            }
            else
            {
                byte[] vBuffer = BitConverter.GetBytes(vSize);
                aStream.Write(vBuffer, 0, vBuffer.Length);
            }
        }
예제 #4
0
        public override void SaveToStreamRange(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStreamRange(aStream, aStart, aEnd);

            byte[] vBuffer = BitConverter.GetBytes(FChecked);
            aStream.Write(vBuffer, 0, vBuffer.Length); // 存勾选状态
            HC.HCSaveTextToStream(aStream, FText);     // 存Text
        }
예제 #5
0
        public override void SaveToStreamRange(System.IO.Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStreamRange(aStream, aStart, aEnd);
            HC.HCSaveTextToStream(aStream, FFormat);  // 存Format

            byte[] vBuffer = BitConverter.GetBytes(FDateTime.ToOADate());
            aStream.Write(vBuffer, 0, vBuffer.Length);
        }
예제 #6
0
        public override void SaveToStreamRange(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStreamRange(aStream, aStart, aEnd);

            Byte vByte = FColumns;

            aStream.WriteByte(vByte);

            if (FMultSelect)
            {
                vByte = (byte)(vByte | (1 << 7));
            }

            if (FItemHit)
            {
                vByte = (byte)(vByte | (1 << 6));
            }

            if (FColumnAlign)
            {
                vByte = (byte)(vByte | (1 << 5));
            }

            if (FBoxRight)
            {
                vByte = (byte)(vByte | (1 << 4));
            }

            aStream.WriteByte(vByte);

            string vTexts = "", vTextValues = "";

            if (FItems.Count > 0)
            {
                vTexts      = FItems[0].Text;
                vTextValues = FItems[0].TextValue;
                for (int i = 1; i < FItems.Count; i++)
                {
                    vTexts      = vTexts + HC.sLineBreak + FItems[i].Text;
                    vTextValues = vTextValues + HC.sLineBreak + FItems[i].TextValue;
                }
            }

            HC.HCSaveTextToStream(aStream, vTexts);
            HC.HCSaveTextToStream(aStream, vTextValues);

            byte[] vBuffer;
            for (int i = 0; i < FItems.Count; i++)
            {
                vBuffer = BitConverter.GetBytes(FItems[i].Checked);
                aStream.Write(vBuffer, 0, vBuffer.Length);
            }

            aStream.WriteByte((byte)this.FRadioStyle);
        }
예제 #7
0
        public override void SaveToStream(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStream(aStream, aStart, aEnd);
            HC.HCSaveTextToStream(aStream, FText);  // 存Text

            byte[] vBuffer = BitConverter.GetBytes(FReadOnly);
            aStream.Write(vBuffer, 0, vBuffer.Length);

            aStream.WriteByte(FBorderSides.Value);
            aStream.WriteByte(FBorderWidth);
        }
예제 #8
0
        public void SaveToStream(Stream aStream)
        {
            byte[] vBuffer = BitConverter.GetBytes(FSize);
            aStream.Write(vBuffer, 0, vBuffer.Length);

            HC.HCSaveTextToStream(aStream, FFamily);

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

            HC.HCSaveColorToStream(aStream, FColor);     // save FColor
            HC.HCSaveColorToStream(aStream, FBackColor); // save FBackColor
        }
예제 #9
0
        public override void SaveToStream(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStream(aStream, aStart, aEnd);
            HC.HCSaveTextToStream(aStream, FCode128.Text);
            byte[] vBuffer = BitConverter.GetBytes(FAutoSize);
            aStream.Write(vBuffer, 0, vBuffer.Length);

            vBuffer = BitConverter.GetBytes(FCode128.TextVisible);
            aStream.Write(vBuffer, 0, vBuffer.Length);

            aStream.WriteByte(FCode128.Zoom);
        }
예제 #10
0
        public override void SaveToStream(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStream(aStream, aStart, aEnd);
            HC.HCSaveTextToStream(aStream, FText);
            byte[] vBuffer = BitConverter.GetBytes(FAutoSize);
            aStream.Write(vBuffer, 0, vBuffer.Length);

            vBuffer = BitConverter.GetBytes(FShowText);
            aStream.Write(vBuffer, 0, vBuffer.Length);

            aStream.WriteByte(FPenWidth);
        }
예제 #11
0
        public override void SaveToStreamRange(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStreamRange(aStream, aStart, aEnd);

            byte vByte = 0;

            if (FStatic)
            {
                vByte = (byte)(vByte | (1 << 7));
            }

            if (FSaveItem)
            {
                vByte = (byte)(vByte | (1 << 6));
            }

            aStream.WriteByte(vByte);

            if (FSaveItem)
            {
                string vText = "";
                if (FItems.Count > 0)
                {
                    vText = FItems[0].Text;
                    for (int i = 1; i < FItems.Count; i++)
                    {
                        vText = vText + HC.sLineBreak + FItems[i].Text;
                    }
                }

                HC.HCSaveTextToStream(aStream, vText);

                vText = "";
                if (FItemValues.Count > 0)
                {
                    vText = FItemValues[0].Text;
                    for (int i = 1; i < FItemValues.Count; i++)
                    {
                        vText = vText + HC.sLineBreak + FItemValues[i].Text;
                    }
                }

                HC.HCSaveTextToStream(aStream, vText);
            }
        }
예제 #12
0
        public override void SaveToStreamRange(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStreamRange(aStream, aStart, aEnd);

            byte vByte = 0;

            if (FChecked)
            {
                vByte = (byte)(vByte | (1 << 7));
            }

            if (FBoxRight)
            {
                vByte = (byte)(vByte | (1 << 6));
            }

            aStream.WriteByte(vByte);
            HC.HCSaveTextToStream(aStream, FText);  // 存Text
        }
예제 #13
0
        public void SaveToStream(Stream aStream)
        {
            byte[] vBuffer = BitConverter.GetBytes(this.StartItemNo);
            aStream.Write(vBuffer, 0, vBuffer.Length);

            vBuffer = BitConverter.GetBytes(this.StartItemOffset);
            aStream.Write(vBuffer, 0, vBuffer.Length);

            vBuffer = BitConverter.GetBytes(this.EndItemNo);
            aStream.Write(vBuffer, 0, vBuffer.Length);

            vBuffer = BitConverter.GetBytes(this.EndItemOffset);
            aStream.Write(vBuffer, 0, vBuffer.Length);

            vBuffer = BitConverter.GetBytes(FID);
            aStream.Write(vBuffer, 0, vBuffer.Length);

            HC.HCSaveTextToStream(aStream, FTitle);
            HC.HCSaveTextToStream(aStream, FText);
        }
예제 #14
0
        public override void SaveToStreamRange(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStreamRange(aStream, aStart, aEnd);
            HC.HCSaveTextToStream(aStream, FText);  // 存Text

            byte vByte = 0;

            if (FReadOnly)
            {
                vByte = (byte)(vByte | (1 << 7));
            }

            if (FPrintOnlyText)
            {
                vByte = (byte)(vByte | (1 << 6));
            }

            aStream.WriteByte(vByte);

            aStream.WriteByte(FBorderSides.Value);
            aStream.WriteByte(FBorderWidth);
        }
예제 #15
0
        // 保存和读取
        public override void SaveToStream(Stream aStream, int aStart, int aEnd)
        {
            base.SaveToStream(aStream, aStart, aEnd);
            string vS = SubString(aStart + 1, aEnd - aStart);

            byte[] vBuffer = System.Text.Encoding.Unicode.GetBytes(vS);
            uint   vDSize  = (uint)vBuffer.Length;

            if (vDSize > HC.HC_TEXTMAXSIZE)
            {
                throw new Exception(HC.HCS_EXCEPTION_TEXTOVER);
            }

            byte[] vBytes = System.BitConverter.GetBytes(vDSize);
            aStream.Write(vBytes, 0, vBytes.Length);

            if (vDSize > 0)
            {
                aStream.Write(vBuffer, 0, vBuffer.Length);
            }

            HC.HCSaveTextToStream(aStream, FHyperLink);
        }
예제 #16
0
 public void SaveToStream(Stream stream)
 {
     HC.HCSaveTextToStream(stream, Title);
     HC.HCSaveTextToStream(stream, Text);
 }
예제 #17
0
 public override void SaveToStreamRange(Stream aStream, int aStart, int aEnd)
 {
     base.SaveToStreamRange(aStream, aStart, aEnd);
     HC.HCSaveTextToStream(aStream, FCode128.Text);
 }
예제 #18
0
 public override void SaveToStream(Stream aStream, int aStart, int aEnd)
 {
     base.SaveToStream(aStream, aStart, aEnd);
     HC.HCSaveTextToStream(aStream, FTopText);
     HC.HCSaveTextToStream(aStream, FBottomText);
 }
예제 #19
0
 public override void SaveToStreamRange(Stream aStream, int aStart, int aEnd)
 {
     base.SaveToStreamRange(aStream, aStart, aEnd);
     HC.HCSaveTextToStream(aStream, FLeftText);
     HC.HCSaveTextToStream(aStream, FRightText);
 }