当前位置: 首页>>代码示例>>C#>>正文


C# ILittleEndianInput.ReadInt方法代码示例

本文整理汇总了C#中ILittleEndianInput.ReadInt方法的典型用法代码示例。如果您正苦于以下问题:C# ILittleEndianInput.ReadInt方法的具体用法?C# ILittleEndianInput.ReadInt怎么用?C# ILittleEndianInput.ReadInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ILittleEndianInput的用法示例。


在下文中一共展示了ILittleEndianInput.ReadInt方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ScrollableObjectSubRecord

 public ScrollableObjectSubRecord(ILittleEndianInput in1, int size)
 {
     if (size !=this.DataSize)
     {
         throw new RecordFormatException(string.Format(CultureInfo.CurrentCulture, "Expected size {0} but got ({1})", this.DataSize, size));
     }
     in1.ReadInt();
     field_1_iVal=in1.ReadShort();
     field_2_iMin=in1.ReadShort();
     field_3_iMax=in1.ReadShort();
     field_4_dInc=in1.ReadShort();
     field_5_dPage=in1.ReadShort();
     field_6_fHoriz = in1.ReadShort();
     field_7_dxScroll = in1.ReadShort();
     field_8_options = in1.ReadShort();
 }
开发者ID:missxiaohuang,项目名称:Weekly,代码行数:16,代码来源:ScrollableObjectSubRecord.cs

示例2: ReadAConstantValue

 private static object ReadAConstantValue(ILittleEndianInput in1)
 {
     byte grbit = (byte)in1.ReadByte();
     switch (grbit)
     {
         case TYPE_EMPTY:
             in1.ReadLong(); // 8 byte 'not used' field
             return EMPTY_REPRESENTATION;
         case TYPE_NUMBER:
             return in1.ReadDouble();
         case TYPE_STRING:
             return StringUtil.ReadUnicodeString(in1);
         case TYPE_BOOLEAN:
             return ReadBoolean(in1);
         case TYPE_ERROR_CODE:
             int errCode = in1.ReadUShort();
             // next 6 bytes are Unused
             in1.ReadUShort();
             in1.ReadInt();
             return ErrorConstant.ValueOf(errCode);
     }
     throw new Exception("Unknown grbit value (" + grbit + ")");
 }
开发者ID:xoposhiy,项目名称:npoi,代码行数:23,代码来源:ConstantValueParser.cs

示例3: GUID

		public GUID(ILittleEndianInput in1) 
            :this(in1.ReadInt(), in1.ReadUShort(), in1.ReadUShort(), in1.ReadLong())
        {
			
		}
开发者ID:JnS-Software-LLC,项目名称:npoi,代码行数:5,代码来源:GUID.cs

示例4: RefErrorPtg

        public RefErrorPtg(ILittleEndianInput in1)
        {
            field_1_reserved = in1.ReadInt();

        }
开发者ID:missxiaohuang,项目名称:Weekly,代码行数:5,代码来源:RefErrorPtg.cs

示例5: MemAreaPtg

 public MemAreaPtg(ILittleEndianInput in1)
 {
     field_1_reserved = in1.ReadInt();
     field_2_subex_len = in1.ReadShort();
 }
开发者ID:xoposhiy,项目名称:npoi,代码行数:5,代码来源:MemAreaPtg.cs

示例6: EmbeddedObjectRefSubRecord

        /**
         * Constructs an EmbeddedObjectRef record and Sets its fields appropriately.
         *
         * @param in the record input stream.
         */
        public EmbeddedObjectRefSubRecord(ILittleEndianInput in1, int size)
        {
            // Much guess-work going on here due to lack of any documentation.
            // See similar source code in OOO:
            // http://lxr.go-oo.org/source/sc/sc/source/filter/excel/xiescher.cxx
            // 1223 void XclImpOleObj::ReadPictFmla( XclImpStream& rStrm, sal_uInt16 nRecSize )

            int streamIdOffset = in1.ReadShort(); // OOO calls this 'nFmlaLen'
            int remaining = size - LittleEndianConsts.SHORT_SIZE;

            int dataLenAfterFormula = remaining - streamIdOffset;
            int formulaSize = in1.ReadUShort();

            remaining -= LittleEndianConsts.SHORT_SIZE;
            field_1_unknown_int = in1.ReadInt();
            remaining -= LittleEndianConsts.INT_SIZE;
            byte[] formulaRawBytes = ReadRawData(in1, formulaSize);
            remaining -= formulaSize;
            field_2_refPtg = ReadRefPtg(formulaRawBytes);
            if (field_2_refPtg == null)
            {
                // common case
                // field_2_n16 seems to be 5 here
                // The formula almost looks like tTbl but the row/column values seem like garbage.
                field_2_unknownFormulaData = formulaRawBytes;
            }
            else
            {
                field_2_unknownFormulaData = null;
            }


            int stringByteCount;
            if (remaining >= dataLenAfterFormula + 3)
            {
                int tag = in1.ReadByte();
                stringByteCount = LittleEndianConsts.BYTE_SIZE;
                if (tag != 0x03)
                {
                    throw new RecordFormatException("Expected byte 0x03 here");
                }
                int nChars = in1.ReadUShort();
                stringByteCount += LittleEndianConsts.SHORT_SIZE;
                if (nChars > 0)
                {
                    // OOO: the 4th way Xcl stores a unicode string: not even a Grbit byte present if Length 0
                    field_3_unicode_flag = (in1.ReadByte() & 0x01) != 0;
                    stringByteCount += LittleEndianConsts.BYTE_SIZE;
                    if (field_3_unicode_flag)
                    {
                        field_4_ole_classname = StringUtil.ReadUnicodeLE(in1,nChars);
                        stringByteCount += nChars * 2;
                    }
                    else
                    {
                        field_4_ole_classname = StringUtil.ReadCompressedUnicode(in1,nChars);
                        stringByteCount += nChars;
                    }
                }
                else
                {
                    field_4_ole_classname = "";
                }
            }
            else
            {
                field_4_ole_classname = null;
                stringByteCount = 0;
            }
            remaining -= stringByteCount;
            // Pad to next 2-byte boundary
            if (((stringByteCount + formulaSize) % 2) != 0)
            {
                int b = in1.ReadByte();
                remaining -= LittleEndianConsts.BYTE_SIZE;
                if (field_2_refPtg != null && field_4_ole_classname == null)
                {
                    field_4_unknownByte = (byte)b;
                }
            }
            int nUnexpectedPadding = remaining - dataLenAfterFormula;

            if (nUnexpectedPadding > 0)
            {
                logger.Log(POILogger.ERROR, "Discarding " + nUnexpectedPadding + " unexpected padding bytes ");
                ReadRawData(in1, nUnexpectedPadding);
                remaining -= nUnexpectedPadding;
            }

            // Fetch the stream ID
            if (dataLenAfterFormula >= 4)
            {
                field_5_stream_id = in1.ReadInt();
                remaining -= LittleEndianConsts.INT_SIZE;
            }
//.........这里部分代码省略.........
开发者ID:Reinakumiko,项目名称:npoi,代码行数:101,代码来源:EmbeddedObjectRefSubRecord.cs

示例7: Initial

 public Initial(ILittleEndianInput in1)
 {
     _reserved0 = in1.ReadInt();
     _reserved1 = in1.ReadUShort();
     _reserved2 = in1.ReadUByte();
 }
开发者ID:missxiaohuang,项目名称:Weekly,代码行数:6,代码来源:ArrayPtg.cs

示例8: DeletedRef3DPtg

 /** Creates new DeletedRef3DPtg */
 public DeletedRef3DPtg(ILittleEndianInput in1)
 {
     field_1_index_extern_sheet = in1.ReadUShort();
     unused1 = in1.ReadInt();
 }
开发者ID:xoposhiy,项目名称:npoi,代码行数:6,代码来源:DeletedRef3DPtg.cs

示例9: LbsDataSubRecord

    /**
     * @param in the stream to read data from
     * @param cbFContinued the seconf short in the record header
     * @param cmoOt the Containing Obj's {@link CommonObjectDataSubRecord#field_1_objectType}
     */
        public LbsDataSubRecord(ILittleEndianInput in1, int cbFContinued, int cmoOt)
        {
            _cbFContinued = cbFContinued;

            int encodedTokenLen = in1.ReadUShort();
            if (encodedTokenLen > 0)
            {
                int formulaSize = in1.ReadUShort();
                _unknownPreFormulaInt = in1.ReadInt();

                Ptg[] ptgs = Ptg.ReadTokens(formulaSize, in1);
                if (ptgs.Length != 1)
                {
                    throw new RecordFormatException("Read " + ptgs.Length
                            + " tokens but expected exactly 1");
                }
                _linkPtg = ptgs[0];
                switch (encodedTokenLen - formulaSize - 6)
                {
                    case 1:
                        _unknownPostFormulaByte = (byte)in1.ReadByte();
                        break;
                    case 0:
                        _unknownPostFormulaByte = null;
                        break;
                    default:
                        throw new RecordFormatException("Unexpected leftover bytes");
                }
            }

            _cLines = in1.ReadUShort();
            _iSel = in1.ReadUShort();
            _flags = in1.ReadUShort();
            _idEdit = in1.ReadUShort();

            // From [MS-XLS].pdf 2.5.147 FtLbsData:
            // This field MUST exist if and only if the Containing Obj?s cmo.ot is equal to 0x14.
            if (cmoOt == 0x14)
            {
                _dropData = new LbsDropData(in1);
            }

            // From [MS-XLS].pdf 2.5.147 FtLbsData:
            // This array MUST exist if and only if the fValidPlex flag (0x2) is set
            if ((_flags & 0x2) != 0)
            {
                _rgLines = new String[_cLines];
                for (int i = 0; i < _cLines; i++)
                {
                    _rgLines[i] = StringUtil.ReadUnicodeString(in1);
                }
            }

            // bits 5-6 in the _flags specify the type
            // of selection behavior this list control is expected to support

            // From [MS-XLS].pdf 2.5.147 FtLbsData:
            // This array MUST exist if and only if the wListType field is not equal to 0.
            if (((_flags >> 4) & 0x2) != 0)
            {
                _bsels = new bool[_cLines];
                for (int i = 0; i < _cLines; i++)
                {
                    _bsels[i] = in1.ReadByte() == 1;
                }
            }

        }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:73,代码来源:LbsDataSubRecord.cs

示例10: AreaErrPtg

 public AreaErrPtg(ILittleEndianInput in1)
 {
     // 8 bytes unused:
     unused1 = in1.ReadInt();
     unused2 = in1.ReadInt();
 }
开发者ID:89sos98,项目名称:npoi,代码行数:6,代码来源:AreaErrPtg.cs

示例11: CommonObjectDataSubRecord

        /**
         * Constructs a CommonObjectData record and Sets its fields appropriately.
         *
         * @param in the RecordInputstream to Read the record from
         */

        public CommonObjectDataSubRecord(ILittleEndianInput in1, int size)
        {
            if (size != 18)
            {
                throw new RecordFormatException("Expected size 18 but got (" + size + ")");
            }
            field_1_objectType = in1.ReadShort();
            field_2_objectId = in1.ReadUShort();
            field_3_option = in1.ReadShort();
            field_4_reserved1 = in1.ReadInt();
            field_5_reserved2 = in1.ReadInt();
            field_6_reserved3 = in1.ReadInt();
        }
开发者ID:hanwangkun,项目名称:npoi,代码行数:19,代码来源:CommonObjectDataSubRecord.cs


注:本文中的ILittleEndianInput.ReadInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。