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


C# RecordInputStream.ReadShort方法代码示例

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


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

示例1: StyleRecord

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

        public StyleRecord(RecordInputStream in1)
        {
            fHighByte = BitFieldFactory.GetInstance(0x01); //have to init here, since we are being called
            //from base, and class level init hasnt been done. 
            field_1_xf_index = in1.ReadShort();
            if (Type == STYLE_BUILT_IN)
            {
                field_2_builtin_style = (byte)in1.ReadByte();
                field_3_outline_style_level = (byte)in1.ReadByte();
            }
            else if (Type == STYLE_USER_DEFINED)
            {
                field_2_name_length = in1.ReadShort();

                // Some files from Crystal Reports lack
                //  the remaining fields, which Is naughty
                if (in1.Remaining > 0)
                {
                    field_3_string_options = (byte)in1.ReadByte();

                    byte[] str = in1.ReadRemainder();
                    if (fHighByte.IsSet(field_3_string_options))
                    {
                        field_4_name = StringUtil.GetFromUnicodeBE(str, 0, field_2_name_length);
                    }
                    else
                    {
                        field_4_name = StringUtil.GetFromCompressedUnicode(str, 0, field_2_name_length);
                    }
                }
            }

            // todo sanity Check exception to make sure we're one or the other
        }
开发者ID:uwitec,项目名称:web-mvc-logistics,代码行数:39,代码来源:StyleRecord.cs

示例2: GutsRecord

 /**
  * Constructs a Guts record and Sets its fields appropriately.
  * @param in the RecordInputstream to Read the record from
  */
 public GutsRecord(RecordInputStream in1)
 {
     field_1_left_row_gutter = in1.ReadShort();
     field_2_top_col_gutter = in1.ReadShort();
     field_3_row_level_max = in1.ReadShort();
     field_4_col_level_max = in1.ReadShort();
 }
开发者ID:babywzazy,项目名称:Server,代码行数:11,代码来源:GutsRecord.cs

示例3: MulBlankRecord

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

        public MulBlankRecord(RecordInputStream in1)
        {
            _row = in1.ReadUShort();
            _first_col = in1.ReadShort();
            _xfs = ParseXFs(in1);
            _last_col = in1.ReadShort();
        }
开发者ID:xoposhiy,项目名称:npoi,代码行数:13,代码来源:MulBlankRecord.cs

示例4: FontRecord

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

        public FontRecord(RecordInputStream in1)
        {
            field_1_font_height = in1.ReadShort();
            field_2_attributes = in1.ReadShort();
            field_3_color_palette_index = in1.ReadShort();
            field_4_bold_weight = in1.ReadShort();
            field_5_base_sub_script = in1.ReadShort();
            field_6_underline = (byte)in1.ReadByte();
            field_7_family = (byte)in1.ReadByte();
            field_8_charset = (byte)in1.ReadByte();
            field_9_zero = (byte)in1.ReadByte();
            int field_10_font_name_len = (byte)in1.ReadByte();
            int unicodeFlags = in1.ReadUByte(); // options byte present always (even if no character data)

            if (field_10_font_name_len > 0)
            {
                if (unicodeFlags == 0)
                {   // Is compressed Unicode
                    field_11_font_name = in1.ReadCompressedUnicode(field_10_font_name_len);
                }
                else
                {   // Is not compressed Unicode
                    field_11_font_name = in1.ReadUnicodeLEString(field_10_font_name_len);
                }
            }
            else
            {
                field_11_font_name = "";
            }
        }
开发者ID:xoposhiy,项目名称:npoi,代码行数:36,代码来源:FontRecord.cs

示例5: MulRKRecord

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

        public MulRKRecord(RecordInputStream in1)
        {
            field_1_row = in1.ReadUShort();
            field_2_first_col = in1.ReadShort();
            field_3_rks = ParseRKs(in1);
            field_4_last_col = in1.ReadShort();
        }
开发者ID:uwitec,项目名称:web-mvc-logistics,代码行数:13,代码来源:MulRKRecord.cs

示例6: FileSharingRecord

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

        public FileSharingRecord(RecordInputStream in1)
        {
            field_1_Readonly = in1.ReadShort();
            field_2_password = in1.ReadShort();

            int nameLen = in1.ReadShort();

            if (nameLen > 0)
            {
                // TODO - Current examples(3) from junits only have zero Length username. 
                field_3_username_unicode_options = (byte)in1.ReadByte();
                field_3_username_value = in1.ReadCompressedUnicode(nameLen);
                
                if (field_3_username_value == null)
                {
                   // In some cases the user name can be null after reading from
                   // the input stream so we make sure this has a value
                   field_3_username_value = "";
                }
            }
            else
            {
                field_3_username_value = "";
            }
        }
开发者ID:JnS-Software-LLC,项目名称:npoi,代码行数:30,代码来源:FileSharingRecord.cs

示例7: BarRecord

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

        public BarRecord(RecordInputStream in1)
        {

            field_1_barSpace = in1.ReadShort();
            field_2_categorySpace = in1.ReadShort();
            field_3_formatFlags = in1.ReadShort();
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:13,代码来源:BarRecord.cs

示例8: DataFormatRecord

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

        public DataFormatRecord(RecordInputStream in1)
        {
            field_1_pointNumber = in1.ReadShort();
            field_2_seriesIndex = in1.ReadShort();
            field_3_seriesNumber = in1.ReadShort();
            field_4_formatFlags = in1.ReadShort();
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:13,代码来源:DataFormatRecord.cs

示例9: FillFields

        public void FillFields(RecordInputStream in1)
        {
            this.field_Addr_number = in1.ReadShort();
            this.field_regions_list = new ArrayList(this.field_Addr_number);

            for (int k = 0; k < this.field_Addr_number; k++)
            {
                short first_row = in1.ReadShort();
                short first_col = in1.ReadShort();

                short last_row = first_row;
                short last_col = first_col;
                if (in1.Remaining >= 4)
                {
                    last_row = in1.ReadShort();
                    last_col = in1.ReadShort();
                }
                else
                {
                    // Ran out of data
                    // For now, Issue a warning, finish, and 
                    //  hope for the best....
                    logger.Log(POILogger.WARN, "Ran out of data reading cell references for DVRecord");
                    k = this.field_Addr_number;
                }

                AddrStructure region = new AddrStructure(first_row, first_col, last_row, last_col);
                this.field_regions_list.Add(region);
            }
        }
开发者ID:hanwangkun,项目名称:npoi,代码行数:30,代码来源:HSSFCellRangeAddress.cs

示例10: MulBlankRecord

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

        public MulBlankRecord(RecordInputStream in1)
        {
            field_1_row = in1.ReadUShort();
            field_2_first_col = in1.ReadShort();
            field_3_xfs = ParseXFs(in1);
            field_4_last_col = in1.ReadShort();
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:13,代码来源:MulBlankRecord.cs

示例11: ObjectLinkRecord

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

        public ObjectLinkRecord(RecordInputStream in1)
        {

            field_1_anchorId = in1.ReadShort();
            field_2_link1 = in1.ReadShort();
            field_3_link2 = in1.ReadShort();
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:13,代码来源:ObjectLinkRecord.cs

示例12: LabelRecord

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

        public LabelRecord(RecordInputStream in1)
        {
            field_1_row = in1.ReadUShort();
            field_2_column = in1.ReadUShort();
            field_3_xf_index = in1.ReadShort();
            field_4_string_len = in1.ReadShort();
            field_5_unicode_flag = (byte)in1.ReadByte();
            if (field_4_string_len > 0)
            {
                if (IsUncompressedUnicode)
                {
                    field_6_value = in1.ReadUnicodeLEString(field_4_string_len);
                }
                else
                {
                    field_6_value = in1.ReadCompressedUnicode(field_4_string_len);
                }
            }
            else
            {
                field_6_value = "";
            }
            if (in1.Remaining > 0)
            {
                logger.Log(POILogger.INFO, "LabelRecord data remains: " +in1.Remaining +
                " : " + HexDump.ToHex(in1.ReadRemainder()));
            }
        }
开发者ID:Reinakumiko,项目名称:npoi,代码行数:34,代码来源:LabelRecord.cs

示例13: FeatRecord

        public FeatRecord(RecordInputStream in1)
        {
            futureHeader = new FtrHeader(in1);

            isf_sharedFeatureType = in1.ReadShort();
            reserved1 = (byte)in1.ReadByte();
            reserved2 = in1.ReadInt();
            int cref = in1.ReadUShort();
            cbFeatData = in1.ReadInt();
            reserved3 = in1.ReadShort();

            cellRefs = new CellRangeAddress[cref];
            for (int i = 0; i < cellRefs.Length; i++)
            {
                cellRefs[i] = new CellRangeAddress(in1);
            }

            switch (isf_sharedFeatureType)
            {
                case FeatHdrRecord.SHAREDFEATURES_ISFPROTECTION:
                    sharedFeature = new FeatProtection(in1);
                    break;
                case FeatHdrRecord.SHAREDFEATURES_ISFFEC2:
                    sharedFeature = new FeatFormulaErr2(in1);
                    break;
                case FeatHdrRecord.SHAREDFEATURES_ISFFACTOID:
                    sharedFeature = new FeatSmartTag(in1);
                    break;
                default:
                    System.Console.WriteLine("Unknown Shared Feature " + isf_sharedFeatureType + " found!");
                    break;
            }
        }
开发者ID:hanwangkun,项目名称:npoi,代码行数:33,代码来源:FeatRecord.cs

示例14: OldFormulaRecord

        public OldFormulaRecord(RecordInputStream ris) :
            base(ris, ris.Sid == biff2_sid)
        {
            ;

            if (IsBiff2)
            {
                field_4_value = ris.ReadDouble();
            }
            else
            {
                long valueLongBits = ris.ReadLong();
                specialCachedValue = SpecialCachedValue.Create(valueLongBits);
                if (specialCachedValue == null)
                {
                    field_4_value = BitConverter.Int64BitsToDouble(valueLongBits);
                }
            }

            if (IsBiff2)
            {
                field_5_options = (short)ris.ReadUByte();
            }
            else
            {
                field_5_options = ris.ReadShort();
            }

            int expression_len = ris.ReadShort();
            int nBytesAvailable = ris.Available();
            field_6_Parsed_expr = Formula.Read(expression_len, ris, nBytesAvailable);
        }
开发者ID:Reinakumiko,项目名称:npoi,代码行数:32,代码来源:OldFormulaRecord.cs

示例15: PaneRecord

 /**
  * Constructs a Pane record and Sets its fields appropriately.
  *
  * @param in the RecordInputstream to Read the record from
  */
 public PaneRecord(RecordInputStream in1)
 {
     field_1_x = in1.ReadShort();
     field_2_y = in1.ReadShort();
     field_3_topRow = in1.ReadShort();
     field_4_leftColumn = in1.ReadShort();
     field_5_activePane = in1.ReadShort();
 }
开发者ID:babywzazy,项目名称:Server,代码行数:13,代码来源:PaneRecord.cs


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