예제 #1
0
 private void getContents()
 {
     paragraphTextSize      = sizeofBlock[0];
     beginningStyleTextSize = sizeofBlock[1];
     endStyleTextSize       = sizeofBlock[2];
     extraStyleTextSize     = sizeofBlock[3];
     styleType = (StyleType)_data[dataIndex];
     dataIndex++;
     styleflag = (StyleFlag)_data[dataIndex];
     dataIndex++;
     styleHash  = BitConverter.ToInt16(_data, dataIndex);
     dataIndex += 2;
     descriptionBeginningRelativeOffset = BitConverter.ToInt16(_data, dataIndex);
     dataIndex       += 2;
     styleName        = getWPWordString();
     styleDescription = getWPWordString();
     paragraphOrientedBeginInformation = new DocumentArea(_document, dataIndex, dataIndex + paragraphTextSize);
     dataIndex += paragraphTextSize;
     otherBeginStyleInformation = new DocumentArea(_document, dataIndex, dataIndex + beginningStyleTextSize);
     dataIndex            += beginningStyleTextSize;
     endStyleInformation   = new DocumentArea(_document, dataIndex, dataIndex + endStyleTextSize);
     dataIndex            += endStyleTextSize;
     extraStyleInformation = new DocumentArea(_document, dataIndex, dataIndex + extraStyleTextSize);
     dataIndex            += extraStyleTextSize;
 }
예제 #2
0
        public WP6Document(string URL)
        {
            try
            {
                data = File.ReadAllBytes(URL);
                // writeToFile(data);
                fileHeader = new FileHeader(data);
                int startIndex = fileHeader.ptrIndexArea;
                indexArea    = new IndexArea(data, startIndex);
                documentArea = new DocumentArea(this);

                int index = Array.FindIndex(indexArea.indexes, i => i.packetType == 94);
                if (index > 0)
                {
                    prefixTimeStamp = new PrefixTimeStamp(this, index);
                }
                //writeWPStreamToFile(documentArea.WPStream, URL);
                //writeMapToFile(WP6_FunctionNames.map);
                //writeToFile(data);
            }
            catch
            {
                throw;
            }
        }
예제 #3
0
        public WP6Document(string URL)
        {
            data = File.ReadAllBytes(URL);
               // writeToFile(data);
            fileHeader = new FileHeader(data);
            int startIndex = fileHeader.ptrIndexArea;
            indexArea = new IndexArea(data, startIndex);
            documentArea = new DocumentArea(this);

            //writeWPStreamToFile(documentArea.WPStream, URL);
            //writeMapToFile(WP6_FunctionNames.map);
            //writeToFile(data);
        }
예제 #4
0
 public GeneralWPText_Packet(WP6Document document, int prefixID)
     : base(document, prefixID)
 {
     if (prefixID > -1)
     {
         packetText = new DocumentArea[numTextBlocks];
         for (int i = 0; i < numTextBlocks; i++)
         {
             byte[] currentTextBlock = new byte[sizeofBlock[i]];
             Array.Copy(_data, dataIndex, currentTextBlock, 0, currentTextBlock.Length);
             packetText[i] = new DocumentArea(document, dataIndex, currentTextBlock.Length + dataIndex);
             dataIndex += sizeofBlock[i];
         }
     }
 }
예제 #5
0
 public GeneralWPText_Packet(WP6Document document, int prefixID) :
     base(document, prefixID)
 {
     if (prefixID > -1)
     {
         packetText = new DocumentArea[numTextBlocks];
         for (int i = 0; i < numTextBlocks; i++)
         {
             byte[] currentTextBlock = new byte[sizeofBlock[i]];
             Array.Copy(_data, dataIndex, currentTextBlock, 0, currentTextBlock.Length);
             packetText[i] = new DocumentArea(document, dataIndex, currentTextBlock.Length + dataIndex);
             dataIndex    += sizeofBlock[i];
         }
     }
 }
예제 #6
0
 private void getContents()
 {
     paragraphTextSize = sizeofBlock[0];
     beginningStyleTextSize = sizeofBlock[1];
     endStyleTextSize = sizeofBlock[2];
     extraStyleTextSize = sizeofBlock[3];
     styleType = (StyleType)_data[dataIndex];
     dataIndex++;
     styleflag = (StyleFlag)_data[dataIndex];
     dataIndex++;
     styleHash = BitConverter.ToInt16(_data, dataIndex);
     dataIndex += 2;
     descriptionBeginningRelativeOffset = BitConverter.ToInt16(_data, dataIndex);
     dataIndex += 2;
     styleName = getWPWordString();
     styleDescription = getWPWordString();
     paragraphOrientedBeginInformation = new DocumentArea(_document, dataIndex, dataIndex + paragraphTextSize);
     dataIndex += paragraphTextSize;
     otherBeginStyleInformation = new DocumentArea(_document, dataIndex, dataIndex + beginningStyleTextSize);
     dataIndex += beginningStyleTextSize;
     endStyleInformation = new DocumentArea(_document, dataIndex, dataIndex + endStyleTextSize);
     dataIndex += endStyleTextSize;
     extraStyleInformation = new DocumentArea(_document, dataIndex, dataIndex + extraStyleTextSize);
     dataIndex += extraStyleTextSize;
 }