private static void RemoveListener(EventHandler <Color> listener) { if (_handlers.Remove(listener)) { _accentColorChanged -= listener; if (_handlers.Count == 0) { _listenerWindow?.Close(); _listenerWindow = null; } } }
private void Remove(EventHandler <T> listener) { if (this._handlers.Remove(listener)) { this._changedEvent -= listener; if (this._handlers.Count == 0) { this._listenerWindow?.Close(); this._listenerWindow = null; } } }
private static void AddListener(EventHandler <Color> listener) { if (_handlers.Add(listener)) { _accentColorChanged += listener; if (_listenerWindow == null) { _listenerWindow = new ListenerWindow(RaiseAccentColorChanged); _listenerWindow.Show(); } } }
private void Add(EventHandler <T> listener) { if (this._handlers.Add(listener)) { this._changedEvent += listener; if (this._listenerWindow == null) { this._listenerWindow = new ListenerWindow(this.GetType().Name, this.WndProc); this._listenerWindow.Show(); } } }