當前位置: 首頁>>代碼示例>>C#>>正文


C# Model.RecordStream類代碼示例

本文整理匯總了C#中NPOI.HSSF.Model.RecordStream的典型用法代碼示例。如果您正苦於以下問題:C# RecordStream類的具體用法?C# RecordStream怎麽用?C# RecordStream使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RecordStream類屬於NPOI.HSSF.Model命名空間,在下文中一共展示了RecordStream類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: DVAxisAggregate

        public DVAxisAggregate(RecordStream rs, ChartRecordAggregate container, AxisRecord axis)
            : base(RuleName_DVAXIS, container)
        {
            if (axis == null)
            {
                this.axis = (AxisRecord)rs.GetNext();
                rs.GetNext();
            }
            else
            {
                this.axis = axis;
            }

            if (rs.PeekNextChartSid() == ValueRangeRecord.sid)
                valueRange = (ValueRangeRecord)rs.GetNext();

            if (rs.PeekNextChartSid() == YMultRecord.sid)
                axm = new AXMAggregate(rs, this);

            axs = new AXSAggregate(rs, this);
            if (rs.PeekNextChartSid() == CrtMlFrtRecord.sid)
                crtmlfrt = new CrtMlFrtAggregate(rs, this);

            Record r = rs.GetNext();//EndRecord
            Debug.Assert(r.GetType() == typeof(EndRecord));
        }
開發者ID:ctddjyds,項目名稱:npoi,代碼行數:26,代碼來源:DVAxisAggregate.cs

示例2: ReadExtSheetRecord

        // TODO make this class into a record aggregate

        private static ExternSheetRecord ReadExtSheetRecord(RecordStream rs)
        {
            List<ExternSheetRecord> temp = new List<ExternSheetRecord>(2);
            while (rs.PeekNextClass() == typeof(ExternSheetRecord))
            {
                temp.Add((ExternSheetRecord)rs.GetNext());
            }

            int nItems = temp.Count;
            if (nItems < 1)
            {
                throw new Exception("Expected an EXTERNSHEET record but got ("
                        + rs.PeekNextClass().Name + ")");
            }
            if (nItems == 1)
            {
                // this is the normal case. There should be just one ExternSheetRecord
                return temp[0];
            }
            // Some apps generate multiple ExternSheetRecords (see bug 45698).
            // It seems like the best thing to do might be to combine these into one
            ExternSheetRecord[] esrs = new ExternSheetRecord[nItems];
            esrs = temp.ToArray();
            return ExternSheetRecord.Combine(esrs);
        }
開發者ID:Reinakumiko,項目名稱:npoi,代碼行數:27,代碼來源:LinkTable.cs

示例3: ChartSubstreamRecordAggregate

 public ChartSubstreamRecordAggregate(RecordStream rs)
 {
     _bofRec = (BOFRecord)rs.GetNext();
     List<RecordBase> temp = new List<RecordBase>();
     while (rs.PeekNextClass() != typeof(EOFRecord))
     {
         Type a = rs.PeekNextClass();
         if (PageSettingsBlock.IsComponentRecord(rs.PeekNextSid()))
         {
             if (_psBlock != null)
             {
                 if (rs.PeekNextSid() == HeaderFooterRecord.sid)
                 {
                     // test samples: 45538_classic_Footer.xls, 45538_classic_Header.xls
                     _psBlock.AddLateHeaderFooter((HeaderFooterRecord)rs.GetNext());
                     continue;
                 }
                 throw new InvalidDataException(
                         "Found more than one PageSettingsBlock in chart sub-stream");
             }
             _psBlock = new PageSettingsBlock(rs);
             temp.Add(_psBlock);
             continue;
         }
         temp.Add(rs.GetNext());
     }
     _recs = temp;
     Record eof = rs.GetNext(); // no need to save EOF in field
     if (!(eof is EOFRecord))
     {
         throw new InvalidOperationException("Bad chart EOF");
     }
 }
開發者ID:hanwangkun,項目名稱:npoi,代碼行數:33,代碼來源:ChartSubstreamRecordAggregate.cs

示例4: CustomViewSettingsRecordAggregate

 public CustomViewSettingsRecordAggregate(RecordStream rs)
 {
     _begin = rs.GetNext();
     if (_begin.Sid != UserSViewBegin.sid)
     {
         throw new InvalidOperationException("Bad begin record");
     }
     List<RecordBase> temp = new List<RecordBase>();
     while (rs.PeekNextSid() != UserSViewEnd.sid)
     {
         if (PageSettingsBlock.IsComponentRecord(rs.PeekNextSid()))
         {
             if (_psBlock != null)
             {
                 throw new InvalidOperationException(
                         "Found more than one PageSettingsBlock in custom view Settings sub-stream");
             }
             _psBlock = new PageSettingsBlock(rs);
             temp.Add(_psBlock);
             continue;
         }
         temp.Add(rs.GetNext());
     }
     _recs = temp;
     _end = rs.GetNext(); // no need to save EOF in field
     if (_end.Sid != UserSViewEnd.sid)
     {
         throw new InvalidOperationException("Bad custom view Settings end record");
     }
 }
開發者ID:89sos98,項目名稱:npoi,代碼行數:30,代碼來源:CustomViewSettingsRecordAggregate.cs

示例5: ReadARecord

 private bool ReadARecord(RecordStream rs)
 {
     
     switch (rs.PeekNextSid())
     {
         case ProtectRecord.sid:
             CheckNotPresent(_protectRecord);
             _protectRecord = rs.GetNext() as ProtectRecord;
             break;
         case ObjectProtectRecord.sid:
             CheckNotPresent(_objectProtectRecord);
             _objectProtectRecord = rs.GetNext() as ObjectProtectRecord;
             break;
         case ScenarioProtectRecord.sid:
             CheckNotPresent(_scenarioProtectRecord);
             _scenarioProtectRecord = rs.GetNext() as ScenarioProtectRecord;
             break;
         case PasswordRecord.sid:
             CheckNotPresent(_passwordRecord);
             _passwordRecord = rs.GetNext() as PasswordRecord;
             break;
         default:
             // all other record types are not part of the PageSettingsBlock
             return false;
     }
     return true;
 }
開發者ID:hanwangkun,項目名稱:npoi,代碼行數:27,代碼來源:WorksheetProtectionBlock.cs

示例6: AxisParentAggregate

 public AxisParentAggregate(RecordStream rs, ChartRecordAggregate container)
     : base(RuleName_AXISPARENT, container)
 {
     axisPraent = (AxisParentRecord)rs.GetNext();
     rs.GetNext();
     pos = (PosRecord)rs.GetNext();
     if (ChartFormatRecord.sid != rs.PeekNextChartSid())
     {
         try
         {
             axes = new AxesAggregate(rs, this);
         }
         catch
         {
             Debug.Print("not find axes rule records");
             axes = null;
         }
     }
     Debug.Assert(ChartFormatRecord.sid == rs.PeekNextChartSid());
     while (ChartFormatRecord.sid == rs.PeekNextChartSid())
     {
         crtList.Add(new CRTAggregate(rs, this));
     }
     Record r = rs.GetNext();//EndRecord
     Debug.Assert(r.GetType() == typeof(EndRecord));
 }
開發者ID:JnS-Software-LLC,項目名稱:npoi,代碼行數:26,代碼來源:AxisParentAggregate.cs

示例7: GelFrameAggregate

 public GelFrameAggregate(RecordStream rs, ChartRecordAggregate container)
     : base(RuleName_GELFRAME, container)
 {
     gelFrame1 = (GelFrameRecord)rs.GetNext();
     int sid = rs.PeekNextChartSid();
     if (sid == GelFrameRecord.sid)
     {
         gelFrame2 = (GelFrameRecord)rs.GetNext();
         sid = rs.PeekNextChartSid();
     }
     if (sid == ContinueRecord.sid)
     {
         while (rs.PeekNextChartSid() == ContinueRecord.sid)
         {
             continues.Add((ContinueRecord)rs.GetNext());
         }
     }
     if (rs.PeekNextChartSid() == BeginRecord.sid)
     {
         rs.GetNext();
         picF = (PicFRecord)rs.GetNext();
         Record r = rs.GetNext();//EndRecord
         Debug.Assert(r.GetType() == typeof(EndRecord));
     }
 }
開發者ID:89sos98,項目名稱:npoi,代碼行數:25,代碼來源:GelFrameAggregate.cs

示例8: LDAggregate

        public LDAggregate(RecordStream rs, ChartRecordAggregate container)
            :base(RuleName_LD, container)
        {
            legend = (LegendRecord)rs.GetNext();
            rs.GetNext();//BeginRecord
            pos = (PosRecord)rs.GetNext();
            attachedLabel = new AttachedLabelAggregate(rs, this);

            if (rs.PeekNextChartSid() == FrameRecord.sid)
            {
                frame = new FrameAggregate(rs, this);
            }
            if (rs.PeekNextChartSid() == CrtLayout12Record.sid)
            {
                crtLayout = (CrtLayout12Record)rs.GetNext();
            }
            if (rs.PeekNextChartSid() == TextPropsStreamRecord.sid)
            {
                textProps = new TextPropsAggregate(rs, this);
            }
            if (rs.PeekNextChartSid() == CrtMlFrtRecord.sid)
            {
                crtMlFrt = new CrtMlFrtAggregate(rs, this);
            }
            Record r = rs.GetNext();//EndRecord
            Debug.Assert(r.GetType() == typeof(EndRecord));
        }
開發者ID:xiepeixing,項目名稱:npoi,代碼行數:27,代碼來源:LDAggregate.cs

示例9: TestAbnormalPivotTableRecords_bug46280

        public void TestAbnormalPivotTableRecords_bug46280()
        {
            int SXVIEW_SID = ViewDefinitionRecord.sid;
            Record[] inRecs = {
			new RowRecord(0),
			new NumberRecord(),
			// normally MSODRAWING(0x00EC) would come here before SXVIEW
			new UnknownRecord(SXVIEW_SID, System.Text.Encoding.UTF8.GetBytes("dummydata (SXVIEW: View DefInition)")),
			new WindowTwoRecord(),
		};
            RecordStream rs = new RecordStream(Arrays.AsList(inRecs), 0);
            RowBlocksReader rbr = new RowBlocksReader(rs);
            if (rs.PeekNextClass() == typeof(WindowTwoRecord))
            {
                // Should have stopped at the SXVIEW record
                throw new AssertionException("Identified bug 46280b");
            }
            RecordStream rbStream = rbr.PlainRecordStream;
            Assert.AreEqual(inRecs[0], rbStream.GetNext());
            Assert.AreEqual(inRecs[1], rbStream.GetNext());
            Assert.IsFalse(rbStream.HasNext());
            Assert.IsTrue(rs.HasNext());
            Assert.AreEqual(inRecs[2], rs.GetNext());
            Assert.AreEqual(inRecs[3], rs.GetNext());
        }
開發者ID:hanwangkun,項目名稱:npoi,代碼行數:25,代碼來源:TestRowBlocksReader.cs

示例10: ConditionalFormattingTable

 public ConditionalFormattingTable(RecordStream rs)
 {
     IList temp = new ArrayList();
     while (rs.PeekNextClass() == typeof(CFHeaderRecord))
     {
         temp.Add(CFRecordsAggregate.CreateCFAggregate(rs));
     }
     _cfHeaders = temp;
 }
開發者ID:babywzazy,項目名稱:Server,代碼行數:9,代碼來源:ConditionalFormattingTable.cs

示例11: AXMAggregate

 public AXMAggregate(RecordStream rs, ChartRecordAggregate container)
     : base(RuleName_AXM, container)
 {
     yMult = (YMultRecord)rs.GetNext();
     startObject = (ChartStartObjectRecord)rs.GetNext();
     attachedLabel = new AttachedLabelAggregate(rs, this);
     
     endObject = (ChartEndObjectRecord)rs.GetNext();
 }
開發者ID:ctddjyds,項目名稱:npoi,代碼行數:9,代碼來源:AXMAggregate.cs

示例12: DatAggregate

        public DatAggregate(RecordStream rs, ChartRecordAggregate container)
            : base(RuleName_DAT, container)
        {
            dat = (DatRecord)rs.GetNext();
            rs.GetNext();
            ld = new LDAggregate(rs, this);

            Record r = rs.GetNext();//EndRecord
            Debug.Assert(r.GetType() == typeof(EndRecord));
        }
開發者ID:hanwangkun,項目名稱:npoi,代碼行數:10,代碼來源:DatAggregate.cs

示例13: DataValidityTable

 public DataValidityTable(RecordStream rs)
 {
     _headerRec = (DVALRecord)rs.GetNext();
     IList temp = new ArrayList();
     while (rs.PeekNextClass() == typeof(DVRecord))
     {
         temp.Add(rs.GetNext());
     }
     _validationList = temp;
 }
開發者ID:ChiangHanLung,項目名稱:PIC_VDS,代碼行數:10,代碼來源:DataValidityTable.cs

示例14: CRNBlock

 public CRNBlock(RecordStream rs)
 {
     _countRecord = (CRNCountRecord)rs.GetNext();
     int nCRNs = _countRecord.NumberOfCRNs;
     CRNRecord[] crns = new CRNRecord[nCRNs];
     for (int i = 0; i < crns.Length; i++)
     {
         crns[i] = (CRNRecord)rs.GetNext();
     }
     _crns = crns;
 }
開發者ID:ChiangHanLung,項目名稱:PIC_VDS,代碼行數:11,代碼來源:LinkTable.cs

示例15: CrtMlFrtAggregate

 public CrtMlFrtAggregate(RecordStream rs, ChartRecordAggregate container)
     : base(RuleName_CRTMLFRT, container)
 {
     crtmlFrt = (CrtMlFrtRecord)rs.GetNext();
     if (rs.PeekNextChartSid() == CrtMlFrtContinueRecord.sid)
     {
         while (rs.PeekNextChartSid() == CrtMlFrtContinueRecord.sid)
         {
             continues.Add((CrtMlFrtContinueRecord)rs.GetNext());
         }
     }
 }
開發者ID:ctddjyds,項目名稱:npoi,代碼行數:12,代碼來源:CrtMlFrtAggregate.cs


注:本文中的NPOI.HSSF.Model.RecordStream類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。