// Creates a new DisplayResolution object for the primary DisplayDevice. public DisplayResolution(int x, int y, int width, int height, int bitsPerPixel, float refreshRate) { // Refresh rate may be zero, since this information may not be available on some platforms. if (width <= 0) throw new ArgumentOutOfRangeException("width", "Must be greater than zero."); if (height <= 0) throw new ArgumentOutOfRangeException("height", "Must be greater than zero."); if (bitsPerPixel <= 0) throw new ArgumentOutOfRangeException("bitsPerPixel", "Must be greater than zero."); if (refreshRate < 0) throw new ArgumentOutOfRangeException("refreshRate", "Must be greater than, or equal to zero."); this.bounds = new OpenTK.Graphics.Rectangle(x, y, width, height); this.bits_per_pixel = bitsPerPixel; this.refresh_rate = refreshRate; }
// Creates a new DisplayResolution object for the primary DisplayDevice. public DisplayResolution(int x, int y, int width, int height, int bitsPerPixel, float refreshRate) { // Refresh rate may be zero, since this information may not be available on some platforms. if (width <= 0) { throw new ArgumentOutOfRangeException("width", "Must be greater than zero."); } if (height <= 0) { throw new ArgumentOutOfRangeException("height", "Must be greater than zero."); } if (bitsPerPixel <= 0) { throw new ArgumentOutOfRangeException("bitsPerPixel", "Must be greater than zero."); } if (refreshRate < 0) { throw new ArgumentOutOfRangeException("refreshRate", "Must be greater than, or equal to zero."); } this.bounds = new OpenTK.Graphics.Rectangle(x, y, width, height); this.bits_per_pixel = bitsPerPixel; this.refresh_rate = refreshRate; }