public bool UnregisterGlobalChangedListener(ChangedCallback callback, object userData)
    {
        ChangedListener item = new ChangedListener();

        item.SetCallback(callback);
        item.SetUserData(userData);
        return(this.m_globalChangedListeners.Remove(item));
    }
Exemplo n.º 2
0
 public GameModeSetting RemoveChangedCallback(ChangedCallback callback)
 {
     if (onStateChanged == null)
     {
         return(this);
     }
     onStateChanged -= callback;
     return(this);
 }
Exemplo n.º 3
0
 public GameModeSetting AddChangedCallback(ChangedCallback callback)
 {
     if (onStateChanged == null)
     {
         onStateChanged = callback;
         return(this);
     }
     onStateChanged += callback;
     return(this);
 }
    public bool RegisterGlobalChangedListener(ChangedCallback callback, object userData)
    {
        ChangedListener item = new ChangedListener();

        item.SetCallback(callback);
        item.SetUserData(userData);
        if (this.m_globalChangedListeners.Contains(item))
        {
            return(false);
        }
        this.m_globalChangedListeners.Add(item);
        return(true);
    }
    public bool RegisterChangedListener(Option option, ChangedCallback callback, object userData)
    {
        List <ChangedListener> list;
        ChangedListener        item = new ChangedListener();

        item.SetCallback(callback);
        item.SetUserData(userData);
        if (!this.m_changedListeners.TryGetValue(option, out list))
        {
            list = new List <ChangedListener>();
            this.m_changedListeners.Add(option, list);
        }
        else if (list.Contains(item))
        {
            return(false);
        }
        list.Add(item);
        return(true);
    }
    public bool UnregisterChangedListener(Option option, ChangedCallback callback, object userData)
    {
        List <ChangedListener> list;
        ChangedListener        item = new ChangedListener();

        item.SetCallback(callback);
        item.SetUserData(userData);
        if (!this.m_changedListeners.TryGetValue(option, out list))
        {
            return(false);
        }
        if (!list.Remove(item))
        {
            return(false);
        }
        if (list.Count == 0)
        {
            this.m_changedListeners.Remove(option);
        }
        return(true);
    }
 public bool RegisterGlobalChangedListener(ChangedCallback callback)
 {
     return(this.RegisterGlobalChangedListener(callback, null));
 }
 public bool RegisterChangedListener(Option option, ChangedCallback callback)
 {
     return(this.RegisterChangedListener(option, callback, null));
 }
Exemplo n.º 9
0
 internal static extern BadgeError SetChangedCallback(ChangedCallback callback, IntPtr userData);
Exemplo n.º 10
0
 internal static extern BadgeError UnsetChangedCallback(ChangedCallback callback);
Exemplo n.º 11
0
 public bool RemoveChangedListener(ChangedCallback callback)
 {
     return(this.RemoveChangedListener(callback, null));
 }
Exemplo n.º 12
0
 public bool AddChangedListener(ChangedCallback callback)
 {
     return(this.AddChangedListener(callback, null));
 }
 internal static extern ErrorCode UnsetChangedCallback(ChangedCallback callback);
 internal static extern ErrorCode SetChangedCallback(ChangedCallback callback, IntPtr userData);
Exemplo n.º 15
0
 internal static extern int SetChangedCb(string key, ChangedCallback callback, IntPtr userData);