예제 #1
0
        public override Object Clone()
        {
            SerToCrtRecord rec = new SerToCrtRecord();

            rec.field_1_chartGroupIndex = field_1_chartGroupIndex;
            return(rec);
        }
예제 #2
0
        public void TestLoad()
        {
            SerToCrtRecord record = new SerToCrtRecord(TestcaseRecordInputStream.Create(0x1045, data));
            Assert.AreEqual(0, record.ChartGroupIndex);


            Assert.AreEqual(6, record.RecordSize);

        }
예제 #3
0
        public void TestStore()
        {
            SerToCrtRecord record = new SerToCrtRecord();
            record.ChartGroupIndex = ((short)0);


            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);
        }
예제 #4
0
        public SeriesFormatAggregate(RecordStream rs, ChartRecordAggregate container)
            : base(RuleName_SERIESFORMAT, container)
        {
            series = (SeriesRecord)rs.GetNext();
            rs.GetNext();
            BRAIRecord ai;
            SeriesTextRecord sText;
            while (rs.PeekNextChartSid() == BRAIRecord.sid)
            {
                sText = null;
                ai = (BRAIRecord)rs.GetNext();
                if (rs.PeekNextChartSid() == SeriesTextRecord.sid)
                    sText = (SeriesTextRecord)rs.GetNext();
                dic4AI.Add(ai, sText);
            }
            if (rs.PeekNextChartSid() == DataFormatRecord.sid)
            {
                while (rs.PeekNextChartSid() == DataFormatRecord.sid)
                    ssList.Add(new SSAggregate(rs, this));
            }
            if (rs.PeekNextChartSid() == SerToCrtRecord.sid)
            {
                serToCrt = (SerToCrtRecord)rs.GetNext();
            }
            else
            {
                if (rs.PeekNextChartSid() == SerParentRecord.sid)
                {
                    serParent = (SerParentRecord)rs.GetNext();
                    if (rs.PeekNextChartSid() == SerAuxTrendRecord.sid)
                    {
                        serAuxTrend = (SerAuxTrendRecord)rs.GetNext();
                    }
                    else
                    {
                        serAuxErrBar = (SerAuxErrBarRecord)rs.GetNext();
                    }
                }
            }

            if (rs.PeekNextChartSid() == LegendExceptionRecord.sid)
            {
                while (rs.PeekNextChartSid() == LegendExceptionRecord.sid)
                {
                    leList.Add(new LegendExceptionAggregate(rs, this));
                }
            }

            Record r = rs.GetNext();//EndRecord
            Debug.Assert(r.GetType() == typeof(EndRecord));
        }
예제 #5
0
        public override Object Clone()
        {
            SerToCrtRecord rec = new SerToCrtRecord();

            rec.field_1_chartGroupIndex = field_1_chartGroupIndex;
            return rec;
        }