3 writes to PrinterSettings
System.Drawing.Common.Tests (3)
System\Drawing\Printing\PrintDocumentTests.cs (3)
110
document.
PrinterSettings
= null;
114
document.
PrinterSettings
= printerSettings;
121
document.
PrinterSettings
= printerSettings;
26 references to PrinterSettings
System.Drawing.Common (10)
System\Drawing\Printing\DefaultPrintController.cs (5)
28
if (!document.
PrinterSettings
.IsValid)
29
throw new InvalidPrinterException(document.
PrinterSettings
);
32
_hdc = new(document.
PrinterSettings
.CreateDeviceContext(_modeHandle));
35
fixed (char* outputPort = document.
PrinterSettings
.OutputPort)
45
lpszOutput = document.
PrinterSettings
.PrintToFile ? outputPort : null
System\Drawing\Printing\PreviewPrintController.cs (3)
30
if (!document.
PrinterSettings
.IsValid)
32
throw new InvalidPrinterException(document.
PrinterSettings
);
37
_hdc = new(document.
PrinterSettings
.CreateInformationContext(_modeHandle ?? HGLOBAL.Null));
System\Drawing\Printing\PrintController.cs (2)
45
: document.
PrinterSettings
.PrintToFile ? PrintAction.PrintToFile : PrintAction.PrintToPrinter;
218
_modeHandle = (SafeDeviceModeHandle)document.
PrinterSettings
.GetHdevmode(document.DefaultPageSettings);
System.Drawing.Common.Tests (6)
System\Drawing\Printing\PrintDocumentTests.cs (6)
111
Assert.IsAssignableFrom<PrinterSettings>(document.
PrinterSettings
);
115
Assert.Same(printerSettings, document.
PrinterSettings
);
117
document.
PrinterSettings
.DefaultPageSettings.PaperSize.Kind,
175
document.
PrinterSettings
.PrinterName = GetPdfPrinterName();
176
document.
PrinterSettings
.PrintFileName = GetTestFilePath();
177
document.
PrinterSettings
.PrintToFile = true;
System.Windows.Forms (4)
System\Windows\Forms\Printing\PageSetupDialog.cs (1)
80
_printerSettings = _printDocument.
PrinterSettings
;
System\Windows\Forms\Printing\PrintDialog.cs (1)
79
_printerSettings = _printDocument is null ? new PrinterSettings() : _printDocument.
PrinterSettings
;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (2)
997
if (Document is not null && !Document.
PrinterSettings
.IsValid)
999
throw new InvalidPrinterException(Document.
PrinterSettings
);
System.Windows.Forms.Tests (6)
System\Windows\Forms\PageSetupDialogTests.cs (6)
124
Assert.Same(value?.
PrinterSettings
, dialog.PrinterSettings);
130
Assert.Same(value?.
PrinterSettings
, dialog.PrinterSettings);
145
Assert.Same(value.
PrinterSettings
, dialog.PrinterSettings);
151
Assert.Same(value.
PrinterSettings
, dialog.PrinterSettings);
166
Assert.Same(original.
PrinterSettings
, dialog.PrinterSettings);
172
Assert.Same(original.
PrinterSettings
, dialog.PrinterSettings);