Ejemplo n.º 1
0
 public void Tie(string name,
                 PropertyNode.GetDoubleValueDelegate getDel,
                 PropertyNode.SetDoubleValueDelegate setDel)
 {
     if (!propertyNodes.ContainsKey(name))
     {
         PropertyNode node = new PropertyNode(name, getDel, setDel);
         propertyNodes.Add(name, node);
     }
     else
     {
         if (log.IsWarnEnabled)
         {
             log.Warn("PropertyManager. Key already included:" + name);
         }
     }
 }
Ejemplo n.º 2
0
        public void Tie(string name,
                        PropertyNode.GetDoubleValueDelegate getDel,
                        PropertyNode.SetDoubleValueDelegate setDel,
                        bool useDefault = false)
        {
            PropertyNode property = root.GetNode(name, true);

            if (property == null)
            {
                log.Error("Could not get or create property " + name);
                return;
            }

            if (property.Tie(getDel, setDel, useDefault))
            {
                log.Error("Failed to tie property " + name + " to an Attribute.");
            }
            else
            {
                tied_properties.Add(property);
                if (log.IsDebugEnabled)
                {
                    log.Debug("PropertyManager. Added property :" + name);
                }
            }
#if DELETEME
            if (!propertyNodes.ContainsKey(name))
            {
                PropertyNode node = new PropertyNode(name, getDel, setDel);
                propertyNodes.Add(name, node);
            }
            else
            {
                if (log.IsWarnEnabled)
                {
                    log.Warn("PropertyManager. Key already included:" + name);
                }
            }
#endif
        }