示例#1
0
        private static BarRecord CreateBarRecord()
        {
            BarRecord r = new BarRecord();

            r.BarSpace              = ((short)0);
            r.CategorySpace         = ((short)150);
            r.IsHorizontal          = (false);
            r.IsStacked             = (false);
            r.IsDisplayAsPercentage = (false);
            r.IsShadow              = (false);
            return(r);
        }
示例#2
0
        public void TestLoad()
        {

            BarRecord record = new BarRecord(TestcaseRecordInputStream.Create((short)0x1017, data));
            Assert.AreEqual(0, record.BarSpace);
            Assert.AreEqual(0x96, record.CategorySpace);
            Assert.AreEqual(0, record.FormatFlags);
            Assert.AreEqual(false, record.IsHorizontal);
            Assert.AreEqual(false, record.IsStacked);
            Assert.AreEqual(false, record.IsDisplayAsPercentage);
            Assert.AreEqual(false, record.IsShadow);


            Assert.AreEqual(10, record.RecordSize);
        }
示例#3
0
        public void TestLoad()
        {
            BarRecord record = new BarRecord(TestcaseRecordInputStream.Create((short)0x1017, data));

            Assert.AreEqual(0, record.BarSpace);
            Assert.AreEqual(0x96, record.CategorySpace);
            Assert.AreEqual(0, record.FormatFlags);
            Assert.AreEqual(false, record.IsHorizontal);
            Assert.AreEqual(false, record.IsStacked);
            Assert.AreEqual(false, record.IsDisplayAsPercentage);
            Assert.AreEqual(false, record.IsShadow);


            Assert.AreEqual(10, record.RecordSize);
        }
示例#4
0
        public void TestStore()
        {
            BarRecord record = new BarRecord();
            record.BarSpace = ((short)0);
            record.CategorySpace = ((short)0x96);
            record.IsHorizontal = (false);
            record.IsStacked = (false);
            record.IsDisplayAsPercentage = (false);
            record.IsShadow = (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);
        }
示例#5
0
        public void TestStore()
        {
            BarRecord record = new BarRecord();

            record.BarSpace              = ((short)0);
            record.CategorySpace         = ((short)0x96);
            record.IsHorizontal          = (false);
            record.IsStacked             = (false);
            record.IsDisplayAsPercentage = (false);
            record.IsShadow              = (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);
            }
        }
示例#6
0
文件: HSSFChart.cs 项目: 89sos98/npoi
 private BarRecord CreateBarRecord()
 {
     BarRecord r = new BarRecord();
     r.BarSpace = ((short)0);
     r.CategorySpace = ((short)150);
     r.IsHorizontal = (false);
     r.IsStacked = (false);
     r.IsDisplayAsPercentage = (false);
     r.IsShadow = (false);
     return r;
 }
示例#7
0
文件: HSSFChart.cs 项目: 89sos98/npoi
	private BarRecord CreateBarRecord()
	{
		BarRecord r = new BarRecord();
		r.SetBarSpace((short)0);
		r.SetCategorySpace((short)150);
		r.SetHorizontal(false);
		r.SetStacked(false);
		r.SetDisplayAsPercentage(false);
		r.SetShadow(false);
		return r;
	}