C# Class SIL.FieldWorks.FwCoreDlgs.ErrorMessageHandler

Handles error messages and how to present them to the user via GUI
Show file Open project: sillsdev/FieldWorks

Public Methods

Method 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

Method 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 method

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
return void

AddMessage() public method

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
return void

AddStar() public method

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
return void

ErrorMessageHandler() public method

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.
return System

RemoveMessage() public method

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
return void

RemoveStar() public method

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.
return void