示例#1
0
        private void DrawBtn_Click(object sender, EventArgs e)
        {
            Node root = PostfixTree.Parse(ExpTb.Text);

            if (root != null)
            {
                root.Build(80, 0);
            }
            graphCanvas1.Root = root;
            graphCanvas1.Invalidate();
        }
示例#2
0
        private void ExpTb_TextChanged(object sender, EventArgs e)
        {
            Node root = PostfixTree.Parse(ExpTb.Text);

            if (root != null)
            {
                root.Build(80, 0);
                ExpTb.ForeColor = Color.Black;
            }
            else
            {
                ExpTb.ForeColor = Color.Red;
            }
            graphCanvas1.Root = root;
            graphCanvas1.Invalidate();
        }