/// <summary> /// 移除一个监听者 /// </summary> /// <param name="listener"></param> public void RemoveDataPointListener(IDataPointListener listener) { if (null == listener) { return; } if (_mDataPointListeners != null && _mDataPointListeners.Contains(listener)) { _mDataPointListeners.Remove(listener); } }
/// <summary> /// 添加一个监听者 /// </summary> /// <param name="listener"></param> public void AddDataPointListener(IDataPointListener listener) { if (null == listener) { return; } if (null == _mDataPointListeners) { _mDataPointListeners = new List <IDataPointListener>(); } if (_mDataPointListeners.Contains(listener)) { return; } _mDataPointListeners.Add(listener); }