Пример #1
0
        public void TestLoad()
        {
            PlotAreaRecord record = new PlotAreaRecord(TestcaseRecordInputStream.Create(0x1035, data));



            Assert.AreEqual(4, record.RecordSize);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
                }
            }
        }
Пример #4
0
 private PlotAreaRecord CreatePlotAreaRecord()
 {
     PlotAreaRecord r = new PlotAreaRecord();
     return r;
 }
Пример #5
0
        public override Object Clone()
        {
            PlotAreaRecord rec = new PlotAreaRecord();

            return rec;
        }
Пример #6
0
        public override Object Clone()
        {
            PlotAreaRecord rec = new PlotAreaRecord();

            return(rec);
        }