Skip to content

Commit

Permalink
[SWF] Method OnClosed should pass FormClosedEventArgs type, instead o…
Browse files Browse the repository at this point in the history
…f EventArgs.Empty (mono#13283)

Fixes mono#13282
  • Loading branch information
sancheolz authored and akoeplinger committed Mar 4, 2019
1 parent 1da9c0f commit 89f264a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs
Expand Up @@ -157,8 +157,9 @@ internal bool FireClosingEvents (CloseReason reason, bool cancel)
// Convenience method for fire BOTH OnClosed and OnFormClosed events
private void FireClosedEvents (CloseReason reason)
{
this.OnClosed (EventArgs.Empty);
this.OnFormClosed (new FormClosedEventArgs (reason));
FormClosedEventArgs fc = new FormClosedEventArgs(reason);
this.OnClosed (fc);
this.OnFormClosed (fc);
}

[EditorBrowsable (EditorBrowsableState.Advanced)]
Expand Down
Expand Up @@ -260,6 +260,7 @@ void ChildForm_Closing (object sender, CancelEventArgs e)

void ChildForm_Closed (object sender, EventArgs e)
{
Assert.IsNotNull ((FormClosedEventArgs)e, "FormClosedEventArgs");
Assert.IsNotNull (MdiParent, "ChildForm_Closed");
}

Expand Down

0 comments on commit 89f264a

Please sign in to comment.