提交 cc39d7eb 编写于 作者: C Carlos Alberto Cortez

[fix] #631810: Form.DialogResult needs to call its close events *before* closing.

	* Form.cs: When setting DialogResult call RaiseCloseEvents
	instead of directly setting 'closing', since we need to have our
	FormClosing event invoked *before* the form dissapears, so the
	user can properly cancel the close operation if desired.
	Fixes #631810.
上级 b4070921
......@@ -708,7 +708,8 @@ namespace System.Windows.Forms {
typeof (DialogResult));
dialog_result = value;
closing = (dialog_result != DialogResult.None && is_modal);
if (dialog_result != DialogResult.None && is_modal)
RaiseCloseEvents (false, false); // .Net doesn't send WM_CLOSE here.
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册