internal sealed override void Refresh( DisplayDevice displayDevice ) { base.Refresh( displayDevice ); this.RefreshMonitors(); var mode = NativeMethods.GetCurrentDisplaySettingsEx( base.DeviceIdentifier, EnumDisplaySettingsExOptions.None ); if( !mode.Equals( currentMode ) ) { currentMode = mode; var currentModeChangedEvent = this.CurrentModeChanged; if( currentModeChangedEvent != null ) currentModeChangedEvent.Invoke( this, EventArgs.Empty ); } }
internal DisplayAdapter( DisplayDevice displayDevice ) : base( displayDevice ) { monitorsByDeviceName = new Dictionary<string, DisplayMonitor>(); currentMode = NativeMethods.GetCurrentDisplaySettingsEx( base.DeviceIdentifier, EnumDisplaySettingsExOptions.None ); }