Example #1
0
        private static DataFormatRecord CreateDataFormatRecord()
        {
            DataFormatRecord r = new DataFormatRecord();

            r.PointNumber     = ((short)-1);
            r.SeriesIndex     = ((short)0);
            r.SeriesNumber    = ((short)0);
            r.UseExcel4Colors = (false);
            return(r);
        }
Example #2
0
        public SSAggregate(RecordStream rs, ChartRecordAggregate container)
            : base(RuleName_SS, container)
        {
            dataFormat = (DataFormatRecord)rs.GetNext();
            rs.GetNext();
            if (rs.PeekNextChartSid() == Chart3DBarShapeRecord.sid)
            {
                chart3DBarShape = (Chart3DBarShapeRecord)rs.GetNext();
            }
            if (rs.PeekNextChartSid() == LineFormatRecord.sid)
            {
                lineFormat = (LineFormatRecord)rs.GetNext();
                areaFormat = (AreaFormatRecord)rs.GetNext();
                pieFormat  = (PieFormatRecord)rs.GetNext();
            }
            if (rs.PeekNextChartSid() == SerFmtRecord.sid)
            {
                serFmt = (SerFmtRecord)rs.GetNext();
            }

            if (rs.PeekNextChartSid() == GelFrameRecord.sid)
            {
                gelFrame = new GelFrameAggregate(rs, this);
            }

            if (rs.PeekNextChartSid() == MarkerFormatRecord.sid)
            {
                markerFormat = (MarkerFormatRecord)rs.GetNext();
            }

            if (rs.PeekNextChartSid() == AttachedLabelRecord.sid)
            {
                attachedLabel = (AttachedLabelRecord)rs.GetNext();
            }

            if (rs.PeekNextChartSid() == ShapePropsStreamRecord.sid)
            {
                shapeProps1 = new ShapePropsAggregate(rs, this);
            }

            if (rs.PeekNextChartSid() == ShapePropsStreamRecord.sid)
            {
                shapeProps2 = new ShapePropsAggregate(rs, this);
            }

            if (rs.PeekNextChartSid() == CrtMlFrtRecord.sid)
            {
                crtMlFrt = new CrtMlFrtAggregate(rs, this);
            }

            Record r = rs.GetNext();//EndRecord

            Debug.Assert(r.GetType() == typeof(EndRecord));
        }
Example #3
0
        public void TestLoad()
        {
            DataFormatRecord record = new DataFormatRecord(TestcaseRecordInputStream.Create((short)0x1006, data));

            Assert.AreEqual(record.PointNumber, unchecked ((short)0xFFFF));
            Assert.AreEqual(0, record.SeriesIndex);
            Assert.AreEqual(0, record.SeriesNumber);
            Assert.AreEqual(0, record.FormatFlags);
            Assert.AreEqual(false, record.UseExcel4Colors);


            Assert.AreEqual(12, record.RecordSize);
        }
Example #4
0
        public void TestLoad()
        {

            DataFormatRecord record = new DataFormatRecord(TestcaseRecordInputStream.Create((short)0x1006, data));
            Assert.AreEqual(record.PointNumber, unchecked((short)0xFFFF));
            Assert.AreEqual(0, record.SeriesIndex);
            Assert.AreEqual(0, record.SeriesNumber);
            Assert.AreEqual(0, record.FormatFlags);
            Assert.AreEqual(false, record.UseExcel4Colors);


            Assert.AreEqual(12, record.RecordSize);
        }
Example #5
0
        public void TestStore()
        {
            DataFormatRecord record = new DataFormatRecord();
            record.PointNumber = (unchecked((short)0xFFFF));
            record.SeriesIndex = ((short)0);
            record.SeriesNumber = ((short)0);
            record.FormatFlags = ((short)0);
            record.UseExcel4Colors = (false);


            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);
        }
Example #6
0
        public void TestStore()
        {
            DataFormatRecord record = new DataFormatRecord();

            record.PointNumber     = (unchecked ((short)0xFFFF));
            record.SeriesIndex     = ((short)0);
            record.SeriesNumber    = ((short)0);
            record.FormatFlags     = ((short)0);
            record.UseExcel4Colors = (false);


            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);
            }
        }
Example #7
0
        //private SeriesToChartGroupRecord CreateSeriesToChartGroupRecord()
        //{
        //    return new SeriesToChartGroupRecord();
        //}

        private DataFormatRecord CreateDataFormatRecord()
        {
            DataFormatRecord r = new DataFormatRecord();
            r.PointNumber = ((short)-1);
            r.SeriesIndex = ((short)0);
            r.SeriesNumber = ((short)0);
            r.UseExcel4Colors = (false);
            return r;
        }