Пример #1
0
    //TODO: notify about updated dependable Labelnames for UI
    //TODO: check for colissions with not yet generated names
    public bool rename(string newLabel)
    // returns true if succeded
    {
        if (string.IsNullOrEmpty(newLabel))
        // switch back to autogenerated
        {
            generateLabel();
            _CustomLabel = null;
            return(true);
        }
        else
        // set CustomLabel if available
        {
            if (_Facts.ContainsLabel(newLabel))
            {
                return(false);
            }

            freeAutoLabel();
            _CustomLabel = newLabel;

            return(true);
        }
    }