Exemplo n.º 1
0
        public static bool SetValue(Mobile target, string propery, string val)
        {
            PropertyEntry entry = (PropertyEntry)m_Entries[propery];

            if (entry != null)
            {
                if (entry.Handler != null)
                {
                    PropertyEventArgs e = new PropertyEventArgs(target, propery, val);
                    entry.Handler(e);
                    EventSink.InvokeProperty(e);
                }
            }
            else
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
        public int CompareTo(object obj)
        {
            if (obj == this)
            {
                return(0);
            }
            else if (obj == null)
            {
                return(1);
            }

            PropertyEntry e = obj as PropertyEntry;

            if (e == null)
            {
                throw new ArgumentException();
            }

            return(m_Property.CompareTo(e.m_Property));
        }
Exemplo n.º 3
0
 public static void Register(string property, AccessLevels access, PropertyEventHandler handler, GetPropertyEventHandler gethandler)
 {
     m_Entries[property]    = new PropertyEntry(property, handler, access);
     m_GetEntries[property] = new GetPropertyEntry(property, gethandler, access);
 }