3 writes to PrinterSettings
System.Drawing.Common.Tests (3)
System\Drawing\Printing\PrintDocumentTests.cs (3)
110document.PrinterSettings = null; 114document.PrinterSettings = printerSettings; 121document.PrinterSettings = printerSettings;
26 references to PrinterSettings
System.Drawing.Common (10)
System\Drawing\Printing\DefaultPrintController.cs (5)
28if (!document.PrinterSettings.IsValid) 29throw new InvalidPrinterException(document.PrinterSettings); 32_hdc = new(document.PrinterSettings.CreateDeviceContext(_modeHandle)); 35fixed (char* outputPort = document.PrinterSettings.OutputPort) 45lpszOutput = document.PrinterSettings.PrintToFile ? outputPort : null
System\Drawing\Printing\PreviewPrintController.cs (3)
30if (!document.PrinterSettings.IsValid) 32throw 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)
111Assert.IsAssignableFrom<PrinterSettings>(document.PrinterSettings); 115Assert.Same(printerSettings, document.PrinterSettings); 117document.PrinterSettings.DefaultPageSettings.PaperSize.Kind, 175document.PrinterSettings.PrinterName = GetPdfPrinterName(); 176document.PrinterSettings.PrintFileName = GetTestFilePath(); 177document.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)
997if (Document is not null && !Document.PrinterSettings.IsValid) 999throw new InvalidPrinterException(Document.PrinterSettings);
System.Windows.Forms.Tests (6)
System\Windows\Forms\PageSetupDialogTests.cs (6)
124Assert.Same(value?.PrinterSettings, dialog.PrinterSettings); 130Assert.Same(value?.PrinterSettings, dialog.PrinterSettings); 145Assert.Same(value.PrinterSettings, dialog.PrinterSettings); 151Assert.Same(value.PrinterSettings, dialog.PrinterSettings); 166Assert.Same(original.PrinterSettings, dialog.PrinterSettings); 172Assert.Same(original.PrinterSettings, dialog.PrinterSettings);