Beispiel #1
0
 private void ReadBytes(Bytes bytes)
 {
     byte[] byteArray = bytes.ByteArray;
     _height = BitConverter.ToUInt16(byteArray, 0);
     SetOptionsValue(bytes.Get(2, 2));
     _colorIndex   = BitConverter.ToUInt16(byteArray, 4);
     _weight       = FontWeightConverter.Convert(BitConverter.ToUInt16(byteArray, 6));
     _escapement   = (EscapementTypes)BitConverter.ToUInt16(byteArray, 8);
     _underline    = (UnderlineTypes)byteArray[10];
     _fontFamily   = (FontFamilies)byteArray[11];
     _characterSet = (CharacterSets)byteArray[12];
     //skip byte index 13
     _fontName = UnicodeBytes.Read(bytes.Get(14, bytes.Length - 14), 8);
 }
Beispiel #2
0
        private void SetDefaults()
        {
            _height       = 200;
            _italic       = false;
            _underlined   = false;
            _struckOut    = false;
            _colorIndex   = 32767;
            _weight       = FontWeight.Normal;
            _escapement   = EscapementTypes.Default;
            _underline    = UnderlineTypes.Default;
            _fontFamily   = FontFamilies.Default;
            _characterSet = CharacterSets.Default;
            _notUsed      = 0;
            _fontName     = "Arial";

            OnChange();
        }
Beispiel #3
0
        private void SetDefaults()
        {
            _height = 200;
            _italic = false;
            _underlined = false;
            _struckOut = false;
            _color = new Color(32767);
            _weight = FontWeight.Normal;
            _escapement = EscapementTypes.Default;
            _underline = UnderlineTypes.Default;
            _fontFamily = FontFamilies.Default;
            _characterSet = CharacterSets.Default;
            _notUsed = 0;
            _fontName = "Arial";

            OnChange();
        }
Beispiel #4
0
 private void ReadBytes(Bytes bytes)
 {
     byte[] byteArray = bytes.ByteArray;
     _height = BitConverter.ToUInt16(byteArray, 0);
     SetOptionsValue(bytes.Get(2, 2));
     _color = _doc.Workbook.Palette.GetColor(BitConverter.ToUInt16(byteArray, 4));
     _weight = FontWeightConverter.Convert(BitConverter.ToUInt16(byteArray, 6));
     _escapement = (EscapementTypes) BitConverter.ToUInt16(byteArray, 8);
     _underline = (UnderlineTypes) byteArray[10];
     _fontFamily = (FontFamilies) byteArray[11];
     _characterSet = (CharacterSets) byteArray[12];
     //skip byte index 13
     _fontName = UnicodeBytes.Read(bytes.Get(14, bytes.Length - 14), 8);
 }