98 Commits
Author SHA1 Message Date
Andreia Gaita 360de1202f Fixes #79835, implements PrinterSettings.IsValid, throws proper
InvalidPrinterException with differentiated messages.

* PrintingServices.cs: Declares IsPrinterValid to enable easy checking
if printer name is a valid printer

* PrintingServicesWin32.cs: Implements IsPrinterValid, caches 
last assigned printer name and if it is valid to speed up next calls.

* PrintingServicesUnix.cs: Implements IsPrinterValid, caches 
last assigned printer name and if it is valid to speed up next calls.

* PageSettings.cs: 
	- throw InvalidPrinterException in the properties,
	according to the docs: Color, Landscape, PaperSize, PaperSource, 
	PrinterResolution
	- change the private fields above to internal, so that in the
	constructor we can access them without triggering the exceptions
	if there are no printers installed
	
* PrinterSettings.cs: Implement IsValid to call IsPrinterValid
implemented above

* PreviewPrintController.cs: throw InvalidPrinterException on 
StartPrint() if there's no valid printer configured

* InvalidPrinterException.cs: New private GetMessage() to customize
printer error message, used by constructor

2006-11-14 Andreia Gaita <[email protected]>

svn path=/trunk/mcs/; revision=67880
2006-11-14 23:03:43 +00:00
Jordi Mas i Hernandez 99eceeb81b * PrintingServicesUnix.cs: Implements LoadPrinterPaperSources member,
simplifies GetPaperSizeName and loads paper source and size defaults

2006-09-27 Jordi Mas i Hernandez <[email protected]>


svn path=/trunk/mcs/; revision=65976
2006-09-27 17:26:59 +00:00
Jordi Mas i Hernandez 466bc86721 2006-09-27 Jordi Mas i Hernandez <[email protected]>
* PrintingServices.cs: Add LoadPrinterPaperSources member
	
	* PrintingServicesWin32.cs: Implements LoadPrinterPaperSources and
	reads the default paper source and size.
	
	* PrintingServicesUnix.cs: Add stub LoadPrinterPaperSources member
	
	* PrinterSettings.cs: Implements PaperSourceCollection property and
	makes default paper source and size from the system.


svn path=/trunk/mcs/; revision=65968
2006-09-27 12:07:06 +00:00
Chris Toshok a0780d5bbb 2006-08-02 Chris Toshok <[email protected]>
* PreviewPrintController.cs: scale the Graphics context we pass
	back from OnStartPage such that the preview looks the way the
	printed output will.


svn path=/trunk/mcs/; revision=63258
2006-08-02 16:39:57 +00:00
Carlos Alberto Cortez c422874876 2006-07-28 Carlos Alberto Cortez <[email protected]>
* PrintDocument.cs: When null is passed to PrinterSettings,
	it should be set to a new PrinterSettings instance, and should never
	be null.

	* PrinterSettings.cs: Default value for Copies should be 1. Also
	add a space in the ToString method, to correctly show the printer
	info.


svn path=/trunk/mcs/; revision=63110
2006-07-28 19:36:25 +00:00
Jordi Mas i Hernandez ff0513307a Comment on single graphic context usage
svn path=/trunk/mcs/; revision=63091
2006-07-28 18:04:53 +00:00
Chris Toshok b566a6548d 2006-07-26 Chris Toshok <[email protected]>
* PrinterSettings.cs: expose PrintFileName in the 1.1 case as an
	internal property, so we can get at it from MWF.

	* PrintingServicesUnix.cs: handle print to file, and also remove
	the temp file after sending the data to the printer.  fix some
	dllimports to match the rest of system.drawing.

	* PreviewPrintController.cs: implement this (warning, it'll eat
	all your memory until we get a real Metafile implementation, as
	we're storing bitmaps).

	* PrintDocument.cs: shift the graphics context stuff around a bit
	in Print(), so that the events after OnStartPrint are passed the
	graphics context the controller created there, and we use the
	return value of OnStartPage to do all drawing.


svn path=/trunk/mcs/; revision=63020
2006-07-26 23:02:29 +00:00
Jordi Mas i Hernandez f36b05098c 2006-05-20 Jordi Mas i Hernandez <[email protected]>
* PrintingServices.cs: GetPrintDialogInfo definition
	* PrintingServicesWin32.cs GetPrintDialogInfo implementation
	* PrintingServicesUnix.cs: GetPrintDialogInfo stub


svn path=/trunk/mcs/; revision=60889
2006-05-20 15:58:22 +00:00
Jordi Mas i Hernandez 9fd6cbc11f 2006-04-14 Jordi Mas i Hernandez <[email protected]>
* PrintingServicesUnix.cs: Replace cupsGetPrinters deprecated API call


svn path=/trunk/mcs/; revision=60683
2006-05-14 09:20:50 +00:00
Jordi Mas i Hernandez 48e7e27ab1 2006-04-13 Jordi Mas i Hernandez <[email protected]>
* PrintingServicesUnix.cs: Checks if cups is installed
	* PrinterSettings.cs: PrintToFile property and ToString method


svn path=/trunk/mcs/; revision=60679
2006-05-13 18:18:36 +00:00
Sebastien Pouliot fd0c615c45 2006-04-28 Sebastien Pouliot <[email protected]>
* PrintController.cs: corcompare fix. No public ctor in 2.0.
	* PrinterSettings.cs: corcompare fix. Clone method isn't virtual.


svn path=/trunk/mcs/; revision=60052
2006-04-28 19:13:23 +00:00
Sebastien Pouliot a91b0dc4ef 2006-03-21 Sebastien Pouliot <[email protected]>
* PrintingServicesUnix.cs: cupsGetPrinters(char***) requires to free 
	each individual string and (finally) the list. Note that this call is
	deprecated.


svn path=/trunk/mcs/; revision=58270
2006-03-22 00:00:06 +00:00
Peter Dennis Bartok 6bfdefe3d7 2006-03-13 Peter Dennis Bartok <[email protected]>
* PrintingServicesUnix.cs: Handle not having a printer


svn path=/trunk/mcs/; revision=57931
2006-03-14 00:10:10 +00:00
Peter Dennis Bartok 8540a01cb1 2006-02-09 Peter Dennis Bartok <[email protected]>
* ColorPalette.cs, EncoderParameters.cs, EncoderParameter.cs,
	  ImageAttributes.cs: 64bit cleanup and some simplifications

2006-02-09  Peter Dennis Bartok  <[email protected]>

	* PrintingServicesWin32.cs: Simplyfied the code, removing the need
	  for pointer calculations (part of 64bit cleanup)

2006-02-09  Peter Dennis Bartok  <[email protected]>

	* Image.cs, Bitmap.cs: Removed unneeded casts
	* Icon.cs: Fixed code to be 64bit safe


svn path=/trunk/mcs/; revision=56738
2006-02-09 23:58:23 +00:00
Sebastien Pouliot a3a9058c54 2006-01-27 Sebastien Pouliot <[email protected]>
* PrintingServicesWin32.cs: Ensure Marshal.FreeHGlobal is called for 
	all unmanaged memory allocated with AllocHGlobal.


svn path=/trunk/mcs/; revision=56181
2006-01-27 19:16:23 +00:00
Jordi Mas i Hernandez 3e3aff3acb 2006-01-15 Jordi Mas i Hernandez <[email protected]>
* PrintingServicesUnix.cs: Allow setting the dpy's for the surface


svn path=/trunk/mcs/; revision=55609
2006-01-15 21:20:28 +00:00
Jordi Mas i Hernandez 08351b8c0d 2005-12-22 Jordi Mas i Hernandez <[email protected]>
* PrintingServices.cs: Printing services abstration class
	* PrintingServicesWin32.cs: Win32 printer driver
	* PrintingServicesUnix.cs: Unix printer driver
	* Margins.cs: Fixes exceptions error messages
	* PrinterResolution.cs: Fixes
	* PrintEventArgs.cs: New internal method
	* PrintPageEventArgs.cs: New internal method
	* StandardPrintController.cs: Fixes
	* PrinterUnitConvert.cs: Fixes conversion errors
	* PrintDocument.cs: Fixes to make it print
	* PageSettings.cs: Take margains into account
	* PrintController.cs: Fixes
	* PaperSize.cs: Method to set paper Kind
	* PrinterSettings.cs: Implements settings and fixes
	* 	


svn path=/trunk/mcs/; revision=54735
2005-12-22 17:06:00 +00:00
Jordi Mas i Hernandez e07caa2bbe In System.Drawing.Printing:
2005-12-07 Jordi Mas i Hernandez <[email protected]>
	
	* PrinterResolutionKind.cs: Fixes signature for .Net 2.0
	* PaperKind.cs: Fixes signature for .Net 2.0
	* PaperSource.cs: Fixes signature for .Net 2.0
	* Margins.cs: Fixes signature for .Net 2.0
	* PrinterResolution.cs: Fixes signature for .Net 2.0
	* PrintEventArgs.cs: Fixes signature for .Net 2.0
	* PrintAction.cs: New enum in .Net 2.0
	* PageSettings.cs:  Fixes signature for .Net 2.0
	* PaperSourceKind.cs:  Fixes signature for .Net 2.0
	* PrintController.cs: Fixes signature for .Net 2.0
	* Duplex.cs: Fixes signature for .Net 2.0
	* PaperSize.cs: Fixes signature for .Net 2.0
	* PreviewPrintController.cs: Fixes signature for .Net 2.0
	* PrinterSettings.cs: Fixes signature for .Net 2.0
	* PrintRange.cs: Fixes signature for .Net 2.0
	  
In System.Drawing:
2005-12-07 Jordi Mas i Hernandez <[email protected]>

	* BufferedGraphicsManager.cs: Fixes signature


svn path=/trunk/mcs/; revision=54028
2005-12-07 12:19:45 +00:00
Sebastien Pouliot ddb3048796 2005-09-16 Sebastien Pouliot <[email protected]>
* InvalidPrinterException.cs: Removed NotImplementedException (not
	required) and added a demand for SerializationFormatter on the 
	GetObjectData method.
	* PrintingPermission.cs: Throw ArgumentException if the class or 
	version attributes are missing in the supplied XML (only in 1.x).


svn path=/trunk/mcs/; revision=50149
2005-09-16 13:07:18 +00:00
Jordi Mas i Hernandez cb10e45441 2005-03-23 Jordi Mas i Hernandez <[email protected]>
* PaperKind.cs: fixes wrong enum values


svn path=/trunk/mcs/; revision=42134
2005-03-23 09:55:26 +00:00
Lluis Sanchez 70d92ded96 2005-01-27 Lluis Sanchez Gual <[email protected]>
* MarginsConverter.cs: Implemented support for InstanceDescriptor.  

svn path=/trunk/mcs/; revision=39661
2005-01-27 20:28:36 +00:00
Sebastien Pouliot c767473f38 2004-09-09 Sebastien Pouliot <[email protected]>
* PrintingPermission.cs: Applied the new permission template.
	Implemented missing To|FromXml. Fixed set operations, ...
	* PrintingPermissionAttribute.cs: Added enum validation for Level and
	creation of unrestricted permissions.
	* PrintingPermissionLevel.cs: Added [Serializable] for NET_2_0.

svn path=/trunk/mcs/; revision=33640
2004-09-09 11:09:41 +00:00
Jordi Mas i Hernandez b5fd3413ce fixes class name in filename
svn path=/trunk/mcs/; revision=30128
2004-06-22 16:49:20 +00:00
Sachin Kumar 15a49e8b92 Add license and copyright to all source files in System.Drawing
svn path=/trunk/mcs/; revision=29667
2004-06-16 06:32:39 +00:00
Jordi Mas i Hernandez 1f5c87144a remove added extra dc
svn path=/trunk/mcs/; revision=27177
2004-05-12 16:30:30 +00:00
Jordi Mas i Hernandez 34661a2fac fixes typos
svn path=/trunk/mcs/; revision=27160
2004-05-12 11:44:44 +00:00
Jordi Mas i Hernandez 9269cfde45 fixes class name definition typo
svn path=/trunk/mcs/; revision=27159
2004-05-12 11:34:37 +00:00
Jordi Mas i Hernandez c1a3219b4a removes anonying warning
svn path=/trunk/mcs/; revision=25463
2004-04-14 10:51:37 +00:00
Andreas N ccad7900c6 2004-02-07 Andreas Nahr <[email protected]>
* Margins.cs: Restyled, implemented missing members
	* PageSettings.cs: Added missing attributes, stubbed,
	  fixed a few small issues
	* PreviewPrintController.cs: Stubbed, small issues fixed
	* PrintController.cs: Marked unfinished, restyled
	* PrintDocument.cs: Added attributes
	* PrinterResolution.cs: Added missing method
	* PrinterSettings.cs: Mono-stylyzed, fixed signatures,
	  removed commented out values
	* PrinterUnitConvert.cs: Added private constructor
	* StandardPrintController.cs: Little restyling
	* PaperKind.cs: Added missing enum values

svn path=/trunk/mcs/; revision=22874
2004-02-08 07:59:06 +00:00
Andreas N 3c84df7152 removed
svn path=/trunk/mcs/; revision=22862
2004-02-07 19:27:12 +00:00
Alexandre Pigolkine bad618a4c0 checkin for Herv Poussineau <[email protected]>.
svn path=/trunk/mcs/; revision=18235
2003-09-21 02:13:45 +00:00
Alexandre Pigolkine 659f69739d switch to Unix line terminators
svn path=/trunk/mcs/; revision=18233
2003-09-21 01:55:41 +00:00
Alexandre Pigolkine d0f95fec93 2 files removed
svn path=/trunk/mcs/; revision=18232
2003-09-21 01:45:49 +00:00
Andreas N b38dfba078 2003-07-17 Andreas Nahr <[email protected]>
* PrinterResolution.cs: Fixed signature, implemented, restyled, removed non-CLS compliant members

svn path=/trunk/mcs/; revision=16328
2003-07-17 09:02:32 +00:00
Martin Willemoes Hansen 9c784fbcfc * System.Drawing.Printing/PrinterUnitConvert.cs stubed
svn path=/trunk/mcs/; revision=12973
2003-03-31 14:14:49 +00:00
Miguel de Icaza 2930bfc0c1 Remove dependency
svn path=/trunk/mcs/; revision=10749
2003-01-20 22:49:55 +00:00
Miguel de Icaza 36d4470eab More fixes
svn path=/trunk/mcs/; revision=8765
2002-11-02 20:32:46 +00:00
Miguel de Icaza 98111e3b30 More fixes
svn path=/trunk/mcs/; revision=8764
2002-11-02 20:32:08 +00:00
Miguel de Icaza 30b1015f75 More typo fixes
svn path=/trunk/mcs/; revision=8762
2002-11-02 20:28:34 +00:00
Miguel de Icaza 181ad70f28 Fix constructor
svn path=/trunk/mcs/; revision=8761
2002-11-02 20:27:54 +00:00
Miguel de Icaza 4e45db1283 Rename the Controllers
svn path=/trunk/mcs/; revision=8760
2002-11-02 20:27:07 +00:00
Dennis Hayes ce9fc09aab 2002-10-13 DennisHayes <[email protected]>
* PrintDocument
	* Added OriginAtMargin for .NET V 1.1 compatablity.

svn path=/trunk/mcs/; revision=8270
2002-10-15 01:03:58 +00:00
Miguel de Icaza 0e99d2af1f Also rename the constructor
svn path=/trunk/mcs/; revision=7956
2002-10-03 05:41:03 +00:00
Miguel de Icaza cdaeb53a26 rename file
svn path=/trunk/mcs/; revision=7954
2002-10-03 05:38:47 +00:00
Dennis Hayes 276270710a 2002-9-13 DennisHayes <[email protected]>
* PageSettings.cs 
* PaperSize.cs 
* PaperSource.cs 
* PrintControler.cs 
* PrintDocument.cs 
* PrintingPermission.cs 
* PrintPageEventHandler.cs 
* QueryPageSettingEventArgs.cs 
* QueryPageSettingsEventHandler.cs 
* added todos back
* minor bug fixes

svn path=/trunk/mcs/; revision=7436
2002-09-13 17:43:58 +00:00
Dennis Hayes cda70e3aea 2002-9-2 DennisHayes <[email protected]>
* Duplex.cs
	* InvalidPrinterExecption.cs
	* Margins.cs
	* MarginsConverter.cs
	* PageSettings.cs
	* PaperKind.cs
	* PaperSize.cs
	* PaperSource.cs
	* PaperSourceCollection.cs
	* PaperSourceKind.cs
	* PaperUnitConvert.cs
	* PreviewPageInfo.cs
	* PreviewPrintControler.cs
	* PrintControler.cs
	* PrintDocument.cs
	* PrinterResolution.cs
	* PrinterResolutionKind.cs
	* PrinterSettings.cs
	* PrinterUnit.cs
	* PrintEventArgs.cs
	* PrintEventHandler.cs
	* PrintingPermission.cs
	* PrintingPermissionAttribute.cs
	* PrintingPermissionLevel.cs
	* PrintPageEventArgs.cs
	* PrintPageEventHandler.cs
	* PrintRange.cs
	* QueryPageSettingEventArgs.cs
	* QueryPageSettingsEventHandler.cs
	* StandardPrintController.cs
	* Added null classes for most/all classes, Many stubs, and some implmentation

svn path=/trunk/mcs/; revision=7410
2002-09-12 18:47:50 +00:00
Dennis Hayes 6cae23ae31 * Corrected Enum Values. *
svn path=/trunk/mcs/; revision=4011
2002-04-23 22:18:36 +00:00
Dennis Hayes b5cb34092b * All system.Drawing.Printing enums complete *
* Inital and final? checkin *

svn path=/trunk/mcs/; revision=3544
2002-04-01 23:36:27 +00:00