Пример #1
0
 /// <summary>
 ///     Creates a new GridTopologyV1
 /// </summary>
 /// <param name="rows">Number of rows</param>
 /// <param name="columns">Number of columns</param>
 /// <param name="displays">Topology displays; Displays are done as [(row * columns) + column]</param>
 /// <param name="displaySettings">Display settings</param>
 /// <param name="applyWithBezelCorrectedResolution">
 ///     When enabling and doing the modeset, do we switch to the
 ///     bezel-corrected resolution
 /// </param>
 /// <param name="immersiveGaming">Enable as immersive gaming instead of Mosaic SLI (for Quadro-boards only)</param>
 /// <param name="baseMosaicPanoramic">
 ///     Enable as Base Mosaic (Panoramic) instead of Mosaic SLI (for NVS and Quadro-boards
 ///     only)
 /// </param>
 /// <param name="driverReloadAllowed">
 ///     If necessary, reloading the driver is permitted (for Vista and above only). Will not
 ///     be persisted.
 /// </param>
 /// <param name="acceleratePrimaryDisplay">
 ///     Enable SLI acceleration on the primary display while in single-wide mode (For
 ///     Immersive Gaming only). Will not be persisted.
 /// </param>
 /// <exception cref="ArgumentOutOfRangeException">Total number of topology displays is below or equal to zero</exception>
 /// <exception cref="ArgumentException">Number of displays doesn't match the arrangement</exception>
 public GridTopologyV1(int rows, int columns, GridTopologyDisplayV1[] displays, DisplaySettingsV1 displaySettings,
                       bool applyWithBezelCorrectedResolution, bool immersiveGaming, bool baseMosaicPanoramic,
                       bool driverReloadAllowed,
                       bool acceleratePrimaryDisplay)
 {
     if (rows * columns <= 0)
     {
         throw new ArgumentOutOfRangeException($"{nameof(rows)}, {nameof(columns)}",
                                               "Invalid display arrangement.");
     }
     if (displays.Length > MaxDisplays)
     {
         throw new ArgumentException("Too many displays.");
     }
     if (displays.Length != rows * columns)
     {
         throw new ArgumentException("Number of displays should match the arrangement.", nameof(displays));
     }
     this             = typeof(GridTopologyV1).Instantiate <GridTopologyV1>();
     _Rows            = (uint)rows;
     _Columns         = (uint)columns;
     _DisplayCount    = (uint)displays.Length;
     _Displays        = displays;
     _DisplaySettings = displaySettings;
     ApplyWithBezelCorrectedResolution = applyWithBezelCorrectedResolution;
     ImmersiveGaming          = immersiveGaming;
     BaseMosaicPanoramic      = baseMosaicPanoramic;
     DriverReloadAllowed      = driverReloadAllowed;
     AcceleratePrimaryDisplay = acceleratePrimaryDisplay;
     Array.Resize(ref _Displays, MaxDisplays);
 }
Пример #2
0
 /// <inheritdoc />
 public bool Equals(DisplaySettingsV1 other)
 {
     return(_Width == other._Width &&
            _Height == other._Height &&
            _BitsPerPixel == other._BitsPerPixel &&
            _Frequency == other._Frequency);
 }
Пример #3
0
 /// <inheritdoc />
 public bool Equals(DisplaySettingsV1 other)
 {
     return((_Width == other._Width) && (_Height == other._Height) && (_BitsPerPixel == other._BitsPerPixel) &&
            (_Frequency == other._Frequency));
 }