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(); }
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(); }