Overview
UgiUiUtil provides some UI utilities, espcially useful forn Xamarin.Forms apps.
Class Methods | |
static void | HideUI (object o) |
Hide an alert More... | |
static void | UpdateAlert (object o, string message) |
Update an alert More... | |
static void | UpdateAlertTitle (object o, string title) |
Update an alert title More... | |
static object | ShowOk (string title, string message, string okButtonTitle="", Action okDelegate=null) |
Show an alert dialog with ok button More... | |
static object | ShowOkCancel (string title, string message, Action okDelegate, string okButtonTitle="", string cancelButtonTitle="", Action cancelDelegate=null) |
Show an alert dialog with ok and cancel buttons More... | |
static object | Show3ButtonAlert (string title, string message, string button1Title, string button2Title, string cancelButtonTitle, Action button1Delegate, Action button2Delegate, Action cancelDelegate) |
Show an alert with three buttons More... | |
static object | ShowChoices (string[] choices, int initialSelectedIndex, string title, string message, string actionButtonTitle, bool canCancel, Action< int, string > actionDelegate, Action< int, string, Action > confirmationDelegate=null, Action cancelDelegate=null) |
Show UI to choose from a list of choices More... | |
static object | ShowMenu (string title, Action cancelDelegate, params MenuTitleAndHandler[] items) |
In a Xamarin.Forms ap, use UgiForms.ShowMenu More... | |
static void | ShowToast (string title, string message, double interval=2.0) |
Show a toast More... | |
static object | ShowTextInput (string title, string message, string actionButtonTitle, string initialText, bool allowAutoCorrection, string switchText, bool switchInitialState, Action< string, bool > actionDelegate, Action cancelDelegate=null, ShowTextInputShouldEnableForTextDelegate shouldEnableForTextDelegate=null) |
Input a text string from the user More... | |
static void | ShowWaiting (string message, Action cancelDelegate=null) |
Show a waiting alert More... | |
static void | UpdateWaiting (string message) |
Updat the message in a waiting alert More... | |
static void | HideWaiting () |
Hide the waiting alert More... | |
static void | StopInventoryWithCompletionShowWaiting (Action del) |
Stop inventory, displaying a waiting message More... | |
static void | StartDisconnectedAlert (Action cancelDelegate) |
Start displaying a "please connect the grokker" alert if the Grokker is not connected More... | |
static void | StopDisconnectedAlert () |
Stop displaying the disconnected dialog More... | |
static object | ShowInventoryError (UgiInventory.InventoryResults result, Action del=null) |
Show an error dialog for an inventory error More... | |
static string | GetInventoryErrorMessage (UgiInventory.InventoryResults result) |
Get a string describing an inventory error More... | |
static string | GetTagAccessErrorMessage (UgiInventory.TagAccessReturnValues result) |
Get a string describing a tag access error More... | |
static object | ShowVersionAlert (string title=null, bool showExtraInfo=false) |
Show an alert with information about the app and about the Grokker More... | |
Instance Methods | |
delegate bool | ShowTextInputShouldEnableForTextDelegate (String value) |
Delegate for determining whether to enable the action button within ShowTextInput More... | |
Properties | |
static int | NULL_COLOR [get] |
The NULL color More... | |
static bool | UseUGrokItStyleAlerts [get, set] |
Gets or sets whether U Grok It style alerts are used. More... | |
static bool | IsDisconnectedAlertActive [get] |
See if the disconnected alert is active. More... | |
Structures | |
class | MenuTitleAndHandler |
Object passed to ShowMenu More... | |
class | RunnableHelper |
Instance Method Documentation
◆ HideUI()
|
inlinestatic |
Hide an alert
- Parameters
-
o Token for alert to hide
◆ UpdateAlert()
|
inlinestatic |
Update an alert
- Parameters
-
o Token for the alert message Text for the body of the alert
◆ UpdateAlertTitle()
|
inlinestatic |
Update an alert title
- Parameters
-
o Token for the alert title New title for the alert
◆ ShowOk()
|
inlinestatic |
Show an alert dialog with ok button
- Returns
- Token for the alert dialog
- Parameters
-
title Title for the alert message Text for the body of the alert okButtonTitle Text for the "ok" button, or "" for the defualt, or null for no ok button okDelegate Code to execute for "ok"
◆ ShowOkCancel()
|
inlinestatic |
Show an alert dialog with ok and cancel buttons
- Returns
- Token for the alert dialog
- Parameters
-
title Title for the alert message Text for the body of the alert okDelegate Code to execute for "ok" okButtonTitle Text for the "ok" button, or "" for the defualt, or null for no ok button cancelButtonTitle Text for the "cancel" button, or "" for the defualt, or null for no cancel button cancelDelegate Code to execute for "cancel"
◆ Show3ButtonAlert()
|
inlinestatic |
Show an alert with three buttons
- Returns
- Token for the alert dialog
- Parameters
-
title Title for the alert message Text for the body of the alert button1Title Text for button 1 button2Title Text for button 1 cancelButtonTitle Text for the "cancel" button, or "" for the defualt, or nil for no cancel button button1Delegate Code to execute for button 1 button2Delegate Code to execute for button 2 cancelDelegate Code to execute for "cancel"
◆ ShowChoices()
|
inlinestatic |
Show UI to choose from a list of choices
- Returns
- Token for the UI
- Parameters
-
choices Choices to choose from initialSelectedIndex Choice to select initially title Title for the alert message Message for the alert actionButtonTitle Text for the "ok" button, or "" for the defualt, or null for no ok button canCancel true if the user can cancel actionDelegate Code to execute if the user makes a choice confirmationDelegate Code to execute to confirm the choice, or null of no confirmation cancelDelegate Code to execute for "cancel"
◆ ShowMenu()
|
inlinestatic |
In a Xamarin.Forms ap, use UgiForms.ShowMenu
- Returns
- Token for the UI
- Parameters
-
title Title for the menu cancelDelegate Code to execute for "cancel" items Items for the menu
◆ ShowToast()
|
inlinestatic |
Show a toast
- Parameters
-
title Title for the toast message Text for the body of the toast interval Time to display the toast
◆ ShowTextInputShouldEnableForTextDelegate()
delegate bool UGrokItApi.UgiUiUtil.ShowTextInputShouldEnableForTextDelegate | ( | String | value | ) |
Delegate for determining whether to enable the action button within ShowTextInput
- Returns
- true to enable the action button
- Parameters
-
value Text the user has input
◆ ShowTextInput()
|
inlinestatic |
Input a text string from the user
- Returns
- Token for the UI
- Parameters
-
title Title for the alert message Message for the alert actionButtonTitle Text for the "ok" button, or "" for the defualt, or null for no ok button initialText Initial text allowAutoCorrection true to allow auto-correction switchText text for radio button, or null for no radio button switchInitialState initial state for radio button actionDelegate Code to execute for "ok" cancelDelegate Code to execute for "cancel" shouldEnableForTextDelegate Code to determine if the action button should be enabled
◆ ShowWaiting()
|
inlinestatic |
Show a waiting alert
- Parameters
-
message Message cancelDelegate Code to execute if the user cancels. If null then no cancel button is shown
◆ UpdateWaiting()
|
inlinestatic |
Updat the message in a waiting alert
- Parameters
-
message New message
◆ HideWaiting()
|
inlinestatic |
Hide the waiting alert
◆ StopInventoryWithCompletionShowWaiting()
|
inlinestatic |
Stop inventory, displaying a waiting message
- Parameters
-
del Code to execute after inventory is stopped
◆ StartDisconnectedAlert()
|
inlinestatic |
Start displaying a "please connect the grokker" alert if the Grokker is not connected
- Parameters
-
cancelDelegate Code to execute if the user cancels
◆ StopDisconnectedAlert()
|
inlinestatic |
Stop displaying the disconnected dialog
◆ ShowInventoryError()
|
inlinestatic |
Show an error dialog for an inventory error
- Parameters
-
result The inventory error del Delegate to call after alert
- Returns
- Token for the UI
◆ GetInventoryErrorMessage()
|
inlinestatic |
Get a string describing an inventory error
- Returns
- The inventory error message.
- Parameters
-
result The inventory error
◆ GetTagAccessErrorMessage()
|
inlinestatic |
Get a string describing a tag access error
- Returns
- The tag access error message.
- Parameters
-
result The tag taccess error
◆ ShowVersionAlert()
|
inlinestatic |
Show an alert with information about the app and about the Grokker
- Returns
- Token for the UI
- Parameters
-
title Title for the alert, or null to use the app'sname and version showExtraInfo true to show debugging information
Property Documentation
◆ NULL_COLOR
|
staticget |
The NULL color
The NULL color
◆ UseUGrokItStyleAlerts
|
staticgetset |
Gets or sets whether U Grok It style alerts are used.
true
if U Grok It style alerts are used
◆ IsDisconnectedAlertActive
|
staticget |
See if the disconnected alert is active.
true
if disconnected alert is active; otherwise, false
.
Copyright © 2012-2017 U Grok It, Inc. connect@UGrokIt.com U Grok It and the U Grok It logo are registered trademarks of U Grok It, Inc. All other trademarks and copyrights are the property of their respective owners |