|  | ||
| 
 | The ShowError Event | 
 | ||||||
| Synopsis | The ShowError event is raised whenever SilverSharp wishes to display an error message. A error message is displayed in response to the SilverScreen API routine error_message, and otherwise whenever the CAD engine wishes to report an error condition. 
 | 
 | ||||||
| Delegate | The ShowError delegate is declared as follows: 
 
 
 A delegate is similar to a C/C++ function pointer, but delegates are type-safe and can only refer to a method that matches the signature of the delegate. The ShowError delegate declares a function signature that must be used when installing an event handler for the ShowError event. 
 | 
 | ||||||
| Event | The ShowError event is declared within Events as follows: 
 
 
 ShowError allows your application to subscribe to or unsubscribe from the ShowError event. 
 | 
 | ||||||
| Raise method | The method to raise the ShowError event is declared within Events as follows: 
 
 
 The SilverSharp assembly will automatically raise the ShowError event when an error message is to be displayed to the user. It would not be typical for a SilverSharp application to raise the event itself. 
 | 
 | ||||||
| Remarks | It is not necessary for a SilverSharp application to establish a handler for the ShowError event, but it is typical to do so. The reporting of errors can be disabled with the State property CV_ERRORS when necessary, or messages can be quietly logged for later analysis. 
 | 
 | ||||||
| See Also | 
 | |||||||
| Example | The following C# code for WPF shows a sample ShowError event handler. Note that the method declaration must match the delegate for this event in parameters and return type: 
 
 
 The following code shows how to subscribe to the ShowError event, assigning the above handler: 
 
 
 The following code shows how to unsubscribe from the ShowError event, removing the above handler: 
 
 
 Note: See the Birdhouse SilverSharp sample application for a demonstration of the use of the ShowError event. | 
 |