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