Exemple #1
0
 protected void SetRightIndent(Single value)
 {
     if (FRightIndent != value)
     {
         FRightIndent    = value;
         FRightIndentPix = HCUnitConversion.MillimeterToPixX(FRightIndent);
     }
 }
Exemple #2
0
        public void LoadFromStream(Stream aStream, ushort aFileVersion)
        {
            byte[] vBuffer;
            if (aFileVersion < 15)
            {
                int vLineSpace = 0;
                vBuffer = BitConverter.GetBytes(vLineSpace);
                aStream.Read(vBuffer, 0, vBuffer.Length);
            }

            byte vByte = 0;

            if (aFileVersion > 16)
            {
                vByte          = (byte)aStream.ReadByte();
                FLineSpaceMode = (ParaLineSpaceMode)vByte;
            }

            if (aFileVersion < 22)
            {
                vBuffer = BitConverter.GetBytes(FFirstIndentPix);
                aStream.Read(vBuffer, 0, vBuffer.Length);
                FFirstIndentPix = BitConverter.ToInt32(vBuffer, 0);
                //
                vBuffer = BitConverter.GetBytes(FLeftIndentPix);
                aStream.Read(vBuffer, 0, vBuffer.Length);
                FLeftIndentPix = BitConverter.ToInt32(vBuffer, 0);
            }
            else
            {
                vBuffer = BitConverter.GetBytes(FFirstIndent);
                aStream.Read(vBuffer, 0, vBuffer.Length);
                FFirstIndent    = BitConverter.ToSingle(vBuffer, 0);
                FFirstIndentPix = HCUnitConversion.MillimeterToPixX(FFirstIndent);
                //
                vBuffer = BitConverter.GetBytes(FLeftIndent);
                aStream.Read(vBuffer, 0, vBuffer.Length);
                FLeftIndent    = BitConverter.ToSingle(vBuffer, 0);
                FLeftIndentPix = HCUnitConversion.MillimeterToPixX(FLeftIndent);
                //
                vBuffer = BitConverter.GetBytes(FRightIndent);
                aStream.Read(vBuffer, 0, vBuffer.Length);
                FRightIndent    = BitConverter.ToSingle(vBuffer, 0);
                FRightIndentPix = HCUnitConversion.MillimeterToPixX(FRightIndent);
            }

            //
            HC.HCLoadColorFromStream(aStream, ref FBackColor);
            //
            vByte      = (byte)aStream.ReadByte();
            FAlignHorz = (ParaAlignHorz)vByte;

            if (aFileVersion > 17)
            {
                vByte      = (byte)aStream.ReadByte();
                FAlignVert = (ParaAlignVert)vByte;
            }
        }
Exemple #3
0
 protected void SetMarginRight(Single value)
 {
     FMarginRight    = value;
     FMarginRightPix = HCUnitConversion.MillimeterToPixX(FMarginRight);
 }
Exemple #4
0
 protected void SetWidth(Single value)
 {
     FWidth    = value;
     FWidthPix = HCUnitConversion.MillimeterToPixX(FWidth);
 }