C# Класс SIL.FieldWorks.FwCoreDlgs.ErrorMessageHandler

Handles error messages and how to present them to the user via GUI
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
DisplayErrorTable ( ) : void

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

Описание методов

AddMessage() публичный Метод

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
Результат void

AddMessage() публичный Метод

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
Результат void

AddStar() публичный Метод

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
Результат void

ErrorMessageHandler() публичный Метод

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.
Результат System

RemoveMessage() публичный Метод

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
Результат void

RemoveStar() публичный Метод

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.
Результат void