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


C# Record.Record类代码示例

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


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

示例1: 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

示例2: ProcessRecord

        /**
         * Process this record ourselves, and then
         *  pass it on to our child listener
         */
        public void ProcessRecord(Record record)
        {
            // Handle it ourselves
            ProcessRecordInternally(record);

            // Now pass on to our child
            childListener.ProcessRecord(record);
        }
开发者ID:xoposhiy,项目名称:npoi,代码行数:12,代码来源:FormatTrackingHSSFListener.cs

示例3: ProcessRecord

 public bool ProcessRecord(Record rec)
 {
     wascalled[0] = true;
     Assert.IsTrue(
                (rec.Sid == BOFRecord.sid),
                "must be BOFRecord got SID=" + rec.Sid);
     return true;
 }
开发者ID:JnS-Software-LLC,项目名称:npoi,代码行数:8,代码来源:TestEventRecordFactory.cs

示例4: ProcessRecord

    /**
 * sends the record event to all registered listeners.
 * @param record the record to be thrown.
 * @return <c>false</c> to abort.  This aborts
 * out of the event loop should the listener return false
 */
    private bool ProcessRecord(Record record)
    {
        if (!IsSidIncluded(record.Sid))
        {
            return true;
        }
        return _listener.ProcessRecord(record);
    }
开发者ID:uwitec,项目名称:web-mvc-logistics,代码行数:14,代码来源:EventRecordFactory.cs

示例5: ProcessRecord

 public void ProcessRecord(Record record)
 {
     if (record is AlRunsRecord)
     {
         chartTitleFormatRecords.Add(
                 record
         );
     }
 }
开发者ID:JnS-Software-LLC,项目名称:npoi,代码行数:9,代码来源:TestChartTitleFormatRecord.cs

示例6: RecordTreeNode

        public RecordTreeNode(Record record)
        {
            if (record is ObjRecord)
            {
                ObjRecord or = (ObjRecord)record;
                IList subrecs=or.SubRecords;
                foreach (SubRecord sr in subrecs)
                {
                    this.Nodes.Add(new SubRecordTreeNode(sr));
                }
                this.ImageKey = "Folder";
                this.SelectedImageKey = "Folder";
            }
            else if (record is SSTRecord)
            {
                IEnumerator strings = ((SSTRecord)record).GetStrings();

                this.ImageKey = "Folder";
                this.SelectedImageKey = "Folder";

                while (strings.MoveNext())
                {
                    this.Nodes.Add(new UnicodeStringTreeNode((UnicodeString)strings.Current));
                }
            }
            else if (record is DrawingGroupRecord)
            {
                this.ImageKey = "Folder";
                this.SelectedImageKey = "Folder";

                DrawingGroupRecord dgr = (DrawingGroupRecord)record;

                for (int i = 0; i < dgr.EscherRecords.Count; i++)
                {
                    this.Nodes.Add(new EscherRecordTreeNode((NPOI.DDF.EscherRecord)dgr.EscherRecords[i]));
                }
                
            }
            else
            {
                this.ImageKey = "Binary";
            }
            if (record is UnknownRecord)
            {
                this.Text = UnknownRecord.GetBiffName(record.Sid) + "*";
            }
            else
            {
                this.Text = record.GetType().Name;
            }
            this.Record = record;
            
        }
开发者ID:JnS-Software-LLC,项目名称:npoi,代码行数:53,代码来源:RecordTreeNode.cs

示例7: ProcessRecordInternally

 /**
  * Process the record ourselves, but do not
  *  pass it on to the child Listener.
  * @param record
  */
 public void ProcessRecordInternally(Record record)
 {
     if (record is FormatRecord)
     {
         FormatRecord fr = (FormatRecord)record;
         customFormatRecords[fr.IndexCode] = fr;
     }
     else if (record is ExtendedFormatRecord)
     {
         ExtendedFormatRecord xr = (ExtendedFormatRecord)record;
         xfRecords.Add(xr);
     }
 }
开发者ID:xoposhiy,项目名称:npoi,代码行数:18,代码来源:FormatTrackingHSSFListener.cs

示例8: Add

 /// <summary>
 /// Adds the specified pos.
 /// </summary>
 /// <param name="pos">The pos.</param>
 /// <param name="r">The r.</param>
 public void Add(int pos, Record r)
 {
     records.Insert(pos, r);
     if (Protpos >= pos) Protpos=(protpos + 1);
     if (Bspos >= pos) Bspos=(bspos + 1);
     if (Tabpos >= pos) Tabpos=(tabpos + 1);
     if (Fontpos >= pos) Fontpos=(fontpos + 1);
     if (Xfpos >= pos) Xfpos=(xfpos + 1);
     if (Backuppos >= pos) Backuppos=(backuppos + 1);
     if (Namepos>= pos) Namepos=(namepos + 1);
     if (Supbookpos >= pos) Supbookpos=(supbookpos + 1);
     if ((Palettepos!= -1) && (Palettepos>= pos)) Palettepos=(palettepos + 1);
     if (ExternsheetPos >= pos) ExternsheetPos=ExternsheetPos + 1;
 }
开发者ID:ctddjyds,项目名称:npoi,代码行数:19,代码来源:WorkbookRecordList.cs

示例9: Dispose

 public override void Dispose()
 {
     _rowBreaksRecord = null;
     _columnBreaksRecord = null;
     header = null;
     footer = null;
     _hCenter = null;
     _vCenter = null;
     _leftMargin = null;
     _rightMargin = null;
     _topMargin = null;
     _bottomMargin = null;
     _pls = null;
     printSetup = null;
     _bitmap = null;
 }
开发者ID:Henry-T,项目名称:UnityPG,代码行数:16,代码来源:PageSettingsBlock.cs

示例10: ProcessRecord

        //ERFListener
        public bool ProcessRecord(Record rec)
        {
            if (rec.Sid == BOFRecord.sid)
            {
                if (lastEOF != true)
                {
                    throw new Exception("Not yet handled embedded models");
                }
                else
                {
                    BOFRecord bof = (BOFRecord)rec;
                    switch (bof.Type)
                    {
                        case BOFRecord.TYPE_WORKBOOK:
                            currentmodel = new Workbook();
                            break;
                        case BOFRecord.TYPE_WORKSHEET:
                            currentmodel = Sheet.CreateSheet();
                            break;
                        default:
                            throw new Exception("Unsupported model type " + bof.GetType());
                    }

                }
            }

            if (rec.Sid == EOFRecord.sid)
            {
                lastEOF = true;
                ThrowEvent(currentmodel);
            }
            else
            {
                lastEOF = false;
            }


            return true;
        }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:40,代码来源:ModelFactory.cs

示例11: VisitRecord

            public void VisitRecord(Record r)
            {
                if (r.Sid == UserSViewBegin.sid)
                {
                    String guid = HexDump.ToHex(((UserSViewBegin) r).Guid);
                    HeaderFooterRecord hf = _hfGuidMap[guid];

                    if (hf != null)
                    {
                        {
                            _cv.Append(_hf);
                            _sviewHeaderFooters.Remove(_hf);
                        }
                    }
                }
            }
开发者ID:Sappharad,项目名称:npoi,代码行数:16,代码来源:PageSettingsBlock.cs

示例12: ReadARecord

 private bool ReadARecord(RecordStream rs)
 {
     switch (rs.PeekNextSid())
     {
         case HorizontalPageBreakRecord.sid:
             CheckNotPresent(_rowBreaksRecord);
             _rowBreaksRecord = (PageBreakRecord)rs.GetNext();
             break;
         case VerticalPageBreakRecord.sid:
             CheckNotPresent(_columnBreaksRecord);
             _columnBreaksRecord = (PageBreakRecord)rs.GetNext();
             break;
         case HeaderRecord.sid:
             CheckNotPresent(header);
             header = (HeaderRecord)rs.GetNext();
             break;
         case FooterRecord.sid:
             CheckNotPresent(footer);
             footer = (FooterRecord)rs.GetNext();
             break;
         case HCenterRecord.sid:
             CheckNotPresent(_hCenter);
             _hCenter = (HCenterRecord)rs.GetNext();
             break;
         case VCenterRecord.sid:
             CheckNotPresent(_vCenter);
             _vCenter = (VCenterRecord)rs.GetNext();
             break;
         case LeftMarginRecord.sid:
             CheckNotPresent(_leftMargin);
             _leftMargin = (LeftMarginRecord)rs.GetNext();
             break;
         case RightMarginRecord.sid:
             CheckNotPresent(_rightMargin);
             _rightMargin = (RightMarginRecord)rs.GetNext();
             break;
         case TopMarginRecord.sid:
             CheckNotPresent(_topMargin);
             _topMargin = (TopMarginRecord)rs.GetNext();
             break;
         case BottomMarginRecord.sid:
             CheckNotPresent(_bottomMargin);
             _bottomMargin = (BottomMarginRecord)rs.GetNext();
             break;
         case UnknownRecord.PLS_004D: // PLS
             _plsRecords.Add(new PLSAggregate(rs));
             break;
         case PrintSetupRecord.sid:
             CheckNotPresent(printSetup);
             printSetup = (PrintSetupRecord)rs.GetNext();
             break;
         case UnknownRecord.BITMAP_00E9: // BITMAP
             CheckNotPresent(_bitmap);
             _bitmap = rs.GetNext();
             break;
         case PrintSizeRecord.sid:
             CheckNotPresent(_printSize);
             _printSize = rs.GetNext();
             break;
         case HeaderFooterRecord.sid:
             HeaderFooterRecord hf = (HeaderFooterRecord)rs.GetNext();
             if (hf.IsCurrentSheet)
                 _headerFooter = hf;
             else
                 _sviewHeaderFooters.Add(hf);
             break;
         default:
             // all other record types are not part of the PageSettingsBlock
             return false;
     }
     return true;
 }
开发者ID:Sappharad,项目名称:npoi,代码行数:72,代码来源:PageSettingsBlock.cs

示例13: VisitRecord

 public void VisitRecord(Record r)
 {
     if (r is LabelSSTRecord)
     {
         _count++;
     }
 }
开发者ID:hanwangkun,项目名称:npoi,代码行数:7,代码来源:TestWorkbook.cs

示例14: ProcessRecordInternally

 /// <summary>
 /// Process the record ourselves, but do not
 /// pass it on to the child Listener.
 /// </summary>
 /// <param name="record">The record.</param>
 public void ProcessRecordInternally(Record record)
 {
     if (record is BoundSheetRecord)
     {
         boundSheetRecords.Add(record);
     }
     else if (record is ExternSheetRecord)
     {
         externSheetRecords.Add(record);
     }
     else if (record is SSTRecord)
     {
         sstRecord = (SSTRecord)record;
     }
 }
开发者ID:ctddjyds,项目名称:npoi,代码行数:20,代码来源:EventWorkbookBuilder.cs

示例15: VisitRecord

 public void VisitRecord(Record r) {
     if (r is MergeCellsRecord) {
         _count++;
     }
 }
开发者ID:89sos98,项目名称:npoi,代码行数:5,代码来源:TestSheet.cs


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