Databases Reference
In-Depth Information
{
case AddNodeType.NodeBegin:
node = new TreeNode(text);
if (null != this.prevNode)
{
this.prevNode.Nodes.Add(node);
this.prevNode.Expand();
}
else
this.reportTree.Nodes.Add(node);
this.prevNode = node;
this.nodeStack.Add(node);
break;
case AddNodeType.NodeEnd:
node = (TreeNode)this.nodeStack[this.nodeStack.Count - 1];
node.Text = text;
this.prevNode = node.Parent;
this.nodeStack.Remove(node);
break;
case AddNodeType.NodeInsert:
node = new TreeNode(text);
if (null != this.prevNode)
this.prevNode.Nodes.Add(node);
else
this.reportTree.Nodes.Add(node);
this.prevNode = node;
this.nodeStack.Add(node);
break;
default:
node = null;
break;
}
node.ForeColor = color;
}
}
//This method is called when the trace is stopped.
private void sessionTrace_Stopped(ITrace sender, TraceStoppedEventArgs e)
{
if (e.StopCause == TraceStopCause.StoppedByException)
throw e.Exception;
}
}
}
Search WWH ::




Custom Search