public MathNode ReplaceMathNode(MathNode curNode, Type type)
        {
            MathNode node = mathExp.ReplaceMathNode(curNode, type);

            if (node != null)
            {
                mathExp.AddVariableMapItem(node);
                if (_editor != null)
                {
                    _editor.RefreshPropertyGrid();
                    _editor.ShowVariableMap(mathExp.VariableMap);
                }
                this.Refresh();
                _changed = true;
            }
            return(node);
        }