Esempio n. 1
0
        public override Object Clone()
        {
            FontXRecord rec = new FontXRecord();

            rec.field_1_fontIndex = field_1_fontIndex;
            return(rec);
        }
Esempio n. 2
0
        public void TestLoad()
        {

            FontXRecord record = new FontXRecord(TestcaseRecordInputStream.Create((short)0x1026, data));
            Assert.AreEqual(5, record.FontIndex);


            Assert.AreEqual(6, record.RecordSize);
        }
Esempio n. 3
0
        public void TestStore()
        {
            FontXRecord record = new FontXRecord();
            record.FontIndex = ((short)5);


            byte[] recordBytes = record.Serialize();
            Assert.AreEqual(recordBytes.Length - 4, data.Length);
            for (int i = 0; i < data.Length; i++)
                Assert.AreEqual(data[i], recordBytes[i + 4], "At offset " + i);
        }
Esempio n. 4
0
 public AttachedLabelAggregate(RecordStream rs, ChartRecordAggregate container)
     : base(RuleName_ATTACHEDLABEL, container)
 {
     ChartSheetAggregate cs = GetContainer<ChartSheetAggregate>(ChartRecordAggregate.RuleName_CHARTSHEET);
     IsFirst = cs.AttachLabelCount == 0;
     cs.AttachLabelCount++;
     text = (TextRecord)rs.GetNext();
     rs.GetNext();//BeginRecord
     pos = (PosRecord)rs.GetNext();
     if (rs.PeekNextChartSid() == FontXRecord.sid)
     {
         fontX = (FontXRecord)rs.GetNext();
     }
     if (rs.PeekNextChartSid() == AlRunsRecord.sid)
     {
         alRuns = (AlRunsRecord)rs.GetNext();
     }
     brai = (BRAIRecord)rs.GetNext();
     if (rs.PeekNextChartSid() == SeriesTextRecord.sid)
     {
         seriesText = (SeriesTextRecord)rs.GetNext();
     }
     if (rs.PeekNextChartSid() == FrameRecord.sid)
     {
         frame = new FrameAggregate(rs, this);
     }
     if (rs.PeekNextChartSid() == ObjectLinkRecord.sid)
     {
         objectLink = (ObjectLinkRecord)rs.GetNext();
     }
     if (rs.PeekNextChartSid() == DataLabExtContentsRecord.sid)
     {
         dataLab = (DataLabExtContentsRecord)rs.GetNext();
     }
     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));
 }
Esempio n. 5
0
        public AXSAggregate(RecordStream rs, ChartRecordAggregate container)
            : base(RuleName_AXS, container) 
        {
            if (rs.PeekNextChartSid() == IFmtRecordRecord.sid)
                ifmt = (IFmtRecordRecord)rs.GetNext();
            if (rs.PeekNextChartSid() == TickRecord.sid)
                tick = (TickRecord)rs.GetNext();
            if (rs.PeekNextChartSid() == FontXRecord.sid)
                fontx = (FontXRecord)rs.GetNext();
            if (rs.PeekNextChartSid() == AxisLineRecord.sid)
            {
                while (rs.PeekNextChartSid() == AxisLineRecord.sid)
                {
                    axisLines.Add((AxisLineRecord)rs.GetNext());
                    lineFormats.Add((LineFormatRecord)rs.GetNext());
                }
            }

            if (rs.PeekNextChartSid() == AreaFormatRecord.sid)
                areaFormat = (AreaFormatRecord)rs.GetNext();

            if (rs.PeekNextChartSid() == GelFrameRecord.sid)
                gelFrame = new GelFrameAggregate(rs, this);
            if (rs.PeekNextChartSid() == ShapePropsStreamRecord.sid)
            {
                while (rs.PeekNextChartSid() == ShapePropsStreamRecord.sid)
                {
                    shapes.Add(new ShapePropsAggregate(rs,this));
                }
            }
            if (rs.PeekNextChartSid() == TextPropsStreamRecord.sid)
            {
                textProps = (TextPropsStreamRecord)rs.GetNext();
                while (rs.PeekNextChartSid() == ContinueFrt12Record.sid)
                {
                    continues.Add((ContinueFrt12Record)rs.GetNext());
                }
            }
        }
Esempio n. 6
0
 private FontXRecord CreateFontIndexRecord(int index)
 {
     FontXRecord r = new FontXRecord();
     r.FontIndex = ((short)index);
     return r;
 }
Esempio n. 7
0
        public override Object Clone()
        {
            FontXRecord rec = new FontXRecord();

            rec.field_1_fontIndex = field_1_fontIndex;
            return rec;
        }