Exemple #1
0
        internal string GetNodeID(INode node)
        {
            string id = null;

            if (_NodeIDs.TryGetValue(node, out id))
            {
                return(id);
            }

            if (node is INamedObject)
            {
                id = (node as INamedObject).Name;
            }

            if ((id != null) && _Nodes.ContainsKey(id))
            {
                if (_Nodes[id] == node)
                {
                    return(id);
                }
            }

            if (id == null)
            {
                id = _NextNodeID.ToString();
            }

            _NextNodeID   += 1;
            _NodeIDs[node] = id;
            _Nodes[id]     = node;
            return(id);
        }
Exemple #2
0
 public string GetStringsValue(string valueName)
 {
     if (!stringValues.ContainsKey(valueName))
     {
         LLLog.LogE("SettingValues", "<color=red>" + valueName + "</color> value not found !");
         return(string.Empty);
     }
     return(stringValues[valueName]);
 }