ExceptionMessageBox 클래스

Displays a message box that can be customized with text, buttons, and symbols to improve the customer experience with a Microsoft Windows .NET Framework-based application.

System.Object
  Microsoft.SqlServer.MessageBox.ExceptionMessageBox

네임스페이스:  Microsoft.SqlServer.MessageBox
어셈블리:  Microsoft.ExceptionMessageBox(Microsoft.ExceptionMessageBox.dll)

[ComVisibleAttribute(false)]
public class ExceptionMessageBox

ExceptionMessageBox 유형에서 다음 멤버를 표시합니다.

  이름설명
공용 메서드ExceptionMessageBox()Creates an instance of ExceptionMessageBox with the default properties.
공용 메서드ExceptionMessageBox(Exception)Creates an instance of ExceptionMessageBox by using information from the specified Exception.
공용 메서드ExceptionMessageBox(String)Creates an instance of ExceptionMessageBox with the supplied top-level error message text.
공용 메서드ExceptionMessageBox(Exception, ExceptionMessageBoxButtons)Creates an instance of ExceptionMessageBox by using information from the specified Exception and by specifying the buttons to display in the message box.
공용 메서드ExceptionMessageBox(String, String)Creates an instance of ExceptionMessageBox with the supplied top-level error message text and the dialog box caption of the exception message box.
공용 메서드ExceptionMessageBox(Exception, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol)Creates an instance of ExceptionMessageBox by using information from the specified Exception and by specifying the buttons and symbol to display in the message box.
공용 메서드ExceptionMessageBox(String, String, ExceptionMessageBoxButtons)Creates an instance of ExceptionMessageBox with the supplied top-level error message text and the dialog box caption of the exception message box. The method also specifies buttons to display in the exception message box.
공용 메서드ExceptionMessageBox(Exception, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton)Creates an instance of ExceptionMessageBox by using information from the specified Exception and by specifying the buttons, symbol, and default button to display in the exception message box. .
공용 메서드ExceptionMessageBox(String, String, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol)Creates an instance of ExceptionMessageBox with the supplied top-level error message text and dialog box caption of the exception message box. The method also specifies the buttons and symbol to display in the exception message box.
공용 메서드ExceptionMessageBox(Exception, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton, ExceptionMessageBoxOptions)Creates an instance of ExceptionMessageBox by using information from the specified Exception and by specifying the buttons, symbol, default button, and other properties to display in the exception message box.
공용 메서드ExceptionMessageBox(String, String, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton)Creates an instance of ExceptionMessageBox with the supplied top-level error message text and dialog box caption of the message box. The method also specifies the buttons, symbol, and default button to display in the exception message box.
공용 메서드ExceptionMessageBox(String, String, ExceptionMessageBoxButtons, ExceptionMessageBoxSymbol, ExceptionMessageBoxDefaultButton, ExceptionMessageBoxOptions)인프라입니다. Creates an instance of ExceptionMessageBox with the supplied top-level error message text and dialog box caption of the message box. The method also specifies the buttons, symbol, default button, and dialog options to display in the exception message box.
맨 위로 이동

  이름설명
공용 속성정적 멤버AbortButtonTextGets the default text for the Abort button.
공용 속성BeepSpecifies whether to play an audible sound when the message is displayed.
공용 속성ButtonsGets or sets the buttons to display in the message box.
공용 속성정적 멤버CancelButtonTextGets the default text for the Cancel button.
공용 속성CaptionGets or sets the dialog box caption of the exception message box.
공용 속성CheckBoxRegistryKeySets an opened RegistryKey that controls the check box that is displayed on the exception message box when ShowCheckbox is true.
공용 속성CheckBoxRegistryMeansDoNotShowDialogDetermines whether the registry value content specified by CheckBoxRegistryKey and CheckBoxRegistryValue indicates a previous user decision not to view this message.
공용 속성CheckBoxRegistryValueGets or sets the registry value name that controls the check box on the exception message box when ShowCheckbox is true.
공용 속성CheckBoxTextGets or sets the text to display in the check box on the exception message box when ShowCheckbox is true.
공용 속성CustomDialogResultGets the clicked custom text dialog button.
공용 속성CustomSymbolGets or sets a custom bitmap to use as the symbol on the exception message box.
공용 속성DataGets the IDictionary interface that stores help link and advanced information associated with the top-level message.
공용 속성DefaultButtonGets or sets the default button on the message box.
공용 속성DefaultDialogResultGets or sets the value returned by the Show method when the user has previously indicated not to show a given message again.
공용 속성정적 멤버FailButtonTextGets the default text for the Fail button.
공용 속성FontGets or sets the font used in the message box.
공용 속성HelpLinkGets or sets the link to the help file or help Web page associated with the top-level message.
공용 속성정적 멤버IgnoreButtonTextGets the default text for the Ignore button.
공용 속성InnerExceptionGets or sets the Exception instance associated with the lower-level message(s).
공용 속성IsCheckBoxCheckedSpecifies whether the check box is selected when ShowCheckbox is true.
공용 속성MessageGets or sets the Exception that contains the message to display.
공용 속성MessageLevelDefaultGets or sets the number of message levels to display in the message box.
공용 속성정적 멤버NoButtonTextGets the default text for the No button
공용 속성정적 멤버OKButtonTextGets the default text for the OK button
공용 속성OptionsGets or sets miscellaneous display options for the message box
공용 속성정적 멤버RetryButtonTextGets the default text for the Retry button.
공용 속성ShowCheckBoxSpecifies whether to show the check box in the exception message box.
공용 속성ShowToolBarSpecifies whether to show the command button toolbar on the exception message box.
공용 속성SymbolGets or sets the symbol to display in the exception message box.
공용 속성TextGets or sets the text of the top-level message to display in the exception message box
공용 속성UseOwnerFontSpecifies whether to retrieve the font of the owner window and use it as the font for the exception message box.
공용 속성정적 멤버YesButtonTextGets the default text for the Yes button
맨 위로 이동

  이름설명
공용 메서드Equals (Object에서 상속됨)
보호된 메서드Finalize (Object에서 상속됨)
공용 메서드GetHashCode (Object에서 상속됨)
공용 메서드정적 멤버GetMessageTextReturns the string that a user can copy to the clipboard when the exception is displayed in an exception message box.
공용 메서드GetType (Object에서 상속됨)
보호된 메서드MemberwiseClone (Object에서 상속됨)
공용 메서드SetButtonText(String)Sets the text for the custom text button when only one button is displayed in the exception message box.
공용 메서드SetButtonText(String, String)Sets the text for the custom text buttons when only two buttons are displayed in the exception message box.
공용 메서드SetButtonText(String, String, String)Sets the text for the custom text buttons when only three buttons are displayed in the exception message box.
공용 메서드SetButtonText(String, String, String, String)Sets the text for the custom text buttons when only four buttons are displayed in the exception message box.
공용 메서드SetButtonText(String, String, String, String, String)Sets the text for the custom text buttons when only five buttons are displayed in the exception message box.
공용 메서드Show(IWin32Window)Shows the exception message box as a modal dialog box centered on the parent window.
공용 메서드Show(IntPtr, String, String, String, String, String, String, String)Displays the exception message box. 정보를 제공하기 위해서만 확인됩니다. 지원되지 않습니다. 향후 호환성은 보장되지 않습니다.
공용 메서드ToString (Object에서 상속됨)
맨 위로 이동

  이름설명
공용 이벤트OnCopyToClipboardOccurs when exception message text is copied from the message box to the Clipboard.
맨 위로 이동

This example displays the message box with an OK button.

			try
			{
				// Do something that may generate an exception.
				throw new ApplicationException("An error has occured");
			}
			catch (ApplicationException ex)
			{
				// Define a new top-level error message.
				string str = "The action failed.";

				// Add the new top-level message to the handled exception.
				ApplicationException exTop = new ApplicationException(str, ex);
				exTop.Source = this.Text;

				// Show an exception message box with an OK button (the default).
				ExceptionMessageBox box = new ExceptionMessageBox(exTop);
				box.Show(this);
			}
Try
    ' Do something that may generate an exception.
    Throw New ApplicationException("An error has occured")
Catch ex As ApplicationException
    ' Define a new top-level error message.
    Dim str As String = "The action failed."

    ' Add the new top-level message to the handled exception.
    Dim exTop As ApplicationException = New ApplicationException(str, ex)
    exTop.Source = Me.Text

    ' Show an exception message box with an OK button (the default).
    Dim box As ExceptionMessageBox = New ExceptionMessageBox(exTop)
    box.Show(Me)
End Try

This example uses the exception message box to show additional information that is helpful when troubleshooting or debugging.

			try
			{
				// Do something that you don't expect to generate an exception.
				throw new ApplicationException("Failed to connect to the server.");
			}
			catch (ApplicationException ex)
			{
				string str = "An unexpected error occurred. Please call Helpdesk.";
				ApplicationException exTop = new ApplicationException(str, ex);
				exTop.Source = this.Text;

				// Information in the Data property of an exception that has a name
				// beginning with "HelpLink.Advanced" is shown when the user
				// clicks the Advanced Information button of the exception message
				// box dialog box.
				exTop.Data.Add("AdvancedInformation.FileName", "application.dll");
				exTop.Data.Add("AdvancedInformation.FilePosition", "line 355");
				exTop.Data.Add("AdvancedInformation.UserContext", "single user mode");

				// Show the exception message box with additional information that 
				// is helpful when a user calls technical support.
				ExceptionMessageBox box = new ExceptionMessageBox(exTop);

				box.Show(this);
			}
Try
    ' Do something that you don't expect to generate an exception.
    Throw New ApplicationException("Failed to connect to the server.")
Catch ex As ApplicationException
    Dim str As String = "An unexpected error occurred. Please call Helpdesk."
    Dim exTop As ApplicationException = New ApplicationException(str, ex)
    exTop.Source = Me.Text

    ' Information in the Data property of an exception that has a name
    ' beginning with "HelpLink.Advanced" is shown when the user
    ' clicks the Advanced Information button of the exception message
    ' box dialog box.
    exTop.Data.Add("AdvancedInformation.FileName", "application.dll")
    exTop.Data.Add("AdvancedInformation.FilePosition", "line 355")
    exTop.Data.Add("AdvancedInformation.UserContext", "single user mode")

    ' Show the exception message box with additional information that 
    ' is helpful when a user calls technical support.
    Dim box As ExceptionMessageBox = New ExceptionMessageBox(exTop)

    box.Show(Me)

End Try

이 유형의 모든 공용 static(Visual Basic에서는 Shared) 멤버는 스레드로부터 안전합니다. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.

커뮤니티 추가 항목

추가
표시: