예제 #1
0
        protected string getWPWordString(byte[] info, int startIndex)
        {
            int    dataIndex = startIndex;
            string WPWordString = "";
            byte   lowByte, highByte;
            bool   nullTerminator = false;

            while (!nullTerminator && dataIndex < info.Count())
            {
                lowByte  = info[dataIndex];
                highByte = info[dataIndex + 1];
                if (lowByte == 0 && highByte == 0)
                {
                    dataIndex += 2;
                    return(WPWordString);
                }
                else if (highByte == 0 && lowByte < 127)
                {
                    WPWordString += (char)lowByte;
                }
                else if (highByte > 0 && highByte < 15)
                {
                    WPWordString += new ExtendedCharacter(highByte, lowByte).content;   // call alternate constructor for
                    //  ExtendedCharacter to get Unicode value.
                }
                dataIndex += 2;
            }
            return(WPWordString);
        }
예제 #2
0
        /// <summary>
        /// get the Unicode equaivalent of a "WP Word String",
        /// which matches the Extended Character functionality
        /// </summary>
        /// <returns></returns>
        protected string getWPWordString()
        {
            string WPWordString = "";
            int    endofPacket = index.dataPacketPointer + index.sizeOfDataPacket - 1;
            int    sizeofPacket = index.sizeOfDataPacket;
            byte   lowByte, highByte;
            bool   nullTerminator = false;

            while (!nullTerminator && dataIndex <= endofPacket)
            {
                lowByte  = _data[dataIndex];
                highByte = _data[dataIndex + 1];
                if (lowByte == 0 && highByte == 0)
                {
                    dataIndex += 2;
                    return(WPWordString);
                }
                else if (highByte == 0 && lowByte < 127)
                {
                    WPWordString += (char)lowByte;
                }
                else if (highByte > 0 && highByte < 15)
                {
                    WPWordString += new ExtendedCharacter(highByte, lowByte).content;   // call alternate constructor for
                    //  ExtendedCharacter to get Unicode value.
                }
                dataIndex += 2;
            }
            return(WPWordString);
        }
예제 #3
0
        public static string getWPWordString(byte[] _data, int index, int stop)
        {
            string WPWordString = "";
            byte lowByte, highByte;
            bool nullTerminator = false;
            while (!nullTerminator && index <= stop)
            {
                lowByte = _data[index];
                highByte = _data[index + 1];
                if (lowByte == 0 && highByte == 0)
                {
                    index += 2;
                    return WPWordString;
                }
                else if (highByte == 0 && lowByte < 127)
                {
                    WPWordString += (char)lowByte;
                }
                else if (highByte > 0 && highByte < 15)
                {
                    WPWordString += new ExtendedCharacter(highByte, lowByte).content;   // call alternate constructor for
                    //  ExtendedCharacter to get Unicode value.
                }
                index += 2;

            }
                return WPWordString;
        }
예제 #4
0
        public static string getWPWordString(byte[] _data, int index, int stop)
        {
            string WPWordString = "";
            byte   lowByte, highByte;
            bool   nullTerminator = false;

            while (!nullTerminator && index <= stop)
            {
                lowByte  = _data[index];
                highByte = _data[index + 1];
                if (lowByte == 0 && highByte == 0)
                {
                    index += 2;
                    return(WPWordString);
                }
                else if (highByte == 0 && lowByte < 127)
                {
                    WPWordString += (char)lowByte;
                }
                else if (highByte > 0 && highByte < 15)
                {
                    WPWordString += new ExtendedCharacter(highByte, lowByte).content;   // call alternate constructor for
                    //  ExtendedCharacter to get Unicode value.
                }
                index += 2;
            }
            return(WPWordString);
        }
예제 #5
0
 public SetDotLeaderCharacters(WP6Document document, int prefixID) :
     base(document, prefixID)
 {
     if (nonDeletableInfo[1] > 0)
     {
         dotLeaderCharacter = new ExtendedCharacter(nonDeletableInfo[1], nonDeletableInfo[0]).content;
     }
     else
     {
         dotLeaderCharacter = ((char)nonDeletableInfo[0]).ToString();
     }
     numSpacesBetweenCharacters = nonDeletableInfo[2];
 }
예제 #6
0
 public SetDotLeaderCharacters(WP6Document document, int prefixID)
     : base(document, prefixID)
 {
     if (nonDeletableInfo[1] > 0)
      {
      dotLeaderCharacter = new ExtendedCharacter(nonDeletableInfo[1], nonDeletableInfo[0]).content;
      }
      else
      {
          dotLeaderCharacter = ((char)nonDeletableInfo[0]).ToString();
      }
      numSpacesBetweenCharacters = nonDeletableInfo[2];
 }
예제 #7
0
        /// <summary>
        /// get the Unicode equaivalent of a "WP Word String",
        /// which matches the Extended Character functionality
        /// </summary>
        /// <returns></returns>
        protected string getWPWordString()
        {
            string WPWordString = "";
            int endofPacket = index.dataPacketPointer + index.sizeOfDataPacket -1;
            int sizeofPacket = index.sizeOfDataPacket;
            byte lowByte, highByte;
            bool nullTerminator = false;
            while (!nullTerminator && dataIndex <= endofPacket)
            {
                lowByte = _data[dataIndex];
                highByte = _data[dataIndex + 1];
                if (lowByte == 0 && highByte == 0)
                {
                    dataIndex +=2;
                    return WPWordString;
                }
                else if (highByte == 0 && lowByte < 127)
                {
                    WPWordString += (char)lowByte;
                }
                else if (highByte > 0 && highByte < 15)
                {
                    WPWordString += new ExtendedCharacter(highByte, lowByte).content;   // call alternate constructor for
                    //  ExtendedCharacter to get Unicode value.
                }
                dataIndex += 2;

            }
                return WPWordString;
        }
예제 #8
0
        protected string getWPWordString(byte[] info, int startIndex)
        {
            int dataIndex = startIndex;
            string WPWordString = "";
            byte lowByte, highByte;
            bool nullTerminator = false;
            while (!nullTerminator && dataIndex < info.Count())
            {
                lowByte = info[dataIndex];
                highByte = info[dataIndex + 1];
                if (lowByte == 0 && highByte == 0)
                {
                    dataIndex += 2;
                    return WPWordString;
                }
                else if (highByte == 0 && lowByte < 127)
                {
                    WPWordString += (char)lowByte;
                }
                else if (highByte > 0 && highByte < 15)
                {
                    WPWordString += new ExtendedCharacter(highByte, lowByte).content;   // call alternate constructor for
                    //  ExtendedCharacter to get Unicode value.
                }
                dataIndex += 2;

            }
            return WPWordString;
        }