private int da() { int num = 0; RTFTreeNode a = this.a; RTFTreeNode node = null; this.d = this.c.nextObject(); while (this.d.ObjectType != RTFObjectType.EOF) { switch (this.d.ObjectType) { case RTFObjectType.KeyWord: case RTFObjectType.Control: case RTFObjectType.Text: node = new RTFTreeNode(this.d); a.Append(node); break; case RTFObjectType.GroupStart: node = new RTFTreeNode(RTFObjectType.Group); a.Append(node); a = node; this.e++; break; case RTFObjectType.GroupEnd: a = a.Parent; this.e--; break; default: num = -1; break; } this.d = this.c.nextObject(); } if (this.e != 0) { num = -1; } return(num); }
public void Append(RTFTreeNode node) { node.a = this; node.b = this.b; this.c.Add(node); }