internal sealed override void Refresh(ref DisplayDevice displayDevice) { base.Refresh(ref displayDevice); this.RefreshMonitorList(); if (this.State.HasFlag(DisplayAdapterStateIndicators.AttachedToDesktop)) { var mode = GetCurrentDisplaySettingsEx(base.DeviceName, EnumDisplaySettingsExOptions.None); if (!mode.Equals(currentMode)) { currentMode = mode; this.CurrentModeChanged?.Invoke(this, EventArgs.Empty); } } }
internal DisplayAdapter(DisplayDevice displayDevice) : base(ref displayDevice) { monitorsByDeviceName = new Dictionary <string, DisplayMonitor>(); currentMode = GetCurrentDisplaySettingsEx(base.DeviceName, EnumDisplaySettingsExOptions.None); }
internal static extern bool EnumDisplaySettingsExW( [In, MarshalAs(UnmanagedType.LPWStr)] string deviceName, [In] int modeIndex, [In, Out] ref DisplayDeviceMode devMode, [In] EnumDisplaySettingsExOptions options );