protected override bool RunDialog(IntPtr hwndOwner) { if (null == this.ef) { this.ef = new ExceptionForm(); this.ef.StartPosition = FormStartPosition.CenterParent; } this.ef.Exception = this.exception; this.ef.AllowAbort = this.allowAbort; if (! string.IsNullOrEmpty(this.title)) { this.ef.Text = this.title; } switch (this.ef.ShowDialog(new Win32WindowImpl(hwndOwner))) { case DialogResult.Abort: return false; case DialogResult.Ignore: default: return true; } }
private void llblInnerException_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { using (ExceptionForm ef = new ExceptionForm(this.exception.InnerException, this.AllowAbort)) { ef.Text = "内部例外"; DialogResult result = ef.ShowDialog(this); switch (result) { case DialogResult.None: case DialogResult.Cancel: break; default: this.DialogResult = result; this.Close(); break; } } }