/// <summary>
 ///     Returns a list of all unattached displays on this machine
 /// </summary>
 /// <returns>An enumerable list of UnAttachedDisplay</returns>
 public static IEnumerable <UnAttachedDisplay> GetUnAttachedDisplays()
 {
     return
         (DisplayAdapter.GetDisplayAdapters()
          .SelectMany(adapter => adapter.GetDisplayDevices(false))
          .Where(device => !device.IsAvailable)
          .Select(device => new UnAttachedDisplay(device)));
 }
예제 #2
0
 /// <summary>
 ///     Returns a list of all attached displays on this machine
 /// </summary>
 /// <returns>An enumerable list of Displays</returns>
 public static IEnumerable <Display> GetDisplays()
 {
     return
         (DisplayAdapter.GetDisplayAdapters()
          .SelectMany(adapter => adapter.GetDisplayDevices(true))
          .Where(device => device.IsAvailable)
          .Select(device => new Display(device)));
 }