Skip to content

Commit

Permalink
Add attributes to System.Drawing.Printing.PrintDocument (#35162)
Browse files Browse the repository at this point in the history
* add DefaultPropertyAttribute and DefaultEventAttribute to PrintDocument class and add references to System.ComponentModel.TypeConverter

* add the DefaultPropertyAttribute and DefaultEventAttribute to PrintDocument in the ref

Add DefaultEventAttribute and DefaultPropertyAttribute to PrintDocument in PrintDoument.Unix.cs
  • Loading branch information
eriawan committed Jun 23, 2020
1 parent a18403f commit 9de1a7e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2719,6 +2719,8 @@ public virtual void OnEndPrint(System.Drawing.Printing.PrintDocument document, S
public virtual System.Drawing.Graphics? OnStartPage(System.Drawing.Printing.PrintDocument document, System.Drawing.Printing.PrintPageEventArgs e) { throw null; }
public virtual void OnStartPrint(System.Drawing.Printing.PrintDocument document, System.Drawing.Printing.PrintEventArgs e) { }
}
[System.ComponentModel.DefaultPropertyAttribute("DocumentName")]
[System.ComponentModel.DefaultEventAttribute("PrintPage")]
public partial class PrintDocument : System.ComponentModel.Component
{
public PrintDocument() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<ProjectReference Include="..\..\System.Collections.NonGeneric\ref\System.Collections.NonGeneric.csproj" />
<ProjectReference Include="..\..\System.ComponentModel\ref\System.ComponentModel.csproj" />
<ProjectReference Include="..\..\System.ComponentModel.Primitives\ref\System.ComponentModel.Primitives.csproj" />
<ProjectReference Include="..\..\System.ComponentModel.TypeConverter\ref\System.ComponentModel.TypeConverter.csproj" />
<ProjectReference Include="..\..\System.Drawing.Primitives\ref\System.Drawing.Primitives.csproj" />
<ProjectReference Include="..\..\System.ObjectModel\ref\System.ObjectModel.csproj" />
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
Expand All @@ -22,6 +23,7 @@
<Reference Include="System.Collections.NonGeneric" />
<Reference Include="System.ComponentModel" />
<Reference Include="System.ComponentModel.Primitives" />
<Reference Include="System.ComponentModel.TypeConverter" />
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.Drawing.Primitives" />
<Reference Include="System.ObjectModel" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@
<Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
<Reference Include="System.ComponentModel" />
<Reference Include="System.ComponentModel.Primitives" />
<Reference Include="System.ComponentModel.TypeConverter" />
<Reference Include="System.Threading" />
<Reference Include="System.Threading.Thread" />
<Reference Include="System.Text.Encoding.Extensions" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

namespace System.Drawing.Printing
{
[DefaultProperty("DocumentName"), DefaultEvent("PrintPage")]
public class PrintDocument : System.ComponentModel.Component
{
private PageSettings defaultpagesettings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace System.Drawing.Printing
/// <summary>
/// Defines a reusable object that sends output to the printer.
/// </summary>
[SRDescription(nameof(SR.PrintDocumentDesc))]
[DefaultProperty("DocumentName"), DefaultEvent("PrintPage"), SRDescription(nameof(SR.PrintDocumentDesc))]
public class PrintDocument : Component
{
private string _documentName = "document";
Expand Down

0 comments on commit 9de1a7e

Please sign in to comment.