本文整理匯總了C#中NPOI.DDF.EscherContainerRecord.ToString方法的典型用法代碼示例。如果您正苦於以下問題:C# EscherContainerRecord.ToString方法的具體用法?C# EscherContainerRecord.ToString怎麽用?C# EscherContainerRecord.ToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NPOI.DDF.EscherContainerRecord
的用法示例。
在下文中一共展示了EscherContainerRecord.ToString方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: TestToString
public void TestToString()
{
EscherContainerRecord r = new EscherContainerRecord();
r.RecordId=EscherContainerRecord.SP_CONTAINER;
r.Options=(short)0x000F;
String nl = Environment.NewLine;
Assert.AreEqual("EscherContainerRecord (SpContainer):" + nl +
" isContainer: True" + nl +
" version: 0x000F" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF004" + nl +
" numchildren: 0" + nl
, r.ToString());
EscherOptRecord r2 = new EscherOptRecord();
// don't try to shoot in foot, please -- vlsergey
// r2.setOptions((short) 0x9876);
r2.RecordId=EscherOptRecord.RECORD_ID;
String expected;
r.AddChildRecord(r2);
expected = "EscherContainerRecord (SpContainer):" + nl +
" isContainer: True" + nl +
" version: 0x000F" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF004" + nl +
" numchildren: 1" + nl +
" children: " + nl +
" Child 0:" + nl +
" EscherOptRecord:" + nl +
" isContainer: False" + nl +
" version: 0x0003" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF00B" + nl +
" numchildren: 0" + nl +
" properties:" + nl +
" " + nl;
Assert.AreEqual(expected, r.ToString());
r.AddChildRecord(r2);
expected = "EscherContainerRecord (SpContainer):" + nl +
" isContainer: True" + nl +
" version: 0x000F" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF004" + nl +
" numchildren: 2" + nl +
" children: " + nl +
" Child 0:" + nl +
" EscherOptRecord:" + nl +
" isContainer: False" + nl +
" version: 0x0003" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF00B" + nl +
" numchildren: 0" + nl +
" properties:" + nl +
" " + nl +
" Child 1:" + nl +
" EscherOptRecord:" + nl +
" isContainer: False" + nl +
" version: 0x0003" + nl +
" instance: 0x0000" + nl +
" recordId: 0xF00B" + nl +
" numchildren: 0" + nl +
" properties:" + nl +
" " + nl;
Assert.AreEqual(expected, r.ToString());
}
示例2: TestToString
public void TestToString()
{
EscherContainerRecord r = new EscherContainerRecord();
r.RecordId=EscherContainerRecord.SP_CONTAINER;
r.Options=(short)0x000F;
String nl = Environment.NewLine;
Assert.AreEqual("EscherContainerRecord (SpContainer):" + nl +
" isContainer: True" + nl +
" options: 0x000F" + nl +
" recordId: 0xF004" + nl +
" numchildren: 0" + nl
, r.ToString());
EscherOptRecord r2 = new EscherOptRecord();
r2.Options = unchecked((short)0x9876) ;
r2.RecordId=EscherOptRecord.RECORD_ID;
String expected;
r.AddChildRecord(r2);
expected = "EscherContainerRecord (SpContainer):" + nl +
" isContainer: True" + nl +
" options: 0x000F" + nl +
" recordId: 0xF004" + nl +
" numchildren: 1" + nl +
" children: " + nl +
" Child 0:" + nl +
"EscherOptRecord:" + nl +
" isContainer: False" + nl +
" options: 0x0003" + nl +
" recordId: 0xF00B" + nl +
" numchildren: 0" + nl +
" properties:" + nl;
Assert.AreEqual(expected, r.ToString());
r.AddChildRecord(r2);
expected = "EscherContainerRecord (SpContainer):" + nl +
" isContainer: True" + nl +
" options: 0x000F" + nl +
" recordId: 0xF004" + nl +
" numchildren: 2" + nl +
" children: " + nl +
" Child 0:" + nl +
"EscherOptRecord:" + nl +
" isContainer: False" + nl +
" options: 0x0003" + nl +
" recordId: 0xF00B" + nl +
" numchildren: 0" + nl +
" properties:" + nl +
" Child 1:" + nl +
"EscherOptRecord:" + nl +
" isContainer: False" + nl +
" options: 0x0003" + nl +
" recordId: 0xF00B" + nl +
" numchildren: 0" + nl +
" properties:" + nl;
Assert.AreEqual(expected, r.ToString());
}