public void TestLoad() { PlotAreaRecord record = new PlotAreaRecord(TestcaseRecordInputStream.Create(0x1035, data)); Assert.AreEqual(4, record.RecordSize); }
public void TestStore() { PlotAreaRecord record = new PlotAreaRecord(); 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); }
public AxesAggregate(RecordStream rs, ChartRecordAggregate container) : base(RuleName_AXES, container) { if (rs.PeekNextChartSid() == AxisRecord.sid) { AxisRecord axis = (AxisRecord)rs.GetNext(); rs.GetNext(); int sid = rs.PeekNextChartSid(); if (sid == CatSerRangeRecord.sid) { ivaxis = new IVAxisAggregate(rs, this, axis); } else if (sid == ValueRangeRecord.sid) { dvaxis = new DVAxisAggregate(rs, this, axis); } else throw new InvalidOperationException(string.Format("Invalid record sid=0x{0:X}. Shoud be CatSerRangeRecord or ValueRangeRecord", sid)); Debug.Assert(rs.PeekNextChartSid() == AxisRecord.sid); dvaxisSecond = new DVAxisAggregate(rs, this, null); if (rs.PeekNextChartSid() == AxisRecord.sid) seriesAxis = new SeriesAxisAggregate(rs, this); while (rs.PeekNextChartSid() == TextRecord.sid) { attachedLabelList.Add(new AttachedLabelAggregate(rs, this)); } if (rs.PeekNextChartSid() == PlotAreaRecord.sid) { plotArea = (PlotAreaRecord)rs.GetNext(); if (rs.PeekNextChartSid() == FrameRecord.sid) frame = new FrameAggregate(rs, this); } } }
private PlotAreaRecord CreatePlotAreaRecord() { PlotAreaRecord r = new PlotAreaRecord(); return r; }
public override Object Clone() { PlotAreaRecord rec = new PlotAreaRecord(); return rec; }
public override Object Clone() { PlotAreaRecord rec = new PlotAreaRecord(); return(rec); }