The UIEntryField class has significant static members that provide much of the definition and logic involved with data entry of character-mode screens.
MapsEntryDictionary
public static Dictionary<MapID,Dictionary<FieldID, UIEntryField>> MapsEntryDictionary
This dictionary, effectively indexed by MapID and FieldID, contains an object for each field that has FieldEntryClass set either at the screen or field level. During data entry of a screen, this dictionary is accessed to provide each individual field's entry class object. As it is public, individual UIEntryField class objects can be accessed at any time to tweak settings. Note, however, that the objects in this dictionary are shared across the entire IIS Application pool process and so any changes made should be done in a controlled, locked manner.
InitEntryDictionary()
public static void InitEntryDictionary()
This static method is called by the UIEntryField static constructor. It is custom generated into your project based on the collection of all write fields that have an active FieldEntryClass property.
GetEntryField()
public static UIEntryField GetEntryField(MapID mapID, FieldID fieldID)
This simple method will pull an active UIEntryField or child class object from the MapsEntryDictionary -- if the MapID/FieldID combination has no defined entry field, a null is returned.
EnterFieldValue()
public static bool EnterFieldValue(TaskSession ts, MapID mapID, FieldID fieldID, string text, out string errorMessage)
For entering individual fields-if there an error occurs, will set a message in errorMessage and return false.
setIOBagValues()
public static int setIOBagValues(TaskSession ts, MapID mapID, IOBag ioBag, out FieldID errorField, out string errorMessage)
For entering a full IOBag of fields, typically used in UI solutions with an IOBag resulting from a webpage form entry. Only enters fields that have been changed by the user.
Will return the number of fields entered, and if errorField is not null, an error occurred and will be in the errorMessage out parameter.