private SetDialogResultAndMakeSureWindowGetsClosed ( bool result ) : bool | ||
result | bool | The result. |
Результат | bool |
private bool SetDialogResultAndMakeSureWindowGetsClosed(bool? result)
{
try
{
DialogResult = result;
return true;
}
catch (InvalidOperationException ex)
{
Log.Warning(ex, "Failed to set DialogResult, probably the main window, closing window manually");
Close();
return true;
}
}