Exemplo n.º 1
0
        public void TestLoad()
        {
            LegendRecord record = new LegendRecord(TestcaseRecordInputStream.Create((short)0x1015, data));


            Assert.AreEqual((int)0xe76, record.XAxisUpperLeft);

            Assert.AreEqual((int)0x786, record.YAxisUpperLeft);

            Assert.AreEqual((int)0x119, record.XSize);

            Assert.AreEqual((int)0x8b, record.YSize);

            Assert.AreEqual((byte)0x3, record.Type);

            Assert.AreEqual((byte)0x1, record.Spacing);

            Assert.AreEqual((short)0x1f, record.Options);
            Assert.AreEqual(true, record.IsAutoPosition);
            Assert.AreEqual(true, record.IsAutoSeries);
            Assert.AreEqual(true, record.IsAutoXPositioning);
            Assert.AreEqual(true, record.IsAutoYPositioning);
            Assert.AreEqual(true, record.IsVertical);
            Assert.AreEqual(false, record.IsDataTable);


            Assert.AreEqual(24, record.RecordSize);
        }
Exemplo n.º 2
0
        public void TestStore()
        {
            LegendRecord record = new LegendRecord();



            record.XAxisUpperLeft = ((int)0xe76);

            record.YAxisUpperLeft = ((int)0x786);

            record.XSize = ((int)0x119);

            record.YSize = ((int)0x8b);

            record.Type = ((byte)0x3);

            record.Spacing = ((byte)0x1);

            record.Options            = ((short)0x1f);
            record.IsAutoPosition     = (true);
            record.IsAutoSeries       = (true);
            record.IsAutoXPositioning = (true);
            record.IsAutoYPositioning = (true);
            record.IsVertical         = (true);
            record.IsDataTable        = (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);
            }
        }
Exemplo n.º 3
0
        public LDAggregate(RecordStream rs, ChartRecordAggregate container)
            : base(RuleName_LD, container)
        {
            legend = (LegendRecord)rs.GetNext();
            rs.GetNext();//BeginRecord
            pos           = (PosRecord)rs.GetNext();
            attachedLabel = new AttachedLabelAggregate(rs, this);

            if (rs.PeekNextChartSid() == FrameRecord.sid)
            {
                frame = new FrameAggregate(rs, this);
            }
            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));
        }
Exemplo n.º 4
0
        public void TestStore()
        {
            LegendRecord record = new LegendRecord();



            record.XAxisUpperLeft=((int)0xe76);

            record.YAxisUpperLeft=((int)0x786);

            record.XSize = ((int)0x119);

            record.YSize = ((int)0x8b);

            record.Type = ((byte)0x3);

            record.Spacing = ((byte)0x1);

            record.Options = ((short)0x1f);
            record.IsAutoPosition = (true);
            record.IsAutoSeries = (true);
            record.IsAutoXPositioning = (true);
            record.IsAutoYPositioning = (true);
            record.IsVertical = (true);
            record.IsDataTable = (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);
        }
Exemplo n.º 5
0
        public void TestLoad()
        {
            LegendRecord record = new LegendRecord(TestcaseRecordInputStream.Create((short)0x1015, data));


            Assert.AreEqual((int)0xe76, record.XAxisUpperLeft);

            Assert.AreEqual((int)0x786, record.YAxisUpperLeft);

            Assert.AreEqual((int)0x119, record.XSize);

            Assert.AreEqual((int)0x8b, record.YSize);

            Assert.AreEqual((byte)0x3, record.Type);

            Assert.AreEqual((byte)0x1, record.Spacing);

            Assert.AreEqual((short)0x1f, record.Options);
            Assert.AreEqual(true, record.IsAutoPosition);
            Assert.AreEqual(true, record.IsAutoSeries);
            Assert.AreEqual(true, record.IsAutoXPositioning);
            Assert.AreEqual(true, record.IsAutoYPositioning);
            Assert.AreEqual(true, record.IsVertical);
            Assert.AreEqual(false, record.IsDataTable);


            Assert.AreEqual(24, record.RecordSize);
        }
Exemplo n.º 6
0
        private static LegendRecord CreateLegendRecord()
        {
            LegendRecord r = new LegendRecord();

            r.XAxisUpperLeft     = (3542);
            r.YAxisUpperLeft     = (1566);
            r.XSize              = (437);
            r.YSize              = (213);
            r.Type               = (LegendRecord.TYPE_RIGHT);
            r.Spacing            = (LegendRecord.SPACING_MEDIUM);
            r.IsAutoPosition     = (true);
            r.IsAutoSeries       = (true);
            r.IsAutoXPositioning = (true);
            r.IsAutoYPositioning = (true);
            r.IsVertical         = (true);
            r.IsDataTable        = (false);
            return(r);
        }
Exemplo n.º 7
0
 private LegendRecord CreateLegendRecord()
 {
     LegendRecord r = new LegendRecord();
     r.XAxisUpperLeft = (3542);
     r.YAxisUpperLeft = (1566);
     r.XSize = (437);
     r.YSize = (213);
     r.Type = (LegendRecord.TYPE_RIGHT);
     r.Spacing = (LegendRecord.SPACING_MEDIUM);
     r.IsAutoPosition = (true);
     r.IsAutoSeries = (true);
     r.IsAutoXPositioning = (true);
     r.IsAutoYPositioning = (true);
     r.IsVertical = (true);
     r.IsDataTable = (false);
     return r;
 }
Exemplo n.º 8
0
	private LegendRecord CreateLegendRecord()
	{
		LegendRecord r = new LegendRecord();
		r.SetXAxisUpperLeft(3542);
		r.SetYAxisUpperLeft(1566);
		r.SetXSize(437);
		r.SetYSize(213);
		r.SetType(LegendRecord.TYPE_RIGHT);
		r.SetSpacing(LegendRecord.SPACING_MEDIUM);
		r.SetAutoPosition(true);
		r.SetAutoSeries(true);
		r.SetAutoXPositioning(true);
		r.SetAutoYPositioning(true);
		r.SetVertical(true);
		r.SetDataTable(false);
		return r;
	}