コード例 #1
0
        //------------------------------------------------------------------------------

        private void IndentButton_Click(object sender, RoutedEventArgs e)
        {
            TraceNode node = TTrace.Debug.Send("Tree indentation using Indent and UnIndent methods");

            node.Indent("Indent", "level 1");
            node.Send("Node1");
            node.Indent("Indent level 2");
            node.Send("Node2");

            // UnIndent with no title
            node.Indent("Indent level 3");
            node.Send("Node3");
            node.UnIndent(); // UnIndent without title

            node.Send("Node4");

            node.UnIndent("UnIndent level 2");
            node.UnIndent("UnIndent level 1");

            // node indentation using traceNodeEx
            TTrace.Debug.Send("root 1", TTrace.Debug.IndentLevel.ToString());
            TTrace.Debug.Indent("start indentation");
            TTrace.Debug.Send("under indent 1", TTrace.Debug.IndentLevel.ToString());
            TraceNodeEx nodeEx = new TraceNodeEx(TTrace.Debug); // Parent depends of the indentation

            nodeEx.LeftMsg = "under indent 2";
            nodeEx.Send();
            TTrace.Debug.UnIndent();
            TTrace.Debug.Send("root 2", TTrace.Debug.IndentLevel.ToString());
        }
コード例 #2
0
        //--------------------------------------------------------------------------------------------

        private void butNodeIndent_Click(object sender, System.EventArgs e)
        {
            if (start1 == null)
            {
                return;
            }

            start1.Send("before indent");    // send text under the start1 node
            start1.Indent("ident 1");        // send text under the start1 node and keep it this trace as the new target for further sub traces
            start1.Send("Level2");           // send text under the "indent 1" node
            start1.UnIndent("done");         // unindent and send text under the start1 node. Text is optional
        }
コード例 #3
0
ファイル: Default.aspx.cs プロジェクト: kimkucheol/Tracetool
    //--------------------------------------------------------------------------------------------

    protected void butNodeIndent_Click(object sender, EventArgs e)
    {
        start1 = (TraceNode)Session.Contents["start1"];
        if (start1 == null)
        {
            return;
        }

        start1.Send("before indent");    // send text under the start1 node
        start1.Indent("ident 1");        // send text under the start1 node and keep it this trace as the new target for further sub traces
        start1.Send("Level2");           // send text under the "indent 1" node
        start1.UnIndent("done");         // unindent and send text under the start1 node. Text is optional
    }