C# Class SIL.FieldWorks.FwCoreDlgs.ErrorMessageHandler

Handles error messages and how to present them to the user via GUI
Afficher le fichier Open project: sillsdev/FieldWorks

Méthodes publiques

Méthode Description
AddMessage ( TextBox textBox, ErrorMessage message ) : void

Adds a single new message to a table and displays it

AddMessage ( TextBox textBox, Set messages ) : void

Adds multiple new messages to a table and displays it

AddStar ( TextBox textBox ) : void

Adds a star to the given TextBox.

ErrorMessageHandler ( Label>.Dictionary labelAssociation, Control enabledControl ) : System

Constructs a new ErrorMessageHandler (should only have one instance per dialog)

RemoveMessage ( TextBox textBox ) : void

Removes message from table of error messages

RemoveStar ( TextBox textBox ) : void

Removes the star from the given text box.

Private Methods

Méthode Description
DisplayErrorTable ( ) : void

Displays all the errors that currently the user hasn't fixed, using the labels specified in the labelAssociation Dictionary.

Method Details

AddMessage() public méthode

Adds a single new message to a table and displays it
public AddMessage ( TextBox textBox, ErrorMessage message ) : void
textBox System.Windows.Forms.TextBox The text box where the error appears
message ErrorMessage The error message you wish to add
Résultat void

AddMessage() public méthode

Adds multiple new messages to a table and displays it
public AddMessage ( TextBox textBox, Set messages ) : void
textBox System.Windows.Forms.TextBox The text box where the error appears
messages Set The set of messages you wish to add
Résultat void

AddStar() public méthode

Adds a star to the given TextBox.
public AddStar ( TextBox textBox ) : void
textBox System.Windows.Forms.TextBox The text box to place the star by
Résultat void

ErrorMessageHandler() public méthode

Constructs a new ErrorMessageHandler (should only have one instance per dialog)
public ErrorMessageHandler ( Label>.Dictionary labelAssociation, Control enabledControl ) : System
labelAssociation Label>.Dictionary Dictionary that contains your /// textbox as a key and the associated error label
enabledControl System.Windows.Forms.Control Contains the control that we want to enable/disable /// based on whether we have errors present.
Résultat System

RemoveMessage() public méthode

Removes message from table of error messages
public RemoveMessage ( TextBox textBox ) : void
textBox System.Windows.Forms.TextBox The text box associated with the errors you wish to remove
Résultat void

RemoveStar() public méthode

Removes the star from the given text box.
public RemoveStar ( TextBox textBox ) : void
textBox System.Windows.Forms.TextBox The text box that may or may not have a star to remove.
Résultat void