Exemplo n.º 1
0
        private void RemoveMonitor(Monitor monitor)
        {
            ShadowMonitor shadow = _monitors[monitor];

            shadow.MonitorChanged -= Raw_MonitorChanged;
            MonitorRemoved?.Invoke(this, new ShadowMonitorEventArgs(shadow));
            _monitors.Remove(monitor);
            shadow.Dispose();
        }
Exemplo n.º 2
0
        private void ClearShadowObjects()
        {
            // clean up shadow collections
            foreach (ShadowMonitor shadow in _monitors.Values)
            {
                shadow.Dispose();
                MonitorRemoved?.Invoke(this, new ShadowMonitorEventArgs(shadow));
            }

            foreach (ShadowVisual shadow in _viewports.Values)
            {
                shadow.Dispose();
                ViewportRemoved?.Invoke(this, new ShadowViewportEventArgs(shadow));
            }

            _monitors.Clear();
            _viewports.Clear();
        }