34 references to PrinterResolutionKind
System.Drawing (1)
System.Drawing.cs (1)
123[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Printing.PrinterResolutionKind))]
System.Drawing.Common (20)
System\Drawing\Printing\PageSettings.cs (3)
295if (_printerResolution.Kind == PrinterResolutionKind.Custom) 456&& resolutions[i].Kind == (PrinterResolutionKind)devmode->dmPrintQuality) 464PrinterResolutionKind.Custom,
System\Drawing\Printing\PrinterResolution.cs (8)
13private PrinterResolutionKind _kind; 20_kind = PrinterResolutionKind.Custom; 23internal PrinterResolution(PrinterResolutionKind kind, int x, int y) 33public PrinterResolutionKind Kind 38if (value is < PrinterResolutionKind.High or > PrinterResolutionKind.Custom) 40throw new InvalidEnumArgumentException(nameof(value), (int)value, typeof(PrinterResolutionKind)); 57public override string ToString() => _kind != PrinterResolutionKind.Custom
System\Drawing\Printing\PrinterSettings.cs (9)
950new(PrinterResolutionKind.High, -4, -1), 951new(PrinterResolutionKind.Medium, -3, -1), 952new(PrinterResolutionKind.Low, -2, -1), 953new(PrinterResolutionKind.Draft, -1, -1), 960result[0] = new(PrinterResolutionKind.High, -4, -1); 961result[1] = new(PrinterResolutionKind.Medium, -3, -1); 962result[2] = new(PrinterResolutionKind.Low, -2, -1); 963result[3] = new(PrinterResolutionKind.Draft, -1, -1); 975result[i + 4] = new PrinterResolution(PrinterResolutionKind.Custom, resolution.X, resolution.Y);
System.Drawing.Common.Tests (13)
System\Drawing\Printing\PrintDocumentTests.cs (1)
246Assert.True(Enum.IsDefined(typeof(PrinterResolutionKind), pageSettings.PrinterResolution.Kind));
System\Drawing\Printing\PrinterResolutionTests.cs (12)
14Assert.Equal(PrinterResolutionKind.Custom, resolution.Kind); 58[InlineData(PrinterResolutionKind.Custom)] 59[InlineData(PrinterResolutionKind.Draft)] 60[InlineData(PrinterResolutionKind.High)] 61[InlineData(PrinterResolutionKind.Low)] 62[InlineData(PrinterResolutionKind.Medium)] 63public void Kind_Set_GetReturnsExpected(PrinterResolutionKind value) 77[InlineData(PrinterResolutionKind.Custom + 1)] 78[InlineData(PrinterResolutionKind.High - 1)] 79public void Kind_SetInvalid_ThrowsInvalidEnumArgumentException(PrinterResolutionKind value) 89yield return new object[] { new PrinterResolution { Kind = PrinterResolutionKind.High }, "[PrinterResolution High]" }; 90yield return new object[] { new PrinterResolution { X = 1, Y = 2, Kind = PrinterResolutionKind.High }, "[PrinterResolution High]" };