Пример #1
0
		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 );
			}
		}
Пример #2
0
		internal DisplayAdapter( DisplayDevice displayDevice )
			: base( displayDevice )
		{
			monitorsByDeviceName = new Dictionary<string, DisplayMonitor>();
			currentMode = NativeMethods.GetCurrentDisplaySettingsEx( base.DeviceIdentifier, EnumDisplaySettingsExOptions.None );
		}