forked from dotnet/winforms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move common dialogs to CsWin32 and clean printing (dotnet#10471)
We can't (yet) directly use CsWin32 directly for the common dialogs due to packing differences between 32 and 64 bit. We target AnyCPU and CsWin32 doesn't have the ability to force a particular platform definition. For now, I'm copying in CsWin32 defines from a platform targetted project. Hopefully we'll eventually get .NET support for specifying packing per platform. Also investigating getting a feature added to CsWin32 to mitigate this for us. This does a pass through all of the print code to clean to style guides. Plan is to follow up with an attempt to update System.Drawing to CsWin32 code.
- Loading branch information
1 parent
dbc7ce3
commit fc705dc
Showing
78 changed files
with
2,748 additions
and
3,278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
src/System.Drawing.Common/src/System/Drawing/Printing/Duplex.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace System.Drawing.Printing; | ||
|
||
/// <summary> | ||
/// Specifies the printer's duplex setting. | ||
/// Specifies the printer's duplex setting. | ||
/// </summary> | ||
public enum Duplex | ||
{ | ||
/// <summary> | ||
/// The printer's default duplex setting. | ||
/// The printer's default duplex setting. | ||
/// </summary> | ||
Default = -1, | ||
|
||
/// <summary> | ||
/// Single-sided printing. | ||
/// Single-sided printing. | ||
/// </summary> | ||
Simplex = SafeNativeMethods.DMDUP_SIMPLEX, | ||
|
||
/// <summary> | ||
/// Double-sided, horizontal printing. | ||
/// Double-sided, horizontal printing. | ||
/// </summary> | ||
Horizontal = SafeNativeMethods.DMDUP_HORIZONTAL, | ||
|
||
/// <summary> | ||
/// Double-sided, vertical printing. | ||
/// Double-sided, vertical printing. | ||
/// </summary> | ||
Vertical = SafeNativeMethods.DMDUP_VERTICAL, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
src/System.Drawing.Common/src/System/Drawing/Printing/InvalidPrinterException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.