private void OnDisplaysCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { if (e.OldItems != null) { foreach (Display d in e.OldItems) { d.Interrupt(); } } if (e.NewItems != null) { foreach (Display d in e.NewItems) { d.Run(); } } DisplaysChanged?.Invoke(this, new DisplaysChangedEventArgs(this, e.OldItems, e.NewItems)); }
protected virtual void OnDisplaysChanged() { DisplaysChanged?.Invoke(this); }
private void ProcessMessage(Native.DisplayChannelMessage message) { DisplaysChanged?.Invoke(this, new DisplaysChangedEventArgs(GetDisplays(), GetPrimaryDisplay())); }